libcppa  Version 0.1
Public Member Functions | Protected Member Functions
cppa::util::abstract_uniform_type_info< T > Class Template Reference

#include <abstract_uniform_type_info.hpp>

Inheritance diagram for cppa::util::abstract_uniform_type_info< T >:
cppa::uniform_type_info

List of all members.

Public Member Functions

bool equals (const std::type_info &tinfo) const

Protected Member Functions

bool equals (const void *lhs, const void *rhs) const
void * new_instance (const void *ptr) const
void delete_instance (void *instance) const

Detailed Description

template<typename T>
class cppa::util::abstract_uniform_type_info< T >

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


Member Function Documentation

template<typename T>
void cppa::util::abstract_uniform_type_info< T >::delete_instance ( void *  instance) const [protected, virtual]

Casts instance to the native type and deletes it.

Parameters:
instanceInstance of this type.
Precondition:
instance has the type of this.

Implements cppa::uniform_type_info.

template<typename T>
bool cppa::util::abstract_uniform_type_info< T >::equals ( const void *  instance1,
const void *  instance2 
) const [protected, virtual]

Compares two instances of this type.

Parameters:
instance1Left hand operand.
instance2Right hand operand.
Returns:
true if *instance1 == *instance2.
Precondition:
instance1 and instance2 have the type of this.

Implements cppa::uniform_type_info.

template<typename T>
bool cppa::util::abstract_uniform_type_info< T >::equals ( const std::type_info &  tinfo) const [virtual]

Determines if this uniform_type_info describes the same type than tinfo.

Returns:
true if tinfo describes the same type as this.

Implements cppa::uniform_type_info.

template<typename T>
void* cppa::util::abstract_uniform_type_info< T >::new_instance ( const void *  instance) const [protected, virtual]

Creates an instance of this type, either as a copy of instance or initialized with the default constructor if instance == nullptr.

Parameters:
instanceOptional instance of this type.
Returns:
Either a copy of instance or a new instance, initialized with the default constructor.
Precondition:
instance has the type of this or is set to nullptr.

Implements cppa::uniform_type_info.


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