ERC CISST - cisst software

cmnClassServicesBase Class Reference

#include <cmnClassServicesBase.h>

Inheritance diagram for cmnClassServicesBase:

Inheritance graph
[legend]
Collaboration diagram for cmnClassServicesBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for class services.

See also:
cmnClassServices

Definition at line 46 of file cmnClassServicesBase.h.

Public Types

Public Member Functions


Member Typedef Documentation

typedef cmnLogLoD cmnClassServicesBase::LogLoDType

Type used to define the logging level of detail.

Definition at line 49 of file cmnClassServicesBase.h.

typedef cmnGenericObject* cmnClassServicesBase::generic_pointer

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

Definition at line 53 of file cmnClassServicesBase.h.


Constructor & Destructor Documentation

cmnClassServicesBase::cmnClassServicesBase ( const std::string &  className,
const std::type_info *  typeInfo,
LogLoDType  lod = CMN_LOG_LOD_RUN_ERROR 
)

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 Runtime type as defined by C++ RTTI
lod The Log Level of Detail setting to be used with this class.

virtual cmnClassServicesBase::~cmnClassServicesBase (  )  [inline, virtual]

Virtual destructor. Does nothing.

Definition at line 68 of file cmnClassServicesBase.h.


Member Function Documentation

virtual cmnGenericObject* cmnClassServicesBase::Create ( void   )  const [pure 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.

Referenced by mtsCommandWriteGeneric< _classType >::mtsCommandWriteGeneric().

virtual cmnGenericObject* cmnClassServicesBase::Create ( const cmnGenericObject other  )  const [pure 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.

virtual bool cmnClassServicesBase::Create ( cmnGenericObject existing,
const cmnGenericObject other 
) const [pure virtual]

Placement new using copy constructor

virtual cmnGenericObject* cmnClassServicesBase::CreateArray ( size_t  size  )  const [pure 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.

virtual cmnGenericObject* cmnClassServicesBase::CreateArray ( size_t  size,
const cmnGenericObject other 
) const [pure virtual]

Create an array and fill with an existing object

virtual bool cmnClassServicesBase::Delete ( cmnGenericObject existing  )  const [pure virtual]

Call destructor explicitely

const std::string& cmnClassServicesBase::GetName ( void   )  const [inline]

Get the name associated with the class.

Returns:
The name of the class as a string.

Definition at line 131 of file cmnClassServicesBase.h.

Referenced by mtsQueueGeneric::Allocate(), mtsStateArray< mtsGenericObjectProxyFinalType >::Create(), mtsObjectName(), mtsQueueGeneric::mtsQueueGeneric(), mtsQueueGeneric::Put(), mtsQueueGeneric::SetSize(), mtsCommandWrite< _classType, _argumentType >::ToStream(), and mtsCommandQualifiedRead< _classType, _argument1Type, _argument2Type >::ToStream().

const std::type_info* cmnClassServicesBase::TypeInfoPointer ( void   )  const [inline]

Get the type_info corresponding to the registered class.

Returns:
Pointer to the class type_info as defined by C++ RTTI.

Definition at line 140 of file cmnClassServicesBase.h.

const LogLoDType& cmnClassServicesBase::GetLoD ( void   )  const [inline]

Get the log Level of Detail associated with the class. This is the level used to filter the log messages.

Returns:
The log Level of Detail.

Definition at line 150 of file cmnClassServicesBase.h.

void cmnClassServicesBase::SetLoD ( LogLoDType  newLoD  ) 

Change the Level of Detail setting for the class.

Parameters:
newLoD The log Level of Detail setting.


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