16 #include <boost/function.hpp>
17 #include <boost/signals2.hpp>
18 #include <boost/enable_shared_from_this.hpp>
19 #include <boost/optional.hpp>
21 #include <tbb/spin_rw_mutex.h>
29 class DtDynamicTerrainGeometry;
30 class DtDynamicTerrainChange;
31 class DtDynamicTerrainWorld;
32 class DtDynamicTerrainIndex;
33 class DtDynamicTerrainChanges;
85 ,
public boost::enable_shared_from_this<DtDynamicTerrainFeature>
104 void removeTerrainChange();
108 void releaseOwnership();
115 const boost::shared_ptr<DtDynamicTerrainFeature::RequestInfo>&);
117 boost::weak_ptr<DtDynamicTerrainFeature::RequestInfo>
myRequest;
120 static unsigned long long GetObjectCount();
142 virtual boost::optional<DtString> featureAttribute(
const DtString& key)
const;
145 virtual bool isInDefaultState()
const = 0;
149 virtual bool lastStateWasDefaultState()
const = 0;
163 typedef boost::function<void (const DtDynamicTerrainFeature&)>
Callback;
166 boost::function<void (const DtDynamicTerrainFeature&, const DtDynamicTerrainChanges&)>
174 virtual boost::signals2::connection connectToChangeSignal(
const ChangeCallback& callback)
const;
180 virtual boost::signals2::connection connectToPageOutSignal(
const Callback& callback)
const;
190 virtual DtString description()
const = 0;
208 virtual void iterateCommands(
230 void indexDoubleAscending(
const DtString& key);
231 void indexDoubleDescending(
const DtString& key);
232 void indexIntAscending(
const DtString& key);
233 void indexIntDescending(
const DtString& key);
234 void indexStringAscending(
const DtString& key);
235 void indexStringDescending(
const DtString& key);
243 typedef boost::signals2::signal<void (const DtDynamicTerrainFeature&)>
Signal;
245 typedef boost::signals2::signal<
249 typedef std::map<RequestInfo*, boost::shared_ptr<Link> >
LinkInfoMap;
252 bool makeLinkToRequest(
const boost::shared_ptr<Link>& link);
253 void breakLinkToRequest(LinkInfoMap::iterator);
267 typedef std::map<DtString, DtDynamicTerrainIndex*>
IndexMap;
295 virtual bool addValue(
296 const boost::shared_ptr<DtDynamicTerrainFeature::Link>& link,
328 static unsigned long long GetObjectCount();
334 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
335 const boost::shared_ptr<RequestInfo>& reqInfo);
339 RequestInfo&
request() {
return *myRequestInfo; }
344 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
345 const boost::shared_ptr<RequestInfo>& reqInfo);
359 static unsigned long long GetObjectCount();
364 virtual ~RequestInfo();
372 typedef std::list<boost::shared_ptr<Link> >
LinkList;
375 void makeLinkToFeature(
const boost::shared_ptr<Link>& link);
376 void breakLinkToFeature(LinkList::iterator i);
383 mutable Mutex myMutex;