Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
FloatType< T > Class Template Reference
+ Inheritance diagram for FloatType< T >:

Public Member Functions

 FloatType (void)
 
virtual bool isFloat (void) const
 
virtual bool canCast (const Type *t) const
 
virtual bool isSerial (void) const
 
virtual const SerializableasSerial (void) const
 
virtual const Typetype (void) const
 
virtual voidinstantiate (void) const
 
virtual void serialize (serial2::Serializer &ser, const void *data) const
 
virtual void unserialize (serial2::Unserializer &uns, void *data) const
 
- Public Member Functions inherited from Type
 Type (string name="")
 
virtual ~Type (void)
 
string name (void) const
 
const PointerTypepointer (void) const
 
virtual bool isVoid (void) const
 
virtual bool isBool (void) const
 
virtual bool isInt (void) const
 
virtual bool isPtr (void) const
 
virtual const PointerTypeasPtr (void) const
 
virtual bool isClass (void) const
 
virtual const AbstractClassasClass (void) const
 
virtual bool isEnum (void) const
 
virtual const EnumerableasEnum (void) const
 
virtual const TemplateTypeasTemplate (void) const
 
virtual const InstanceTypeasInstance (void) const
 
virtual const ParamTypeasParam (void) const
 
void initialize (void)
 
bool operator== (const Type &t) const
 
bool operator!= (const Type &t) const
 
- Public Member Functions inherited from Serializable
virtual ~Serializable (void)
 

Additional Inherited Members

- Public Types inherited from Type
typedef HashMap< string, const Type * >::Iter TypeIter
 
- Static Public Member Functions inherited from Type
static const Typeget (string name)
 
static TypeIter types (void)
 
- Static Public Attributes inherited from Type
static const Typeparam0
 
static const Typeparam1
 
static const Typeparam2
 
static const Typeparam3
 

Detailed Description

template<class T>
class elm::rtti::FloatType< T >

Type class for floating-point reals.

Constructor & Destructor Documentation

◆ FloatType()

FloatType ( void  )
inline

Member Function Documentation

◆ asSerial()

virtual const Serializable& asSerial ( void  ) const
inlinevirtual

Return the serializable instance of this type.

Warning
Will raise assertion failure if the type is not serializable.
Returns
Serializable instance.

Reimplemented from Type.

◆ canCast()

virtual bool canCast ( const Type t) const
inlinevirtual

Test if the type can be casted to the given type.

Parameters
tType to cast to.
Returns
True if the type can be casted to the given type, false else.

Reimplemented from Type.

References Type::isBool(), Type::isFloat(), and Type::isInt().

◆ instantiate()

virtual void* instantiate ( void  ) const
inlinevirtual

Implements Serializable.

◆ isFloat()

virtual bool isFloat ( void  ) const
inlinevirtual

Test if the type is a floating-point real.

Returns
True if the type is boolean, false else.

Reimplemented from Type.

◆ isSerial()

virtual bool isSerial ( void  ) const
inlinevirtual

Test if the type is serializable. Default implementation return false.

Returns
True if the type is serializable, false else.

Reimplemented from Type.

◆ serialize()

virtual void serialize ( serial2::Serializer ser,
const void data 
) const
inlinevirtual

Serialize the data passed in parameter that must be of type corresponding to the interface.

Parameters
serSerializer to use.
dataPointer to data to serialize.

Implements Serializable.

References Serializer::onValue().

◆ type()

virtual const Type& type ( void  ) const
inlinevirtual

Get the type corresponding to this enumerable interface.

Returns
Corresponding type.

Implements Serializable.

◆ unserialize()

virtual void unserialize ( serial2::Unserializer uns,
void data 
) const
inlinevirtual

Unserialize the coming data from the unserializer to the place pointed by data. This place must be of the same type as the serializable type.

Parameters
unsUnserializer to get data from.
dataPointer to place to unserialize in.

Implements Serializable.

References Unserializer::onValue().


The documentation for this class was generated from the following file: