17 #include <boost/function.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::signalslib::connection connectToChangeSignal(
const ChangeCallback& callback)
const;
180 virtual boost::signalslib::connection connectToPageOutSignal(
const Callback& callback)
const;
189 virtual DtString description()
const = 0;
232 void indexDoubleAscending(
const DtString& key);
233 void indexDoubleDescending(
const DtString& key);
234 void indexIntAscending(
const DtString& key);
235 void indexIntDescending(
const DtString& key);
236 void indexStringAscending(
const DtString& key);
237 void indexStringDescending(
const DtString& key);
254 typedef boost::signalslib::signal<void (const DtDynamicTerrainFeature&)>
Signal;
256 typedef boost::signalslib::signal<
260 typedef std::map<RequestInfo*, boost::shared_ptr<Link> >
LinkInfoMap;
263 bool makeLinkToRequest(
const boost::shared_ptr<Link>& link);
265 virtual void breakLinkToRequest(LinkInfoMap::iterator);
280 typedef std::map<DtString, DtDynamicTerrainIndex*>
IndexMap;
308 virtual int size()
const = 0;
311 virtual bool addValue(
312 const boost::shared_ptr<DtDynamicTerrainFeature::Link>& link,
344 static unsigned long long GetObjectCount();
350 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
351 const boost::shared_ptr<RequestInfo>& reqInfo);
355 RequestInfo&
request() {
return *myRequestInfo; }
360 const boost::shared_ptr<DtDynamicTerrainFeature>& featureInfo,
361 const boost::shared_ptr<RequestInfo>& reqInfo);
375 static unsigned long long GetObjectCount();
380 virtual ~RequestInfo();
388 typedef std::list<boost::shared_ptr<Link> >
LinkList;
391 void makeLinkToFeature(
const boost::shared_ptr<Link>& link);
392 void breakLinkToFeature(LinkList::iterator i);
399 mutable Mutex myMutex;
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
Definition: DtDynamicTerrainFeature.h:316
Represents (possibly infinite) area of space.
Definition: DtDynamicTerrainGeometry.h:20
Mutex myMutex
Definition: DtDynamicTerrainFeature.h:275
Contains makVrv::DtDisconnectable class.
voidpf void uLong size
Definition: ioapi.h:39
const boost::shared_ptr< DtDynamicTerrainFeature > myFeatureInfo
Definition: DtDynamicTerrainFeature.h:364
LinkInfoMap myLinkMap
Definition: DtDynamicTerrainFeature.h:278
RequestInfo & request()
Definition: DtDynamicTerrainFeature.h:355
boost::signalslib::signal< void(const DtDynamicTerrainFeature &)> Signal
Definition: DtDynamicTerrainFeature.h:254
tbb::spin_mutex Mutex
Definition: DtDynamicTerrainFeature.h:398
tbb::spin_rw_mutex Mutex
Definition: DtDynamicTerrainFeature.h:274
boost::function< void(const DtDynamicTerrainFeature &)> Callback
Signal notification. The functions can be used to install callbacks which are called when events happ...
Definition: DtDynamicTerrainFeature.h:163
Contains DLL export macros.
IndexMap myIndices
Definition: DtDynamicTerrainFeature.h:281
LinkList myLinksToFeatures
Definition: DtDynamicTerrainFeature.h:401
Functionality for disconnecting the various references that objects make to each other.
Definition: DtDisconnectable.h:25
boost::function< void(const DtDynamicTerrainChange &)> IterateRequestCallback
Definition: DtDynamicTerrainFeature.h:319
std::map< RequestInfo *, boost::shared_ptr< Link > > LinkInfoMap
Definition: DtDynamicTerrainFeature.h:260
std::list< boost::shared_ptr< Link > > LinkList
Definition: DtDynamicTerrainFeature.h:388
Contains DtDynamicTerrainChange class.
boost::function< void(const DtDynamicTerrainFeature &, const DtDynamicTerrainChanges &)> ChangeCallback
Signal notification. The functions can be used to install callbacks which are called when events happ...
Definition: DtDynamicTerrainFeature.h:167
boost::signalslib::signal< > ChangeSignal
Definition: DtDynamicTerrainFeature.h:258
Signal myPageOutSignal
Definition: DtDynamicTerrainFeature.h:269
Interface which abstracts the concept of a individually identifiable "thing" in the terrain...
Definition: DtDynamicTerrainFeature.h:83
boost::scoped_ptr< DtDynamicTerrainChange > myCommand
Definition: DtDynamicTerrainFeature.h:395
ChangeSignal myChangeSignal
Definition: DtDynamicTerrainFeature.h:268
boost::weak_ptr< DtDynamicTerrainFeature::RequestInfo > myRequest
Definition: DtDynamicTerrainFeature.h:117
Command which can be given to the dynamic terrain system to perform some change. This class is a simp...
Definition: DtDynamicTerrainChange.h:42
DtDynamicTerrainFeature & feature()
Definition: DtDynamicTerrainFeature.h:356
const boost::shared_ptr< RequestInfo > myRequestInfo
Definition: DtDynamicTerrainFeature.h:363
boost::function< void(const DtDynamicTerrainChange &)> IterateRequestCallback
Definition: DtDynamicTerrainFeature.h:290
Container for dynamic terrain features, change requests, and queries.
Definition: DtDynamicTerrainWorld.h:71
std::map< DtString, DtDynamicTerrainIndex * > IndexMap
Definition: DtDynamicTerrainFeature.h:280
tbb::spin_mutex Mutex
Definition: DtDisconnectable.h:49
Interface provided to terrain feature's state change functions.
Definition: DtDynamicTerrainFeature.h:287
Resource handle for a change request which has been added to the system. Returned from addChangeReque...
Definition: DtDynamicTerrainFeature.h:95