VR-Forces 4.1.1 Class Documentation
featureDebugger.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <features/featureSet.h>
14 
15 #include <tbb/mutex.h>
16 #include <tbb/compat/condition_variable>
17 
21 
22 namespace MAKVRinTerra
23 {
24  class DtSharedMemoryFeaturesDebugDrawer;
25  class DtAttributeConfigParser;
26  class DtUnusedFeatureTileTracker;
27 
29  {
30  public:
32  boost::shared_ptr<DtAttributeConfigParser> = boost::shared_ptr<DtAttributeConfigParser>(),
33  boost::shared_ptr<DtUnusedFeatureTileTracker> = boost::shared_ptr<DtUnusedFeatureTileTracker>(),
35 
37 
40  void add(std::string name, DtFeatureSet*, bool draw = false);
41 
42  template <typename F>
43  void add(std::string name, DtFeatureSetTemplate<F>* fs, bool draw = false)
44  {
45  add(name, new DtFeatureSet::Wrapper<F>(fs), draw);
46  }
47 
49  bool loadConfig(std::string);
50 
52  std::string printConfig() const;
53 
55  bool createFiltered(std::string newname, unsigned set, std::string query);
56 
58  bool createTransformed(std::string newname, unsigned set);
59 
61  std::string listFeatureSets(unsigned indent=0) const;
62 
64  void printFeatureSet(std::ostream&, unsigned set, unsigned max=0) const;
65 
67  std::string schema(std::string sets) const;
68 
70  std::string info() const;
71 
73  void draw(std::string sets);
74 
76  void clearDrawer();
77 
78  void redraw();
79 
80  void setQueryDebugging(bool);
81 
83  bool pageInPoint(unsigned set, double x, double y);
84 
85  void pageOut(unsigned maxsize);
86 
87  void setProjection(const DtProj&);
88 
89  private:
90  void doDraw();
91 
92  struct Record
93  {
94  boost::shared_ptr<DtFeatureSet> featureSet;
95  std::string name;
96 
97  Record(DtFeatureSet*, std::string);
98  };
99 
100  typedef std::vector<Record> RecordVector;
101 
102  mutable tbb::mutex myMutex;
103  mutable tbb::mutex myConditionMutex;
104  tbb::interface5::condition_variable myDrawCondition;
105  boost::scoped_ptr<tbb::tbb_thread> myDrawThread;
108 
110  boost::scoped_ptr<DtSharedMemoryFeaturesDebugDrawer> myDrawer;
111  boost::shared_ptr<DtAttributeConfigParser> myAttributeParser;
112  boost::scoped_ptr<DtSubCommandManager> myCommandManager;
113  boost::scoped_ptr<DtConsoleCommandOwner> myCommandOwner;
115  boost::shared_ptr<DtUnusedFeatureTileTracker> myUnusedTracker;
116  };
117 }

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)