![]() |
VR-Forces 5.0.1 Developer's Guide
|
DtOsgEarthFeatureDataBroker listens to osgEarth feature layers (i.e. model layers with a feature source) and dispatches post-processor routines whenever new data pages in.
The class will accept "postMerge" callbacks. When a new subgraph pages in and merges into the scene graph, the decorator will invoke the callbacks on the data.

Classes | |
| class | Callback |
| class | CallbackSortFunction |
Public Types | |
| typedef osg::ref_ptr< Callback > | CallbackRefPtr |
| typedef std::set < CallbackRefPtr, CallbackSortFunction > | SortedCallbackRefSet |
Public Member Functions | |
| void | addCallback (const std::string ®istrant, Callback *cb) |
| void | setOptimizeStateSharing (bool value) |
| bool | isOptimizeStateSharing () const |
| void | addLayer (osgEarth::Layer *layer) |
| void | notifyNewLayer (osgEarth::Layer *layer) |
| void | notifyLayerOpened (osgEarth::Layer *layer) |
| void | notifyLayerClosed (osgEarth::Layer *layer) |
| bool | layerHasCallback (const osgEarth::Layer *layer, const std::string &className) |
| void | notifyPreMergeData (osgEarth::Layer *layer, osg::Node *node) |
| void | notifyNewData (osgEarth::Layer *layer, osg::Node *data) |
| void | notifyDataDeleted (osgEarth::Layer *layer, osg::Node *data) |
| DtDe & | getDe () |
Protected Types | |
| typedef osg::ref_ptr < osgEarth::SceneGraphCallback > | SceneGraphCallbackRefPtr |
| typedef boost::unordered_multimap < std::string, CallbackRefPtr > | FeatureDataCallbackMap |
| typedef std::pair < FeatureDataCallbackMap::iterator, FeatureDataCallbackMap::iterator > | RangeIterFeatureDataCallbacks |
| typedef std::pair < FeatureDataCallbackMap::const_iterator, FeatureDataCallbackMap::const_iterator > | ConstRangeIterFeatureDataCallbacks |
| typedef boost::unordered_map < std::string, SortedCallbackRefSet > | LayerToCallbackMap |
| typedef boost::unordered_map < std::string, std::vector < std::string > > | RegistrantToFeaturesMap |
| typedef boost::unordered_map < std::string, std::vector < std::string > >::iterator | RegistrantToFeaturesMapIter |
| typedef boost::unordered_map < osg::Node *, FeaturePageObserver * > | MapPagesToObservers |
Protected Member Functions | |
| DtOsgEarthFeatureDataBroker (osgEarth::MapNode *mapNode, DtDe &de) | |
| virtual | ~DtOsgEarthFeatureDataBroker () |
| bool | readFeatureNameRegistrationFile (const std::string &path, const std::string &filename) |
| std::string | getFeatureNameFromLayer (const osgEarth::Layer &layer) |
Protected Attributes | |
| osg::observer_ptr < osgEarth::MapNode > | myMapNode |
| osg::ref_ptr < osgEarth::MapCallback > | myMapCallback |
| std::set < SceneGraphCallbackRefPtr > | myOperations |
| DtDe & | myDe |
| bool | myShareState |
| OpenThreads::Mutex | myMapMutex |
| FeatureDataCallbackMap | myFeatureDataCallbacks |
| LayerToCallbackMap | myLayerToCallbackMap |
| SortedCallbackRefSet | myAllFeatureCallbacks |
| RegistrantToFeaturesMap | myRegistrantToFeaturesMap |
| boost::unordered_map< const osgEarth::Layer *, std::string > | myFeatureNameLookup |
| MapPagesToObservers | myMapPagesToObservers |
| DtOsgShaderManager & | myShaderManager |
Static Protected Attributes | |
| static const char * | theFeatureDataBrokerRegistrantToFeatureList |
Private Member Functions | |
| DtOsgEarthFeatureDataBroker (const DtOsgEarthFeatureDataBroker &other) | |
| DtOsgEarthFeatureDataBroker & | operator= (const DtOsgEarthFeatureDataBroker &other) |
Friends | |
| class | DtOsgEarthFeatureDataBrokerCreator |
| typedef std::set<CallbackRefPtr, CallbackSortFunction> makVrv::DtOsgEarthFeatureDataBroker::SortedCallbackRefSet |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Constructs a broker for the specified map node.
|
protectedvirtual |
destructor
|
private |
Copy Constructor not implemented – Copy Not Allowed.
|
private |
Assignment Operator Not implemented – Assignment Not Allowed.
| void makVrv::DtOsgEarthFeatureDataBroker::addCallback | ( | const std::string & | registrant, |
| Callback * | cb | ||
| ) |
| void makVrv::DtOsgEarthFeatureDataBroker::setOptimizeStateSharing | ( | bool | value | ) |
| bool makVrv::DtOsgEarthFeatureDataBroker::isOptimizeStateSharing | ( | ) | const |
| void makVrv::DtOsgEarthFeatureDataBroker::addLayer | ( | osgEarth::Layer * | layer | ) |
| void makVrv::DtOsgEarthFeatureDataBroker::notifyNewLayer | ( | osgEarth::Layer * | layer | ) |
| void makVrv::DtOsgEarthFeatureDataBroker::notifyLayerOpened | ( | osgEarth::Layer * | layer | ) |
| void makVrv::DtOsgEarthFeatureDataBroker::notifyLayerClosed | ( | osgEarth::Layer * | layer | ) |
| bool makVrv::DtOsgEarthFeatureDataBroker::layerHasCallback | ( | const osgEarth::Layer * | layer, |
| const std::string & | className | ||
| ) |
check to see if a particular layer has a particular callback installed. currently used by the indirect feature callback to know if the dynamic terrain installer is installed
| void makVrv::DtOsgEarthFeatureDataBroker::notifyPreMergeData | ( | osgEarth::Layer * | layer, |
| osg::Node * | node | ||
| ) |
| void makVrv::DtOsgEarthFeatureDataBroker::notifyNewData | ( | osgEarth::Layer * | layer, |
| osg::Node * | data | ||
| ) |
| void makVrv::DtOsgEarthFeatureDataBroker::notifyDataDeleted | ( | osgEarth::Layer * | layer, |
| osg::Node * | data | ||
| ) |
|
inline |
get the De
|
protected |
This method fills in myRegistrantToFeaturesMap, which tells which feature layers are of interest to which registrants. When a registrant calls addCallback, we add a callback for each feature layer listed in the map.
|
protected |
get the feaure name for this particular layer
|
friend |
friend class DtOsgEarthFeatureDataBrokerCreator so that it can be the only one who creates DtOsgEarthFeatureDataBrokers
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |