MIRA
Public Member Functions | Protected Attributes | List of all members
ChannelPropertyBase Class Referenceabstract

Base class for ChannelProperty template class. More...

#include <visualization/ChannelProperty.h>

Inheritance diagram for ChannelPropertyBase:
Inheritance graph
[legend]

Public Member Functions

 ChannelPropertyBase ()
 
virtual ~ChannelPropertyBase ()
 
const std::string & getID () const
 Returns the channelID that was set by the user. More...
 
void setName (const std::string &name)
 Sets the name of the property. More...
 
const std::string & getName () const
 Returns the name of the property. More...
 
virtual bool isValid () const =0
 Returns true, if an existing channel is set. Must be implemented in derived class. More...
 
virtual uint32 getDataUpdateCount () const =0
 Returns the number of data updates the channel has received. More...
 
virtual std::list< std::pair< std::string, Typename > > getAvailableChannels ()=0
 Returns list of (channelID,typename) pairs containing the channels that match the desired type. More...
 
void setOptional ()
 For internal use only. More...
 
bool isOptional () const
 For internal use only. More...
 
virtual void update ()=0
 Tell the property to update the assigned channel. More...
 
virtual void set (const std::string &id, IAuthorityProvider *authorityProvider)
 Sets the channelID and a necessary authority provider that is used to obtain the authority for subscribing the set channel. More...
 

Protected Attributes

std::string mName
 
std::string mChannelID
 
IAuthorityProvidermAuthorityProvider
 
bool mOptional
 

Detailed Description

Base class for ChannelProperty template class.

Constructor & Destructor Documentation

◆ ChannelPropertyBase()

ChannelPropertyBase ( )
inline

◆ ~ChannelPropertyBase()

virtual ~ChannelPropertyBase ( )
inlinevirtual

Member Function Documentation

◆ getID()

const std::string& getID ( ) const
inline

Returns the channelID that was set by the user.

◆ setName()

void setName ( const std::string &  name)
inline

Sets the name of the property.

◆ getName()

const std::string& getName ( void  ) const
inline

Returns the name of the property.

◆ isValid()

virtual bool isValid ( ) const
pure virtual

Returns true, if an existing channel is set. Must be implemented in derived class.

Implemented in ChannelProperty< T >, and ChannelProperty< float >.

◆ getDataUpdateCount()

virtual uint32 getDataUpdateCount ( ) const
pure virtual

Returns the number of data updates the channel has received.

Implemented in ChannelProperty< T >, and ChannelProperty< float >.

◆ getAvailableChannels()

virtual std::list<std::pair<std::string, Typename> > getAvailableChannels ( )
pure virtual

Returns list of (channelID,typename) pairs containing the channels that match the desired type.

Must be implemented in derived class.

Implemented in ChannelProperty< T >, and ChannelProperty< float >.

◆ setOptional()

void setOptional ( )
inline

For internal use only.

◆ isOptional()

bool isOptional ( ) const
inline

For internal use only.

◆ update()

virtual void update ( )
pure virtual

Tell the property to update the assigned channel.

Exceptions
XRuntimeIf no channel is set or if the channel does not exist.

Implemented in ChannelProperty< T >, and ChannelProperty< float >.

◆ set()

virtual void set ( const std::string &  id,
IAuthorityProvider authorityProvider 
)
inlinevirtual

Sets the channelID and a necessary authority provider that is used to obtain the authority for subscribing the set channel.

Reimplemented in ChannelProperty< T >, and ChannelProperty< float >.

Member Data Documentation

◆ mName

std::string mName
protected

◆ mChannelID

std::string mChannelID
protected

◆ mAuthorityProvider

IAuthorityProvider* mAuthorityProvider
protected

◆ mOptional

bool mOptional
protected

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