15 #include <boost/function.hpp>
21 class recursive_mutex;
24 namespace MAKVRinTerra
62 typedef boost::shared_ptr<Implementation>
ImplPtr;
63 typedef boost::shared_ptr<const Implementation>
ImplCPtr;
65 typedef tbb::recursive_mutex
Mutex;
67 template <Type T>
class Handle;
76 typedef Handle<PointType>
Point;
77 typedef Handle<PathType>
Path;
78 typedef Handle<AreaType>
Area;
81 static std::string ToString(
Type);
84 static Area MakeBox(
Point,
double length,
double width,
double rotation);
85 static Area MakeBox(
const DtProj&,
double xmin,
double ymin,
double xmax,
double ymax);
87 static Area MakeArea(
const DtProj&, std::vector<DtPoint> points);
88 static Area MakeArea(
const DtProj&, std::vector<DtVector> points);
90 static Path MakePath(
const DtProj&, std::vector<DtPoint> points);
91 static Path MakePath(
const DtProj&, std::vector<DtVector> points);
121 bool isEmpty()
const;
124 bool isUnknown()
const;
127 bool isPoint()
const;
136 ImplCPtr implementation()
const;
138 std::string debugPrint()
const;
142 template <
typename T>
143 boost::shared_ptr<const T> cast()
const;
146 const DtProj& projection()
const;
156 void convert(
const DtProj &p);
159 unsigned numberOfPoints()
const;
162 std::auto_ptr<PointVector> points()
const;
165 unsigned numberOfSubGeometries()
const;
168 std::auto_ptr<GeometryVector> subGeometries()
const;
196 class Lock : boost::noncopyable
211 template <DtFeatureGeometry::Type T>
213 : myImpl(handle.myImpl)
217 template <
typename T>
236 virtual Mutex& getMutex()
const;
243 virtual bool unique()
const;
246 virtual const DtProj & projection()
const = 0;
253 virtual void convert(
const DtProj &) = 0;
256 virtual Type type()
const = 0;
259 virtual unsigned numberOfPoints()
const = 0;
262 virtual std::auto_ptr<PointVector> points()
const = 0;
265 virtual unsigned numberOfSubGeometries()
const = 0;
268 virtual std::auto_ptr<GeometryVector> subGeometries()
const = 0;
271 virtual DtPoint centroid()
const = 0;
302 typedef boost::shared_ptr<EmptyImplementation>
Ptr;
314 std::auto_ptr<PointVector>
points()
const;
344 Handle(
const Implementation::Ptr&);
372 Handle(
const Implementation::Ptr&);
374 unsigned numberOfPoints()
const;
375 std::auto_ptr<PointVector> points()
const;
394 class DT_DLL_features DtFeatureGeometry::Handle<DtFeatureGeometry::AreaType>
395 :
protected DtFeatureGeometry
398 friend class DtFeatureGeometry;
401 Handle(
const DtFeatureGeometry&);
402 Handle(
const Implementation::Ptr&);
404 unsigned numberOfBoundaryPoints()
const;
405 std::auto_ptr<PointVector> boundaryPoints()
const;
407 unsigned numberOfHoles()
const;
408 std::auto_ptr<GeometryVector> holes()
const;
428 template <DtFeatureGeometry::Type T>
429 std::ostream& operator<< (std::ostream& str, const DtFeatureGeometry::Handle<T>& g)