WSF
WsfSimpleComponentT< COMPONENT_TYPE > Class Template Reference

#include <WsfSimpleComponent.hpp>

Inheritance diagram for WsfSimpleComponentT< COMPONENT_TYPE >:
Collaboration diagram for WsfSimpleComponentT< COMPONENT_TYPE >:

Public Member Functions

 WsfSimpleComponentT ()=default
 Empty constructor for serialization.
 WsfSimpleComponentT (int aRole, WsfStringId aName)
 WsfSimpleComponentT (int aRole)
 WsfSimpleComponentT (WsfStringId aName)
 WsfSimpleComponentT (const WsfSimpleComponentT &aSrc)
WsfSimpleComponentToperator= (const WsfSimpleComponentT &aRhs)
 ~WsfSimpleComponentT () override=default
Public Member Functions inherited from WsfNamed
 WsfNamed ()
 WsfNamed (WsfStringId aName)
 WsfNamed (const WsfNamed &)=default
WsfNamedoperator= (const WsfNamed &)=default
virtual ~WsfNamed ()=default
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Implementation of those routines that can be provided by this class.

int mRoles [2]
WsfStringId GetComponentName () const override
const int * GetComponentRoles () const override

Detailed Description

template<typename COMPONENT_TYPE>
class WsfSimpleComponentT< COMPONENT_TYPE >

A class template for a simple, single-role component that is not a WsfObject. Deriving from this class provides two of the four abstract methods required by WsfComponent. The derived class need only provide CloneComponent and QueryInterface, and if needed, ComponentParentChange (if the component requires notification of being attached to a component list.)

Typical uses are for things like 'extension' components (e.g.: WsfDisExtension and WsfDisPlatformComponent, WsfExtInterfaceComponent, WsfTaskManagerComponent) and simple components that don't utilize type-lists (e.g. WsfCommandChain, WsfGeoPoint and WsfTaskManager).

This class derives from WsfNamed, which provides the name attribute and the methods GetName(Id)/SetName. This makes it mutually exclusive with things that require WsfObject.

Constructor & Destructor Documentation

◆ WsfSimpleComponentT() [1/5]

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::WsfSimpleComponentT ( )
default

Empty constructor for serialization.

◆ WsfSimpleComponentT() [2/5]

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::WsfSimpleComponentT ( int aRole,
WsfStringId aName )
inline

Construct the a role and a name.

Parameters
aRoleThe role of the component.
aNameThe name of the component.

◆ WsfSimpleComponentT() [3/5]

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::WsfSimpleComponentT ( int aRole)
inlineexplicit

Construct with only a role.

Parameters
aRoleThe role of the component. With this form all components in a list must have a unique role.

◆ WsfSimpleComponentT() [4/5]

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::WsfSimpleComponentT ( WsfStringId aName)
inline

Construct with only a name. With this form all components in a list must have a unique name.

◆ WsfSimpleComponentT() [5/5]

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::WsfSimpleComponentT ( const WsfSimpleComponentT< COMPONENT_TYPE > & aSrc)
inline

◆ ~WsfSimpleComponentT()

template<typename COMPONENT_TYPE>
WsfSimpleComponentT< COMPONENT_TYPE >::~WsfSimpleComponentT ( )
overridedefault

Member Function Documentation

◆ GetComponentName()

template<typename COMPONENT_TYPE>
WsfStringId WsfSimpleComponentT< COMPONENT_TYPE >::GetComponentName ( ) const
inlineoverride

◆ GetComponentRoles()

template<typename COMPONENT_TYPE>
const int * WsfSimpleComponentT< COMPONENT_TYPE >::GetComponentRoles ( ) const
inlineoverride

◆ operator=()

template<typename COMPONENT_TYPE>
WsfSimpleComponentT & WsfSimpleComponentT< COMPONENT_TYPE >::operator= ( const WsfSimpleComponentT< COMPONENT_TYPE > & aRhs)
inline

Member Data Documentation

◆ mRoles


The documentation for this class was generated from the following file:
Copyrights Multiple, All Rights Reserved