![]() |
VR-Forces Developer's Guide
|
The element attribute manager is used to provide access to element attribute data. It includes maps between the display name attribute and element id to make it easier to find an element by name. However, note that these maps only valid if display names are unique (and that is not the case internally for the VRF GUI). The DtElementData class creates and owns this manager using the.
Public Types | |
| typedef std::vector < DtElementAttribute * > | AttributeList |
| typedef std::pair < DtElementEntry *, AttributeList > | EntryAttributes |
| typedef std::vector < EntryAttributes > | EntryAttributesList |
Public Attributes | |
| boost::signalslib::signal < void(const EntryAttributesList &) > | signal_attributesChanged |
Protected Member Functions | |
| DtElementAttributeManager (DtDe &de) | |
| virtual void | applyElementAttributeChanges (const DtElementChanges::ElementAttributeMap &attributeChanges) |
| virtual void | applyElementRemovals (const DtElementChanges::UniqueIdList &elementsRemoved) |
| virtual void | addToElementIdDisplayNameMaps (DtElementID elementId, const std::string &displayName) |
| virtual void | removeFromElementIdDisplayNameMaps (DtElementID elementId) |
| virtual void | reportElementEntryNotFound (DtElementID elementId) const |
Protected Attributes | |
| DtDe & | myDe |
| ElementIdToDisplayNameMap::const_iterator | myMutatableDisplayNameIterator |
Private Member Functions | |
| DtElementAttributeManager ()=delete | |
| DtElementAttributeManager (const DtElementAttributeManager &orig)=delete | |
| DtElementAttributeManager & | operator= (const DtElementAttributeManager &rhs)=delete |
Friends | |
| class | DtElementAttributeManagerCreator |
| class | DtElementData |
| typedef std::unordered_map < std::string, DtElementID > | DisplayNameToElementIdMap |
| DisplayNameToElementIdMap | myDisplayNameToElementIdMap |
| typedef std::unordered_map < DtElementID, std::string > | ElementIdToDisplayNameMap |
| ElementIdToDisplayNameMap | myElementIdToDisplayNameMap |
| typedef std::vector<DtElementAttribute*> makVrv::DtElementAttributeManager::AttributeList |
Define the type used to signal changes to one or more attributes for one or more elements.
| typedef std::pair<DtElementEntry*, AttributeList> makVrv::DtElementAttributeManager::EntryAttributes |
Define the type used to signal changes to one or more attributes for one or more elements.
| typedef std::vector<EntryAttributes> makVrv::DtElementAttributeManager::EntryAttributesList |
Define the type used to signal changes to one or more attributes for one or more elements.
|
protected |
|
protected |
|
protected |
CTOR. This constructor is protected, and can only be called by DtElementAttributeManagerCreator, which is friended.
|
virtual |
DTOR.
|
privatedelete |
Unimplemented Default CTOR.
|
privatedelete |
Unimplemented Default Copy Constructor.
|
virtual |
Get the element type from given an element id or element entry.
|
virtual |
Get the element type from given an element id or element entry.
|
virtual |
Optional Attributes.
Get the display name from an element id. Returns false if no entry is found for the element id in the element id to display name map. For a VR-Link connection, the display name will be the marking text; for a CIGI connection, the display name will be "CIGI Entity <n>" where <n> is the entity id. Other drivers may choose different display names.
|
virtual |
Get the display name from an element entry. Returns false if no entry is found for the element id in the element id to display name map for that element entry's id. For a VR-Link connection, the display name will be the marking text; for a CIGI connection, the display name will be "CIGI Entity <n>" where <n> is the entity id. Other drivers may choose different display names.
|
virtual |
Get the 'object id' from an element entry. Returns false if no connection object id attribute is found for the element entry. Drivers can manage there own object id spaces and report them in string form. VR-Link drivers will report DIS/RPR ids of the form "site:app:entity"; CIGI drivers use a simple integer scheme. Other drivers may optionally create other ID spaces.
|
virtual |
Get the 'object id' from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the 'object type' from an element entry. Returns false if no connection object type attribute is found for the element entry. Drivers can manage their own object type spaces. VR-Link drivers will return DIS/RPR entity type tuples in string form as defined by the DIS and RPR standards. CIGI drivers use the simple integer scheme defined by the CIGI standard. Other drivers may optionally chose to define and use their own object types.
|
virtual |
Get the 'object type' from an element id Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the 'element subtype' from an element entry Returns false if no subtype attribute is found for the element entry. This is an optional 'subtype' to the element type above. Currently used for display purposes, it subdivides the DtElementEntry::Aggregate types into DtElementAttributes::Friendly, DtElementAttributes::Opposing, DtElementAttributes::Neutral, and DtElementAttributes::Other; and the DtElementEntry::Entity types into DtElementAttributes::Friendly, DtElementAttributes::FriendlyMunitions, DtElementAttributes::Opposing, DtElementAttributes::OpposingMunitions, DtElementAttributes::Neutral, DtElementAttributes::NeutralMunitions, DtElementAttributes::Other, and DtElementAttributes::OtherMunitions.
|
virtual |
Get the 'element subype' from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the Element Definition name from an element entry. Returns false if no Element Definition name attribute is found for the element entry. Currently only VR-Link drivers map entities to Element Definitions, so the attribute is only reported by them.
|
virtual |
Get the Element Definition name from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the Driver type from an element entry. Returns false if no Driver type attribute is found for the element entry. Currently the VR-Link Drivers, CIGI Driver, Input Driver, and Scene Driver report this attribute (as well as some examples).
|
virtual |
Get the Driver type from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the object visibility from an element entry. Returns false if no visibility attribute is found for the element entry.
|
virtual |
Get the object visibility from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the indicator visibility from an element entry. Returns false if no indicator visibility attribute is found for the element entry.
|
virtual |
Get the indicator visibility from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get whether height above terrain lines are enabled from an element entry. Returns false if no height above terrain lines attribute is found for the element entry.
|
virtual |
Get whether height above terrain lines are enabled from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the (show) indicators on select attribute from an element entry. Returns false if no indicators on select attribute is found for the element entry. This attribute is reported by the VR-Link drivers for tactical graphics.
|
virtual |
Get the indicators on select attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the overlay name attribute from an element entry. Returns false if no overlay name attribute is found for the element entry. This attribute is reported by the VR-Link drivers for tactical graphics that are placed on overlays.
|
virtual |
Get the overlay name attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the DIS/RPR entity type kind and category attribute from an element entry. Returns false if no kind and category attribute is found for the element entry. This attribute is reported by the VR-Link drivers for tactical graphics. It is then used to create the equivalent of subtypes for tactical graphics. At some point this should be replaced by the object subtype mechanism.
|
virtual |
Get the Get the DIS/RPR entity type kind and category attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the local scale enabled attribute from an element entry. Returns false if no local scale enabled attribute is found for the element entry. This attribute is reported by observers when attached to an entity element in SpaceFollow mode.
|
virtual |
Get the local scale enabled attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the local scale amount attribute from an element entry. Returns false if no local scale amount attribute is found for the element entry. This attribute is reported by observers when attached to an entity element in SpaceFollow mode.
|
virtual |
Get the local scale amount attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the damage state attribute from an element entry. Returns false if no damage state attribute is found for the element entry. This attribute is reported by VR-Link drivers for entities and elements whenever entity or aggregate element damage state is set from the DIS or RPR connection. It will have values 0-3 as defined by the DIS / RPR standards.
|
virtual |
Get the damage state attribute from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the display unit collection name from an element entry. Returns false if no display unit collection name attribute is found for the element entry. This attribute is reported by the VR-Vantage DtEntityKinStateVisualizer whenever an entity element display unit collection name is set from its visualizer definition.
|
virtual |
Get the display unit collection name from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Get the light point group collection name from an element entry. Returns false if no light point group collection name attribute is found for the element entry.
|
virtual |
Get the light point group collection name from an element id. Returns false if no entry for the element is found (and raises an error). Then calls and returns the value from.
|
virtual |
Iterate through element ID / displayName pairs These methods provide a mechanism to inspect all of the entries in the Element Id to Display Name map (and therefore also the Display Name to Element Id map). N.B. All of these methods require the name/id maps to be valid, which means unique display names must be used. Do not use these routines internally to VRV or the VRF GUI, because the VRF GUI violates that restriction.
Set the display name map iterator to the beginning of the map
|
virtual |
Get the current element id and display name for the iterator; returns true if values are returned, false if the list is empty or at the end.
|
virtual |
Find the element id given a display name. Returns false if no entry is found in the displayName to element id map for the specified element.
|
privatedelete |
Unimplemented Default assignment operator.
|
protectedvirtual |
Apply all new attribute data reported by a driver in a frame.
|
protectedvirtual |
Remove all attribute data associated with element removals reported by a driver in a frame.
|
protectedvirtual |
Associate a display name with an element. The assumption is that display names are unique (and that will be enforced in the maps).
|
protectedvirtual |
Remove the entries from the display name to element id and vice versa with this element ID.
|
protectedvirtual |
Helper function to raise a DtDeError when something requests an attribute for an element and no Element Entry is found with that element ID.
|
friend |
Friend the creator so it can use the constructor.
|
friend |
friend DtElementData so it can pass attribute changes and element removals to the manager
| boost::signalslib::signal< void(const EntryAttributesList&) > makVrv::DtElementAttributeManager::signal_attributesChanged |
Signal raised when attributes are changed. The EntryAttributesList contains all the attribute additions/changes for all elements from one driver in a frame.
|
protected |
|
protected |
|
protected |
|
mutableprotected |
Mutable iterator used on by startNamedElementIteration / getNextElementIdAndDisplayName.