tag_medium.h
Go to the documentation of this file.
1 
7 #ifndef TAG_MEDIUM_H
8 #define TAG_MEDIUM_H
9 
10 namespace argos {
11  class CTagMedium;
12  class CTagEntity;
13 }
14 
15 #include <argos3/core/simulator/medium/medium.h>
16 #include <argos3/core/simulator/space/positional_indices/positional_index.h>
17 #include <argos3/plugins/simulator/entities/tag_entity.h>
18 
19 namespace argos {
20 
21  class CTagMedium : public CMedium {
22 
23  public:
24 
29  m_pcTagEntityIndex(nullptr),
30  m_pcTagEntityGridUpdateOperation(nullptr) {}
31 
35  virtual ~CTagMedium() {}
36 
37  virtual void Init(TConfigurationNode& t_tree);
38  virtual void PostSpaceInit();
39  virtual void Reset();
40  virtual void Destroy();
41  virtual void Update();
42 
47  void AddEntity(CTagEntity& c_entity);
48 
53  void RemoveEntity(CTagEntity& c_entity);
54 
60  return *m_pcTagEntityIndex;
61  }
62 
63  private:
64 
66  CPositionalIndex<CTagEntity>* m_pcTagEntityIndex;
67 
69  CTagEntityGridUpdater* m_pcTagEntityGridUpdateOperation;
70 
71  };
72 
73 }
74 
75 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
A data structure that contains positional entities.
virtual void Destroy()
Undoes whatever was done by Init().
Definition: tag_medium.cpp:77
void AddEntity(CTagEntity &c_entity)
Adds the specified entity to the list of managed entities.
Definition: tag_medium.cpp:94
virtual void Reset()
Resets the resource.
Definition: tag_medium.cpp:70
CTagMedium()
Class constructor.
Definition: tag_medium.h:28
virtual ~CTagMedium()
Class destructor.
Definition: tag_medium.h:35
virtual void Update()
Updates the state of this medium.
Definition: tag_medium.cpp:87
void RemoveEntity(CTagEntity &c_entity)
Removes the specified entity from the list of managed entities.
Definition: tag_medium.cpp:102
CPositionalIndex< CTagEntity > & GetIndex()
Returns the tag positional index.
Definition: tag_medium.h:59
virtual void PostSpaceInit()
Executes extra initialization activities after the space has been initialized.
Definition: tag_medium.cpp:63
virtual void Init(TConfigurationNode &t_tree)
Initialized the medium.
Definition: tag_medium.cpp:19