Add fwd decl to slash compile time

This commit is contained in:
Dennis Luxen 2014-01-23 13:30:38 +01:00
parent 34e2ef13cf
commit 1341214044

View File

@ -28,11 +28,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef DOUGLASPEUCKER_H_ #ifndef DOUGLASPEUCKER_H_
#define DOUGLASPEUCKER_H_ #define DOUGLASPEUCKER_H_
#include "../DataStructures/SegmentInformation.h" #include "../Util/SimpleLogger.h"
#include <osrm/Coordinate.h> #include <osrm/Coordinate.h>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/foreach.hpp>
#include <cmath> #include <cmath>
@ -40,30 +41,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stack> #include <stack>
#include <vector> #include <vector>
/*This class object computes the bitvector of indicating generalized input points /* This class object computes the bitvector of indicating generalized input
* according to the (Ramer-)Douglas-Peucker algorithm. * points according to the (Ramer-)Douglas-Peucker algorithm.
* *
* Input is vector of pairs. Each pair consists of the point information and a bit * Input is vector of pairs. Each pair consists of the point information and a
* indicating if the points is present in the generalization. * bit indicating if the points is present in the generalization.
* Note: points may also be pre-selected*/ * Note: points may also be pre-selected*/
struct SegmentInformation;
class DouglasPeucker { class DouglasPeucker {
private: private:
typedef std::pair<std::size_t, std::size_t> PairOfPoints; typedef std::pair<std::size_t, std::size_t> PairOfPoints;
//Stack to simulate the recursion //Stack to simulate the recursion
std::stack<PairOfPoints > recursion_stack; std::stack<PairOfPoints> recursion_stack;
/** double ComputeDistance(
* This distance computation does integer arithmetic only and is about twice as fast as
* the other distance function. It is an approximation only, but works more or less ok.
*/
int fastDistance(
const FixedPointCoordinate& point, const FixedPointCoordinate& point,
const FixedPointCoordinate& segA, const FixedPointCoordinate& segA,
const FixedPointCoordinate& segB const FixedPointCoordinate& segB
) const; ) const;
public: public:
void Run(std::vector<SegmentInformation> & input_geometry, const unsigned zoom_level); void Run(
std::vector<SegmentInformation> & input_geometry,
const unsigned zoom_level
);
}; };