7 #ifndef PROTOTYPE_ENTITY_H
8 #define PROTOTYPE_ENTITY_H
11 class CEmbodiedEntity;
12 class CControllableEntity;
13 class CPrototypeLinkEquippedEntity;
14 class CPrototypeJointEquippedEntity;
15 class CTagEquippedEntity;
16 class CRadioEquippedEntity;
17 class CMagnetEquippedEntity;
18 class CCameraEquippedEntity;
19 class CProximitySensorEquippedEntity;
20 class CDirectionalLEDEquippedEntity;
21 class CLEDEquippedEntity;
22 class CPrototypeEntity;
25 #include <argos3/core/simulator/entity/composable_entity.h>
44 return *m_pcEmbodiedEntity;
48 return *m_pcLinkEquippedEntity;
52 return *m_pcJointEquippedEntity;
56 return (m_pcControllableEntity !=
nullptr);
61 "CPrototypeEntity::GetControllableEntity(), id=\"" <<
63 "\": was not initialized with a controllable entity");
64 return *m_pcControllableEntity;
68 return (m_pcDirectionalLEDEquippedEntity !=
nullptr);
72 ARGOS_ASSERT(m_pcDirectionalLEDEquippedEntity !=
nullptr,
73 "CPrototypeEntity::GetDirectionalLEDEquippedEntity(), id=\"" <<
75 "\": was not initialized with an directional LED equipped entity");
76 return *m_pcDirectionalLEDEquippedEntity;
80 return (m_pcLEDEquippedEntity !=
nullptr);
85 "CPrototypeEntity::GetLEDEquippedEntity(), id=\"" <<
87 "\": was not initialized with an LED equipped entity");
88 return *m_pcLEDEquippedEntity;
92 return (m_pcTagEquippedEntity !=
nullptr);
97 "CPrototypeEntity::GetTagEquippedEntity(), id=\"" <<
99 "\": was not initialized with a tag equipped entity");
100 return *m_pcTagEquippedEntity;
104 return (m_pcRadioEquippedEntity !=
nullptr);
109 "CPrototypeEntity::GetRadioEquippedEntity(), id=\"" <<
111 "\": was not initialized with a radio equipped entity");
112 return *m_pcRadioEquippedEntity;
116 return (m_pcMagnetEquippedEntity !=
nullptr);
121 "CPrototypeEntity::GetMagnetEquippedEntity(), id=\"" <<
123 "\": was not initialized with a magnet equipped entity");
124 return *m_pcMagnetEquippedEntity;
128 return (m_pcProximitySensorEquippedEntity !=
nullptr);
132 ARGOS_ASSERT(m_pcProximitySensorEquippedEntity !=
nullptr,
133 "CPrototypeEntity::GetProximitySensorEquippedEntity(), id=\"" <<
135 "\": was not initialized with a proximity sensor equipped entity");
136 return *m_pcProximitySensorEquippedEntity;
#define ARGOS_ASSERT(condition, message)
When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the s...
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Basic class for an entity that contains other entities.
An entity that contains a pointer to the user-defined controller.
This entity is a link to a body in the physics engine.
const std::string & GetId() const
Returns the id of this entity.
std::string GetContext() const
Returns the context of this entity.
bool HasLEDEquippedEntity() const
bool HasControllableEntity() const
CControllableEntity & GetControllableEntity()
bool HasRadioEquippedEntity() const
bool HasTagEquippedEntity() const
bool HasDirectionalLEDEquippedEntity() const
CPrototypeJointEquippedEntity & GetJointEquippedEntity()
CLEDEquippedEntity & GetLEDEquippedEntity()
CRadioEquippedEntity & GetRadioEquippedEntity()
bool HasProximitySensorEquippedEntity() const
bool HasMagnetEquippedEntity() const
CMagnetEquippedEntity & GetMagnetEquippedEntity()
virtual std::string GetTypeDescription() const
Returns a string label for this class.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CProximitySensorEquippedEntity & GetProximitySensorEquippedEntity()
virtual ~CPrototypeEntity()
CTagEquippedEntity & GetTagEquippedEntity()
CDirectionalLEDEquippedEntity & GetDirectionalLEDEquippedEntity()
CEmbodiedEntity & GetEmbodiedEntity()
CPrototypeLinkEquippedEntity & GetLinkEquippedEntity()
A container of CDirectionalLEDEntity.
A container of CLEDEntity.
A container of CMagnetEntity.
A container of CRadioEntity.
A container of CTagEntity.