argos::CRABMedium Class Reference

#include <rab_medium.h>

Inheritance diagram for argos::CRABMedium:
Collaboration diagram for argos::CRABMedium:

Public Member Functions

 CRABMedium ()
 Class constructor. More...
 
virtual ~CRABMedium ()
 Class destructor. More...
 
virtual void Init (TConfigurationNode &t_tree)
 Initialized the medium. More...
 
virtual void PostSpaceInit ()
 Executes extra initialization activities after the space has been initialized. More...
 
virtual void Reset ()
 Resets the resource. More...
 
virtual void Destroy ()
 Undoes whatever was done by Init(). More...
 
virtual void Update ()
 Updates the state of this medium. More...
 
void AddEntity (CRABEquippedEntity &c_entity)
 Adds the specified entity to the list of managed entities. More...
 
void RemoveEntity (CRABEquippedEntity &c_entity)
 Removes the specified entity from the list of managed entities. More...
 
const CSet< CRABEquippedEntity *, SEntityComparator > & GetRABsCommunicatingWith (CRABEquippedEntity &c_entity) const
 Returns an immutable vector of RAB entities that can communicated with the given entity. More...
 
- Public Member Functions inherited from argos::CMedium
 CMedium ()
 
virtual ~CMedium ()
 
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...
 

Additional Inherited Members

- Public Types inherited from argos::CMedium
typedef std::vector< CMedium * > TVector
 
typedef std::map< std::string, CMedium * > TMap
 

Detailed Description

Definition at line 16 of file rab_medium.h.

Constructor & Destructor Documentation

◆ CRABMedium()

argos::CRABMedium::CRABMedium ( )

Class constructor.

Definition at line 14 of file rab_medium.cpp.

◆ ~CRABMedium()

argos::CRABMedium::~CRABMedium ( )
virtual

Class destructor.

Definition at line 21 of file rab_medium.cpp.

Member Function Documentation

◆ AddEntity()

void argos::CRABMedium::AddEntity ( CRABEquippedEntity c_entity)

Adds the specified entity to the list of managed entities.

Parameters
c_entityThe entity to add.

Definition at line 202 of file rab_medium.cpp.

◆ Destroy()

void argos::CRABMedium::Destroy ( )
virtual

Undoes whatever was done by Init().

Reimplemented from argos::CMedium.

Definition at line 94 of file rab_medium.cpp.

◆ GetRABsCommunicatingWith()

const CSet< CRABEquippedEntity *, SEntityComparator > & argos::CRABMedium::GetRABsCommunicatingWith ( CRABEquippedEntity c_entity) const

Returns an immutable vector of RAB entities that can communicated with the given entity.

Parameters
c_entityThe wanted entity.
Returns
An immutable vector of RAB entities that can communicated with the given entity.
Exceptions
CARGoSExceptionIf the passed entity is not managed by this medium.

Definition at line 224 of file rab_medium.cpp.

◆ Init()

void argos::CRABMedium::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()

Reimplemented from argos::CMedium.

Definition at line 27 of file rab_medium.cpp.

◆ PostSpaceInit()

void argos::CRABMedium::PostSpaceInit ( )
virtual

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 from argos::CMedium.

Definition at line 73 of file rab_medium.cpp.

◆ RemoveEntity()

void argos::CRABMedium::RemoveEntity ( CRABEquippedEntity c_entity)

Removes the specified entity from the list of managed entities.

Parameters
c_entityThe entity to remove.

Definition at line 213 of file rab_medium.cpp.

◆ Reset()

void argos::CRABMedium::Reset ( )
virtual

Resets the resource.

Reimplemented from argos::CMedium.

Definition at line 80 of file rab_medium.cpp.

◆ Update()

void argos::CRABMedium::Update ( )
virtual

Updates the state of this medium.

Implements argos::CMedium.

Definition at line 110 of file rab_medium.cpp.