20#pragma warning(disable : 4100)
21#pragma warning(disable : 4244)
23#include <vrfobjcore/vrfObjectStateRepository.h>
24#include <vlutil/vlString.h>
28#include <readerWriter/rwProperties.h>
29#include <readerWriter/rwPropertiesMap.h>
30#include <readerWriter/propertyInterface.h>
37class DtSimulationServices;
38class DtComponentDescriptor;
39class DtReaderWriterRegistry;
50template <
typename ComponentBase>
63 DtVreSimComponent(
const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
64 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0)
65 : ComponentBase(name, owner, simManager, desc, parentRegistry)
85 DtRwProperties& props =
const_cast<DtRwProperties&
>(this->entity()->nextFrameStateProperties());
94 DtPropertyInterface* item = rolesMap->findItem(role.c_str());
99 for (
const DtRwPropertiesMap::Key& key : rolesMap->allKeys())
101 DtPropertyInterface* item = rolesMap->findItem(key.string());
118 std::vector<std::string> stationsOut;
120 DtRwProperties& props =
const_cast<DtRwProperties&
>(this->entity()->nextFrameStateProperties());
127 DtPropertyInterface* item = rolesMap->findItem(role.c_str());
139 std::vector<std::string> roles;
141 DtRwProperties& props =
const_cast<DtRwProperties&
>(this->entity()->nextFrameStateProperties());
148 for (
const DtRwPropertiesMap::Key& key : rolesMap->allKeys())
150 DtPropertyInterface* item = rolesMap->findItem(key.string());
153 roles.push_back(key.string().stdString());
170 DtString name = this->parentSystem()->fullName();
171 if (name.findString(
"base-system") == 0)
175 name.snipBackToFirst(
'.');
std::vector< std::string > engagedRoles() const
Returns the names of all roles occupied by at least one station.
Definition vreSimComponent.h:137
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
Definition vreSimComponent.h:63
DtVreSimComponent()
Default constructor (not implemented)
DtVreSimComponent(const DtVreSimComponent &other)
Copy constructor (not implemented)
virtual ~DtVreSimComponent()
Virtual destructor.
Definition vreSimComponent.h:73
DtString entitySystemName() const
Gets the entity's top-level system name.
Definition vreSimComponent.h:168
bool isPlayerControlled(const std::string &role="") const
Checks if the entity is player controlled.
Definition vreSimComponent.h:83
DtVreSimComponent & operator=(const DtVreSimComponent &other)
Assignment operator (not implemented)
std::vector< std::string > controllingStations(const std::string &role) const
Returns the identifiers of the stations controlling a given role.
Definition vreSimComponent.h:116
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
!
Definition glsVreMessageUtil.h:50
UTIL_DLL bool statePropertyHasRoleStations(const DtPropertyInterface *property)
Determines whether a role-station list contains any station entries.
constexpr const char DtRolesStatePropertyName[]
State property carrying direct role assignments.
Definition vreStatePropertiesUtil.h:26
UTIL_DLL void appendStatePropertyRoleStationIds(const DtPropertyInterface *property, std::vector< std::string > &valuesOut)
Appends all station identifiers from a role-station list to an output vector.
Utility functions for VR-Engage runtime state properties.