argos::CMedium Class Referenceabstract

#include <medium.h>

Inheritance diagram for argos::CMedium:
Collaboration diagram for argos::CMedium:

Public Types

typedef std::vector< CMedium * > TVector
 
typedef std::map< std::string, CMedium * > TMap
 

Public Member Functions

 CMedium ()
 
virtual ~CMedium ()
 
virtual void Init (TConfigurationNode &t_tree)
 Initialized the medium. More...
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
virtual void PostSpaceInit ()
 Executes extra initialization activities after the space has been initialized. More...
 
virtual void Update ()=0
 Updates the state of this medium. More...
 
const std::string & GetId () const
 Returns the id of this medium. More...
 
void SetId (const std::string &str_id)
 Sets the id of this medium. More...
 
CSpaceGetSpace ()
 Returns a reference to the ARGoS space. More...
 
- Public Member Functions inherited from argos::CBaseConfigurableResource
virtual ~CBaseConfigurableResource ()
 Class destructor. More...
 

Detailed Description

Definition at line 22 of file medium.h.

Member Typedef Documentation

typedef std::map<std::string, CMedium*> argos::CMedium::TMap

Definition at line 27 of file medium.h.

typedef std::vector<CMedium*> argos::CMedium::TVector

Definition at line 26 of file medium.h.

Constructor & Destructor Documentation

argos::CMedium::CMedium ( )
inline

Definition at line 31 of file medium.h.

virtual argos::CMedium::~CMedium ( )
inlinevirtual

Definition at line 32 of file medium.h.

Member Function Documentation

virtual void argos::CMedium::Destroy ( )
inlinevirtual

Undoes whatever was done by Init().

Implements argos::CBaseConfigurableResource.

Reimplemented in argos::CDirectionalLEDMedium, argos::CRadioMedium, argos::CTagMedium, argos::CRABMedium, and argos::CLEDMedium.

Definition at line 50 of file medium.h.

const std::string& argos::CMedium::GetId ( ) const
inline

Returns the id of this medium.

Returns
The id of this medium.

Definition at line 76 of file medium.h.

CSpace& argos::CMedium::GetSpace ( )
inline

Returns a reference to the ARGoS space.

Returns
A reference to the ARGoS space.

Definition at line 92 of file medium.h.

void argos::CMedium::Init ( TConfigurationNode t_tree)
virtual

Initialized the medium.

By default, this method parses the medium id. The order in which initialization takes place is:

Parameters
t_treethe base of the XML configuration tree to parse
Exceptions
CARGoSExceptionif an error occurs
See also
PostSpaceInitInit()
CSpace::Init()

Implements argos::CBaseConfigurableResource.

Reimplemented in argos::CDirectionalLEDMedium, argos::CRadioMedium, argos::CTagMedium, argos::CRABMedium, and argos::CLEDMedium.

Definition at line 16 of file medium.cpp.

virtual void argos::CMedium::PostSpaceInit ( )
inlinevirtual

Executes extra initialization activities after the space has been initialized.

By default, this method does nothing. The order in which initialization takes place is:

Exceptions
CARGoSExceptionif an error occurs
See also
Init()
CSpace::Init()

Reimplemented in argos::CDirectionalLEDMedium, argos::CRadioMedium, argos::CTagMedium, argos::CRABMedium, and argos::CLEDMedium.

Definition at line 65 of file medium.h.

virtual void argos::CMedium::Reset ( )
inlinevirtual

Resets the resource.

Implements argos::CBaseConfigurableResource.

Reimplemented in argos::CDirectionalLEDMedium, argos::CRadioMedium, argos::CTagMedium, argos::CRABMedium, and argos::CLEDMedium.

Definition at line 49 of file medium.h.

void argos::CMedium::SetId ( const std::string &  str_id)
inline

Sets the id of this medium.

Parameters
str_idThe id of this medium.

Definition at line 84 of file medium.h.

virtual void argos::CMedium::Update ( )
pure virtual