libcaf  0.13.2
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
caf::abstract_uniform_type_info< T > Class Template Reference

Implements all pure virtual functions of uniform_type_info except serialize() and deserialize(). More...

#include <abstract_uniform_type_info.hpp>

Inheritance diagram for caf::abstract_uniform_type_info< T >:
caf::uniform_type_info

Public Member Functions

const char * name () const override
 Get the internal name for this type. More...
 
message as_message (void *instance) const override
 Returns instance encapsulated as an message.
 
bool equal_to (const std::type_info &tinfo) const override
 Determines if this uniform_type_info describes the same type than tinfo. More...
 
bool equals (const void *lhs, const void *rhs) const override
 Compares two instances of this type. More...
 
uniform_value create (const uniform_value &other) const override
 Creates a copy of other.
 
- Public Member Functions inherited from caf::uniform_type_info
 uniform_type_info (uniform_type_info &&)=delete
 
 uniform_type_info (const uniform_type_info &)=delete
 
uniform_type_infooperator= (uniform_type_info &&)=delete
 
uniform_type_infooperator= (const uniform_type_info &)=delete
 
uniform_value deserialize (deserializer *source) const
 Deserializes an object of this type from source.
 
virtual void serialize (const void *instance, serializer *sink) const =0
 Serializes instance to sink. More...
 
virtual void deserialize (void *instance, deserializer *source) const =0
 Deserializes instance from source. More...
 
uint16_t type_nr () const
 Returns a unique number for builtin types or 0.
 

Protected Member Functions

 abstract_uniform_type_info (std::string tname)
 
virtual bool pod_mems_equals (const T &, const T &) const
 
- Protected Member Functions inherited from caf::uniform_type_info
 uniform_type_info (uint16_t typenr=0)
 
template<class T >
uniform_value create_impl (const uniform_value &other) const
 

Static Protected Member Functions

static const T & deref (const void *ptr)
 
static T & deref (void *ptr)
 

Protected Attributes

std::string name_
 
const std::type_info * native_
 

Additional Inherited Members

- Static Public Member Functions inherited from caf::uniform_type_info
static const uniform_type_infofrom (const std::string &uniform_name)
 Get instance by uniform name. More...
 
static const uniform_type_infofrom (const std::type_info &tinfo)
 Get instance by std::type_info. More...
 
static std::vector< const uniform_type_info * > instances ()
 Get all instances. More...
 

Detailed Description

template<class T>
class caf::abstract_uniform_type_info< T >

Implements all pure virtual functions of uniform_type_info except serialize() and deserialize().

Examples:
announce_5.cpp.

Member Function Documentation

template<class T >
bool caf::abstract_uniform_type_info< T >::equal_to ( const std::type_info &  tinfo) const
overridevirtual

Determines if this uniform_type_info describes the same type than tinfo.

Returns
true if tinfo describes the same type as this.

Implements caf::uniform_type_info.

template<class T >
bool caf::abstract_uniform_type_info< T >::equals ( const void *  instance1,
const void *  instance2 
) const
overridevirtual

Compares two instances of this type.

Parameters
instance1Left hand operand.
instance2Right hand operand.
Returns
true if *instance1 == *instance2. @preinstance1andinstance2have the type ofthis`.

Implements caf::uniform_type_info.

template<class T >
const char* caf::abstract_uniform_type_info< T >::name ( ) const
overridevirtual

Get the internal name for this type.

Returns
A string describing the internal type name.

Implements caf::uniform_type_info.


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