VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtAttributeProviderComponent Class Reference

Detailed Description

The DtAttributeProviderComponent exists to provide system attributes in a lightweight component. This class does all its work in the init() function, so it should be configured with is-enabled False, so its tick function is never called. See vrfobjcore/componentSystem.h for information on system attributes.

#include <attributeProviderComponent.h>

Inheritance diagram for makVre::DtAttributeProviderComponent:
[legend]

Classes

class  DtAttributeProvider
 

Public Member Functions

 DtAttributeProviderComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtAttributeProviderComponent () override
 
virtual bool init () override
 
virtual const char * type () const override
 

Static Public Member Functions

static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 

Protected Attributes

std::vector< DtAttributeProvider * > myProviders
 

Private Member Functions

 DtAttributeProviderComponent ()
 
 DtAttributeProviderComponent (const DtAttributeProviderComponent &orig)
 
const DtAttributeProviderComponentoperator= (const DtAttributeProviderComponent &orig)
 

Constructor & Destructor Documentation

◆ DtAttributeProviderComponent() [1/3]

makVre::DtAttributeProviderComponent::DtAttributeProviderComponent ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

Referenced by DtAttributeProviderComponent(), and operator=().

◆ DtAttributeProviderComponent() [2/3]

makVre::DtAttributeProviderComponent::DtAttributeProviderComponent ( const DtAttributeProviderComponent & orig)
private

Copy constructor (not implemented)

Copy constructor is private and not implemented to prevent copy construction.

References DtAttributeProviderComponent().

◆ DtAttributeProviderComponent() [3/3]

makVre::DtAttributeProviderComponent::DtAttributeProviderComponent ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality

Creates a new attribute provider component with the specified parameters.

◆ ~DtAttributeProviderComponent()

virtual makVre::DtAttributeProviderComponent::~DtAttributeProviderComponent ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the attribute provider component.

Member Function Documentation

◆ operator=()

const DtAttributeProviderComponent & makVre::DtAttributeProviderComponent::operator= ( const DtAttributeProviderComponent & orig)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtAttributeProviderComponent().

◆ init()

virtual bool makVre::DtAttributeProviderComponent::init ( )
overridevirtual

Initializes the component.

Returns
True if initialization is successful, false otherwise

Gets attributes to add from descriptor and installs a new DtAttributeProvider for each one.

◆ type()

virtual const char * makVre::DtAttributeProviderComponent::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtAttributeProviderComponentType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

◆ creator()

static DtSimComponent * makVre::DtAttributeProviderComponent::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc,
DtReaderWriterRegistry * parentRegistry )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.

Member Data Documentation

◆ myProviders

std::vector<DtAttributeProvider*> makVre::DtAttributeProviderComponent::myProviders
protected

Collection of attribute providers.

A provider is created for each key-value pair in the descriptor. These are registered with the system via addAttributeProviderFunction.


The documentation for this class was generated from the following file: