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"
13 class txPatternOptimizer
{
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
);
24 // Helper methods for optimizing specific classes
25 void optimizeStep(txPattern
* aInPattern
, txPattern
** aOutPattern
);
27 txXPathOptimizer mXPathOptimizer
;
30 #endif // txPatternOptimizer_h__