ERC CISST - cisst software

cmnClassServices< _hasDynamicCreation, _class > Class Template Reference

#include <cmnClassServices.h>

Inheritance diagram for cmnClassServices< _hasDynamicCreation, _class >:

Inheritance graph
[legend]
Collaboration diagram for cmnClassServices< _hasDynamicCreation, _class >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<bool _hasDynamicCreation, class _class>
class cmnClassServices< _hasDynamicCreation, _class >

Class services.

See also:
cmnClassRegister cmnClassServicesBase

Definition at line 218 of file cmnClassServices.h.

Public Types

Public Member Functions


Member Typedef Documentation

template<bool _hasDynamicCreation, class _class>
typedef cmnClassServicesBase cmnClassServices< _hasDynamicCreation, _class >::BaseType

Type of the base class, i.e. cmnClassServicesBase.

Definition at line 221 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
typedef BaseType::LogLoDType cmnClassServices< _hasDynamicCreation, _class >::LogLoDType

Type used to define the logging level of detail.

Reimplemented from cmnClassServicesBase.

Definition at line 224 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
typedef cmnGenericObject* cmnClassServices< _hasDynamicCreation, _class >::generic_pointer

Type used to refer to cmnGenericObject by pointer, convenient to pass a pointer by reference

Reimplemented from cmnClassServicesBase.

Definition at line 227 of file cmnClassServices.h.


Constructor & Destructor Documentation

template<bool _hasDynamicCreation, class _class>
cmnClassServices< _hasDynamicCreation, _class >::cmnClassServices ( const std::string &  className,
const std::type_info *  typeInfo,
LogLoDType  lod = CMN_LOG_LOD_RUN_ERROR 
) [inline]

Constructor. Sets the name of the class and the Level of Detail setting for the class.

Parameters:
className The name to be associated with the class.
typeInfo Type information as defined by typeid() (see C++ RTTI)
lod The Log Level of Detail setting to be used with this class.

Definition at line 237 of file cmnClassServices.h.


Member Function Documentation

template<bool _hasDynamicCreation, class _class>
virtual cmnGenericObject* cmnClassServices< _hasDynamicCreation, _class >::Create ( void   )  const [inline, virtual]

Create a new empty object of the same type as represented by this object. This can be used whenever an object needs to be dynamically created (e.g. deserialization, object factory). This method uses the C++ "new" operator and the programmers should remember to use a matching "delete" if needed.

Returns:
a pointer to the newly created object or null if object cannot be created. This could happen when the class services where created with CMN_NO_DYNAMIC_CREATION.

Implements cmnClassServicesBase.

Definition at line 242 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
virtual cmnGenericObject* cmnClassServices< _hasDynamicCreation, _class >::Create ( const cmnGenericObject other  )  const [inline, virtual]

Create a new empty object of the same type as represented by this object using the copy constructor. This can be used whenever an object needs to be dynamically created (e.g. deserialization, object factory). This method uses the C++ "new" operator and the programmers should remember to use a matching "delete" if needed.

Parameters:
other A object derived from cmnGenericObject which should be of the same type as the type represented by this cmnClassServices object.
Returns:
a pointer to the newly created object or null if object cannot be created. This could happen when the class services where created with CMN_NO_DYNAMIC_CREATION or if the object provided is not of the right type and the copy constructor can not be called.

Implements cmnClassServicesBase.

Definition at line 248 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
virtual bool cmnClassServices< _hasDynamicCreation, _class >::Create ( cmnGenericObject existing,
const cmnGenericObject other 
) const [inline, virtual]

Placement new using copy constructor

Implements cmnClassServicesBase.

Definition at line 254 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
virtual cmnGenericObject* cmnClassServices< _hasDynamicCreation, _class >::CreateArray ( size_t  size  )  const [inline, virtual]

Create a new empty array of objects of the same type as represented by this object. This can be used whenever an object needs to be dynamically created (e.g. deserialization, object factory). This method uses the C++ "new[size]" operator and the programmers should remember to use a matching "delete" if needed.

Returns:
a pointer to the newly created object or null if object cannot be created. This could happen when the class services where created with CMN_NO_DYNAMIC_CREATION.

Implements cmnClassServicesBase.

Definition at line 260 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
virtual cmnGenericObject* cmnClassServices< _hasDynamicCreation, _class >::CreateArray ( size_t  size,
const cmnGenericObject other 
) const [inline, virtual]

Create an array and fill with an existing object

Implements cmnClassServicesBase.

Definition at line 266 of file cmnClassServices.h.

template<bool _hasDynamicCreation, class _class>
virtual bool cmnClassServices< _hasDynamicCreation, _class >::Delete ( cmnGenericObject existing  )  const [inline, virtual]

Call destructor explicitely

Implements cmnClassServicesBase.

Definition at line 278 of file cmnClassServices.h.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu