oasys::TypeCollectionDispatch< _Collection, _Class > Class Template Reference

#include <TypeCollection.h>

Inheritance diagram for oasys::TypeCollectionDispatch< _Collection, _Class >:

oasys::TypeCollectionHelper List of all members.

Detailed Description

template<typename _Collection, typename _Class>
class oasys::TypeCollectionDispatch< _Collection, _Class >

Instantiate a template with the specific class and create a static instance of this to register the class.

Use the TYPE_COLLECTION_DEFINE macro below.

Definition at line 199 of file TypeCollection.h.

Public Member Functions

 TypeCollectionDispatch (TypeCollection::TypeCode_t typecode, const char *name)
 Register upon creation.
SerializableObjectnew_object ()
 The _Class takes an instance of the TypeCollection class in order to distinguish that the constructor is being called to build the serializable object via a typecollection.
const char * name () const

Private Attributes

const char * name_


Constructor & Destructor Documentation

template<typename _Collection, typename _Class>
oasys::TypeCollectionDispatch< _Collection, _Class >::TypeCollectionDispatch ( TypeCollection::TypeCode_t  typecode,
const char *  name 
) [inline]

Register upon creation.


Member Function Documentation

template<typename _Collection, typename _Class>
SerializableObject* oasys::TypeCollectionDispatch< _Collection, _Class >::new_object (  )  [inline, virtual]

The _Class takes an instance of the TypeCollection class in order to distinguish that the constructor is being called to build the serializable object via a typecollection.

Returns:
new_object. Note the use of a static cast to SerializableObject to avoid screwing up the pointers. If we had used a void* here, the pointer to the class may be off in the case of multiple inheritance.

Implements oasys::TypeCollectionHelper.

Definition at line 219 of file TypeCollection.h.

template<typename _Collection, typename _Class>
const char* oasys::TypeCollectionDispatch< _Collection, _Class >::name (  )  const [inline, virtual]

Implements oasys::TypeCollectionHelper.

Definition at line 224 of file TypeCollection.h.

References oasys::TypeCollectionDispatch< _Collection, _Class >::name_.


Member Data Documentation

template<typename _Collection, typename _Class>
const char* oasys::TypeCollectionDispatch< _Collection, _Class >::name_ [private]

Definition at line 227 of file TypeCollection.h.

Referenced by oasys::TypeCollectionDispatch< _Collection, _Class >::name().


The documentation for this class was generated from the following file:
Generated on Thu Jun 7 12:54:36 2007 for DTN Reference Implementation by  doxygen 1.5.1