VR-Engage  2.3
Loading...
Searching...
No Matches
DtVortexInterfaceElement< T > Class Template Reference

Detailed Description

template<typename T>
class DtVortexInterfaceElement< T >

Implements the DtVortexInterfaceBaseElement interface for specific port types. Handles the connection between VR-Forces ports and Vortex fields.

#include <vortexInterface.h>

Inheritance diagram for DtVortexInterfaceElement< T >:
[legend]

Public Member Functions

 DtVortexInterfaceElement (std::string portName, const std::string &vortexName)
 
virtual ~DtVortexInterfaceElement () override
 
virtual void update () override
 
T * port ()
 
virtual void setField (VxData::FieldBase *field) override
 
virtual VxData::FieldBase * getField () const override
 
virtual std::string portName () override
 
virtual std::string getFieldName () override
 
virtual VxData::DelegateConnection addFieldObserver (const DtVortexInterfaceFieldCallback &callback) override
 
- Public Member Functions inherited from DtVortexInterfaceBaseElement
 DtVortexInterfaceBaseElement ()
 
virtual ~DtVortexInterfaceBaseElement ()
 

Protected Attributes

T * myPort
 
VxData::FieldBase * myVortexField
 
std::string myPortName
 
std::string myFieldName
 

Constructor & Destructor Documentation

◆ DtVortexInterfaceElement()

template<typename T>
DtVortexInterfaceElement< T >::DtVortexInterfaceElement ( std::string portName,
const std::string & vortexName )

Constructor.

Creates and initializes the port with the specified names.

Parameters
portNameName of the port
vortexNameName of the Vortex field

References portName().

Referenced by DtVortexInterfaceVectorElement< T >::DtVortexInterfaceVectorElement().

◆ ~DtVortexInterfaceElement()

template<typename T>
virtual DtVortexInterfaceElement< T >::~DtVortexInterfaceElement ( )
overridevirtual

Destructor.

Cleans up resources.

Member Function Documentation

◆ update()

template<typename T>
virtual void DtVortexInterfaceElement< T >::update ( )
overridevirtual

Updates the interface element.

Transfers data between the port and the Vortex field. The implementation of this method is specialized for different port types.

Implements DtVortexInterfaceBaseElement.

Reimplemented in DtVortexInterfaceVectorElement< T >.

◆ port()

template<typename T>
T * DtVortexInterfaceElement< T >::port ( )
inline

Gets the port.

Provides access to the underlying port object.

Returns
Pointer to the port

References myPort.

◆ setField()

template<typename T>
void DtVortexInterfaceElement< T >::setField ( VxData::FieldBase * field)
overridevirtual

Sets the Vortex field.

Associates a Vortex field with this interface element.

Parameters
fieldPointer to the Vortex field
fieldPointer to the Vortex field

Implements DtVortexInterfaceBaseElement.

References myVortexField.

◆ getField()

template<typename T>
VxData::FieldBase * DtVortexInterfaceElement< T >::getField ( ) const
overridevirtual

Gets the Vortex field.

Returns
Pointer to the Vortex field

Implements DtVortexInterfaceBaseElement.

References myVortexField.

◆ portName()

template<typename T>
std::string DtVortexInterfaceElement< T >::portName ( )
overridevirtual

Gets the port name.

Returns
The name of the port

Implements DtVortexInterfaceBaseElement.

References myPortName.

Referenced by DtVortexInterfaceElement(), and DtVortexInterfaceVectorElement< T >::DtVortexInterfaceVectorElement().

◆ getFieldName()

template<typename T>
std::string DtVortexInterfaceElement< T >::getFieldName ( )
overridevirtual

Gets the field name.

Returns
The name of the field

Implements DtVortexInterfaceBaseElement.

References myFieldName.

◆ addFieldObserver()

template<typename T>
virtual VxData::DelegateConnection DtVortexInterfaceElement< T >::addFieldObserver ( const DtVortexInterfaceFieldCallback & callback)
overridevirtual

Adds an observer to this element's Vortex field.

Parameters
callbackFunction called when the field changes
Returns
Delegate connection that can disconnect or destroy the observer

Implements DtVortexInterfaceBaseElement.

Member Data Documentation

◆ myPort

template<typename T>
T* DtVortexInterfaceElement< T >::myPort
protected

Pointer to the port.

Referenced by port().

◆ myVortexField

template<typename T>
VxData::FieldBase* DtVortexInterfaceElement< T >::myVortexField
protected

Pointer to the Vortex field.

Referenced by getField(), and setField().

◆ myPortName

template<typename T>
std::string DtVortexInterfaceElement< T >::myPortName
protected

Name of the port.

Referenced by portName().

◆ myFieldName

template<typename T>
std::string DtVortexInterfaceElement< T >::myFieldName
protected

Name of the field.

Referenced by getFieldName().


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