cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
cmnClassServicesBase Class Referenceabstract

Base class for class services. More...

#include <cmnClassServicesBase.h>

Inheritance diagram for cmnClassServicesBase:
cmnClassServices< _dynamicCreation, _class, _argType >

Public Types

typedef cmnGenericObjectgeneric_pointer
 

Public Member Functions

 cmnClassServicesBase (const std::string &className, const std::type_info *typeInfo, const cmnClassServicesBase *parentServices, const std::string &libraryName, cmnLogMask mask=CMN_LOG_ALLOW_DEFAULT)
 
virtual ~cmnClassServicesBase ()
 
virtual cmnGenericObjectCreate (void) const =0
 
virtual cmnGenericObjectCreate (const cmnGenericObject &other) const =0
 
virtual cmnGenericObjectCreateWithArg (const cmnGenericObject &arg) const =0
 
virtual bool Create (cmnGenericObject *existing, const cmnGenericObject &other) const =0
 
virtual cmnGenericObjectCreateArray (size_t size) const =0
 
virtual cmnGenericObjectCreateArray (size_t size, const cmnGenericObject &other) const =0
 
virtual bool DeleteArray (generic_pointer &data, size_t &size) const =0
 
virtual bool Delete (cmnGenericObject *existing) const =0
 
virtual size_t GetSize (void) const =0
 
virtual bool HasDynamicCreation (void) const =0
 
virtual bool DefaultConstructorAvailable (void) const =0
 
virtual bool CopyConstructorAvailable (void) const =0
 
virtual bool OneArgConstructorAvailable (void) const =0
 
virtual const
cmnClassServicesBase
GetConstructorArgServices (void) const =0
 
const std::string & GetName (void) const
 
const std::type_info * TypeInfoPointer (void) const
 
const cmnLogMaskGetLogMask (void) const
 
const cmnLogMaskGetLoD (void) const
 
void SetLogMask (cmnLogMask mask)
 
void CISST_DEPRECATED SetLoD (cmnLogMask mask)
 
const cmnClassServicesBaseGetParentServices (void) const
 
bool IsDerivedFrom (const cmnClassServicesBase *parentServices) const
 
template<class _Parent >
bool IsDerivedFrom (void) const
 
const std::string & GetLibraryName (void) const
 

Detailed Description

Base class for class services.

See Also
cmnClassServices

Member Typedef Documentation

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

Constructor & Destructor Documentation

cmnClassServicesBase::cmnClassServicesBase ( const std::string &  className,
const std::type_info *  typeInfo,
const cmnClassServicesBase parentServices,
const std::string &  libraryName,
cmnLogMask  mask = CMN_LOG_ALLOW_DEFAULT 
)

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

Parameters
classNameThe name to be associated with the class.
typeInfoRuntime type as defined by C++ RTTI
maskThe log mask to be used with this class.
virtual cmnClassServicesBase::~cmnClassServicesBase ( )
inlinevirtual

Virtual destructor. Does nothing.

Member Function Documentation

virtual bool cmnClassServicesBase::CopyConstructorAvailable ( void  ) const
pure virtual
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.

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

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
otherA 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.

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

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

Placement new using copy constructor

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

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.

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

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

Create an array and fill with an existing object

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

virtual cmnGenericObject* cmnClassServicesBase::CreateWithArg ( const cmnGenericObject arg) const
pure virtual

Create with argument

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

virtual bool cmnClassServicesBase::DefaultConstructorAvailable ( void  ) const
pure virtual

returns information about what types of constructors are available

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

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

Call destructor explicitly

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

virtual bool cmnClassServicesBase::DeleteArray ( generic_pointer data,
size_t &  size 
) const
pure virtual
virtual const cmnClassServicesBase* cmnClassServicesBase::GetConstructorArgServices ( void  ) const
pure virtual

return class services for constructor argument (0 if no class services or does not exist)

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

const std::string& cmnClassServicesBase::GetLibraryName ( void  ) const

Get the name of library likely to contain the symbol.

const cmnLogMask& cmnClassServicesBase::GetLoD ( void  ) const
inline
const cmnLogMask& cmnClassServicesBase::GetLogMask ( void  ) const

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.
const std::string& cmnClassServicesBase::GetName ( void  ) const

Get the name associated with the class.

Returns
The name of the class as a string.
const cmnClassServicesBase* cmnClassServicesBase::GetParentServices ( void  ) const
inline
virtual size_t cmnClassServicesBase::GetSize ( void  ) const
pure virtual

Get the size of the class

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

virtual bool cmnClassServicesBase::HasDynamicCreation ( void  ) const
pure virtual

Returns whether dynamic creation is available

Implemented in cmnClassServices< _dynamicCreation, _class, _argType >.

bool cmnClassServicesBase::IsDerivedFrom ( const cmnClassServicesBase parentServices) const
template<class _Parent >
bool cmnClassServicesBase::IsDerivedFrom ( void  ) const
inline
virtual bool cmnClassServicesBase::OneArgConstructorAvailable ( void  ) const
pure virtual
void CISST_DEPRECATED cmnClassServicesBase::SetLoD ( cmnLogMask  mask)
inline
void cmnClassServicesBase::SetLogMask ( cmnLogMask  mask)

Change the log mask for the class.

Parameters
maskThe log mask.
const std::type_info* cmnClassServicesBase::TypeInfoPointer ( void  ) const

Get the type_info corresponding to the registered class.

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

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