![]() |
VR-Forces Developer's Guide
|
A DtComponentSystem is a collection of DtSimComponents that are associated with each other. Calling tick() on the system results in tick() being called on all the components of the system. A system may also contain other systems.

Public Types | |
| typedef std::list< std::pair < DtSimComponent *, DtString > > | DtComponentPortList |
Public Attributes | |
| boost::signals2::signal< void()> | signal_destroyed |
Protected Member Functions | |
| virtual bool | createPsr () |
| void | removeCompatibilityPsrs () |
| virtual void | restore (DtSimComponentList *) |
Protected Attributes | |
| const DtComponentSystemDescriptor * | mySystemDescriptor |
| DtSimulationServices * | mySimManager |
| DtLocalObject * | myVrfObject |
| DtSimComponentNetwork * | myComponentNetwork |
| DtComponentSystemPSR * | myProcessStateRepository |
| DtComponentSystem * | myParentSystem |
| DtString | myPrintName |
| std::map< DtString, std::pair < genericAttributeProviderFunctionType, void * > > | myReadableAttributes |
| std::map< DtString, std::pair < genericAttributeSetterFunctionType, void * > > | myWritableAttributes |
| std::list< std::pair< DtString, DtVrfProcessStateRepositoryManager * > > | myAddedCompatibilityPsrs |
| DtPlatformLocalObjectFacade | myPlatformLocalObjectFacade |
Private Member Functions | |
| DtComponentSystem () | |
| DtComponentSystem (const DtComponentSystem &orig) | |
| DtComponentSystem & | operator= (const DtComponentSystem &orig) |
| typedef std::list< std::pair<DtSimComponent*, DtString> > DtComponentSystem::DtComponentPortList |
|
private |
Not Implemented.
|
private |
Not Implemented.
| DtComponentSystem::DtComponentSystem | ( | DtLocalObject * | owner, |
| DtSimulationServices * | simManager, | ||
| const DtComponentSystemDescriptor * | desc, | ||
| DtComponentSystem * | parentSystem | ||
| ) |
|
virtual |
|
private |
Not Implemented.
|
virtual |
Reimplemented in DtTopLevelComponentSystem.
|
virtual |
Creates the components and systems specified in the descriptor for the system. The first component is created with the specified priority, and priority is incremented for each component created. The next available priority value is return in priority.
| remoteOnly | If true, then only components configured for remote objects are created. |
|
virtual |
Calls DtSimComponent::postAddComponentsInit() on all contained components.
|
virtual |
Calls DtSimCompoennt::tick() on all contained components.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets the print name of the system. This function can be used by components that have customizable display names in their descriptors, e.g. the range ring names for guns. The customizable names may be important for identifying the system if more than one system of the same type is included on an entity.
|
virtual |
|
virtual |
|
virtual |
Finds a system within this system that matches the given print name. If this system matches, it is returned; otherwise, the systems in the component network are checked recursively.
|
virtual |
Finds a system within this system that matches the given name. This function tests the given name against the RW name rather than the print name of the system. If this system matches, it is returned; otherwise, the systems in the component network are checked recursively.
|
virtual |
Finds a system within this system that matches the given name. This tests the given name against the full name rather than the leaf name of the system. If this system matches, it s returned; otherwise, the systems in the component network are checked recursively.
|
virtual |
Adds the system's print name and the names of all subsystems in this system to the list in nameList.
|
virtual |
Provides a list of all of the systems, by print name, in this system.
virtual std::list<DtString> getSubsystemList();
|
virtual |
Within systems, connections are made from components to "system" or vice versa. This designates that as a public input/output to the system. External connections can be made to these named connections, which in turn result in a connection down to the actual component within the system. These methods take the system connection name and resolve it to the internal components and ports on those components. Each method fills the second parameter with a list of component pointers and port names on that component that should be connected to.
|
virtual |
Within systems, connections are made from components to "system" or vice versa. This designates that as a public input/output to the system. External connections can be made to these named connections, which in turn result in a connection down to the actual component within the system. These methods take the system connection name and resolve it to the internal components and ports on those components. Each method fills the second parameter with a list of component pointers and port names on that component that should be connected to.
|
virtual |
Enables/disables components/systems in the system.
|
virtual |
Enables/disables components/systems in the system.
|
virtual |
Check if the system is enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
|
virtual |
Check if the system is enabled, component's tick function will be called, otherwise it will not. Default is true (enabled).
|
virtual |
Check if the system can be disabled.
|
virtual |
Functions for defining system attribute functions, and getting attributes.Adds a function that will provide the value of the given attribute. The name-function pair is put in the map myReadableAttributes. The function should create a new DtReaderWriter of the appropriate sub-type (e.g., DtRwInt, DtRwString, etc.) and return a pointer to it. Users of this data are responsible for deleting it. Controllers should call, in their init functions, these functions to register attributes the controllers support. The call in the controller will use their mySystem object.
If there was already a function registered for the same attribute, this add... function will do nothing; i.e. this is not an error. Thus some care must be used in defining attribute names, but usually the registrations work as desired. For example, in a movement system there may be several task controllers all of which use a move-along-route controller that provides a next-waypoint-index attribute (e.g. move-along, patrol-route). If the move-along controller registers to provide the attribute, all derived controllers will fail when they register. However, if all these controllers get the attribute data from the same PSR, the correct information will be returned for patrol-route even if move-along provides the attribute value.
|
virtual |
Similar to above, but adds a function to myWritableAttributes. The function registered here should take a Reader-Writer value and check its type before using its value. It should return True if there is an error.
|
virtual |
Retrieves the attribute value (by running the function mapped to this attribute).The status of the get is returned in the error parameter.
|
virtual |
Sets the attribute value (by running the function mapped to this attribute). The value is passed in as a Reader-Writer. This function does not delete the RW.
Note that setting an attribute can be used to trigger actions.
|
virtual |
Gets the names of all of the attributes that have been registered by provider (i.e., Get) functions for this system.
|
virtual |
Returns the process state repository used by this system.
|
virtual |
Reimplemented in DtTopLevelComponentSystem.
|
protectedvirtual |
Creates the PSR and sets it to myProcessStateRepository.
|
protected |
Non-virtual because it is called by the destructor.
|
protectedvirtual |
Iterates over all components and calls onRestore on them.
|
mutable |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
A customized print name, if one was specified. Initialized by a component, or defaults to print name in metadata.
|
protected |
Map of attribute-names to provider-functions.
|
protected |
|
protected |
This list is kept so the compatibility PSRs can be removed upon destruction.
|
protected |