16 #include <boost/function.hpp>
17 #include <boost/signals2.hpp>
18 #include <boost/enable_shared_from_this.hpp>
20 #include <tbb/spin_rw_mutex.h>
28 class DtDynamicTerrainGeometry;
29 class DtDynamicTerrainChange;
30 class DtDynamicTerrainWorld;
31 class DtDynamicTerrainIndex;
32 class DtDynamicTerrainChanges;
84 ,
public boost::enable_shared_from_this<DtDynamicTerrainFeature>
103 void removeTerrainChange();
107 void releaseOwnership();
114 const boost::shared_ptr<DtDynamicTerrainFeature::RequestInfo>&);
116 boost::weak_ptr<DtDynamicTerrainFeature::RequestInfo>
myRequest;
119 static unsigned long long GetObjectCount();
150 typedef boost::function<void (const DtDynamicTerrainFeature&)>
Callback;
153 boost::function<void (const DtDynamicTerrainFeature&, const DtDynamicTerrainChanges&)>
161 virtual boost::signals2::connection connectToChangeSignal(
const ChangeCallback& callback)
const;
167 virtual boost::signals2::connection connectToPageOutSignal(
const Callback& callback)
const;
177 virtual DtString description()
const = 0;
195 virtual void iterateCommands(
217 void indexDoubleAscending(
const DtString& key);
218 void indexDoubleDescending(
const DtString& key);
219 void indexIntAscending(
const DtString& key);
220 void indexIntDescending(
const DtString& key);
221 void indexStringAscending(
const DtString& key);
222 void indexStringDescending(
const DtString& key);
230 typedef boost::signals2::signal<void (const DtDynamicTerrainFeature&)>
Signal;
232 typedef boost::signals2::signal<
236 typedef std::map<RequestInfo*, boost::shared_ptr<Link> >
LinkInfoMap;
239 bool makeLinkToRequest(
const boost::shared_ptr<Link>& link);
240 void breakLinkToRequest(LinkInfoMap::iterator);
254 typedef std::map<DtString, DtDynamicTerrainIndex*>
IndexMap;
282 virtual bool addValue(
283 const boost::shared_ptr<DtDynamicTerrainFeature::Link>& link,
315 static unsigned long long GetObjectCount();
321 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
322 const boost::shared_ptr<RequestInfo>& reqInfo);
326 RequestInfo&
request() {
return *myRequestInfo; }
331 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
332 const boost::shared_ptr<RequestInfo>& reqInfo);
346 static unsigned long long GetObjectCount();
351 virtual ~RequestInfo();
359 typedef std::list<boost::shared_ptr<Link> >
LinkList;
362 void makeLinkToFeature(
const boost::shared_ptr<Link>& link);
363 void breakLinkToFeature(LinkList::iterator i);
370 mutable Mutex myMutex;