Bug 1874684 - Part 4: Prefer const references instead of copying Instant values....
[gecko.git] / dom / xslt / xslt / txPatternOptimizer.h
blob8ba3ffa62557aa13fc7bd94790e4c90ae398c3ae
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef txPatternOptimizer_h__
7 #define txPatternOptimizer_h__
9 #include "txXPathOptimizer.h"
11 class txPattern;
13 class txPatternOptimizer {
14 public:
15 /**
16 * Optimize the given pattern.
17 * @param aInPattern Pattern to optimize.
18 * @param aOutPattern Resulting pattern, null if optimization didn't
19 * result in a new pattern.
21 void optimize(txPattern* aInPattern, txPattern** aOutPattern);
23 private:
24 // Helper methods for optimizing specific classes
25 void optimizeStep(txPattern* aInPattern, txPattern** aOutPattern);
27 txXPathOptimizer mXPathOptimizer;
30 #endif // txPatternOptimizer_h__