17 #include <argos3/core/utility/configuration/argos_exception.h>
70 CAny(t_object).swap(*
this);
78 CAny(c_any).swap(*
this);
96 virtual const std::type_info&
GetType()
const = 0;
117 virtual const std::type_info&
GetType()
const {
186 const T* ptResult = any_cast<T>(&c_any);
191 char* pchDemangledOperandType = abi::__cxa_demangle(c_any.
m_pcRef->
GetType().name(), NULL, NULL, NULL);
192 char* pchDemangledTargetType = abi::__cxa_demangle(
typeid(T).name(), NULL, NULL, NULL);
194 pchDemangledOperandType <<
196 pchDemangledTargetType);
207 T* ptResult = any_cast<T>(&c_any);
212 char* pchDemangledOperandType = abi::__cxa_demangle(c_any.
m_pcRef->
GetType().name(), NULL, NULL, NULL);
213 char* pchDemangledTargetType = abi::__cxa_demangle(
typeid(T).name(), NULL, NULL, NULL);
215 pchDemangledOperandType <<
217 pchDemangledTargetType);
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
The namespace containing all the ARGoS related code.
T * any_cast(CAny *pc_any)
Performs a cast on the any type to the desired type, when the any type is passed by non-const pointer...
CAny & swap(CAny &c_any)
Redefinition of the swap function of the std library.
CAny(const T &t_object)
Constructor with templetized argument.
CAbstractReference * m_pcRef
Pointer to object reference.
CAny & operator=(const CAny &c_any)
Assignment operator when any type is operand.
CAny(const CAny &c_any)
Copy constructor Clone the reference to the object, if the reference is not NULL.
CAny & operator=(const T &t_object)
Assignment operator when object is operand.
Abstract reference to object.
virtual ~CAbstractReference()
Destructor.
virtual CAbstractReference * Clone() const =0
Clone the reference.
virtual const std::type_info & GetType() const =0
Returns the type info on the referenced object.
Actual templetized reference to object.
virtual CAbstractReference * Clone() const
Clone the reference.
virtual const std::type_info & GetType() const
virtual ~CReference()
Destructor.
CReference(const T &t_object)
T m_tObject
Actual referenced object.