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

◆ TMap

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

Definition at line 27 of file medium.h.

◆ TVector

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

Definition at line 26 of file medium.h.

Constructor & Destructor Documentation

◆ CMedium()

argos::CMedium::CMedium ( )
inline

Definition at line 31 of file medium.h.

◆ ~CMedium()

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

Definition at line 32 of file medium.h.

Member Function Documentation

◆ Destroy()

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

Undoes whatever was done by Init().

Implements argos::CBaseConfigurableResource.

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

Definition at line 50 of file medium.h.

◆ GetId()

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.

◆ GetSpace()

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.

◆ Init()

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::CTagMedium, argos::CRadioMedium, argos::CRABMedium, argos::CLEDMedium, and argos::CDirectionalLEDMedium.

Definition at line 16 of file medium.cpp.

◆ PostSpaceInit()

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::CTagMedium, argos::CRadioMedium, argos::CRABMedium, argos::CLEDMedium, and argos::CDirectionalLEDMedium.

Definition at line 65 of file medium.h.

◆ Reset()

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

Resets the resource.

Implements argos::CBaseConfigurableResource.

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

Definition at line 49 of file medium.h.

◆ SetId()

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.

◆ Update()

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