Public Member Functions | Static Public Member Functions | Protected Member Functions

vtkKWESerializationHelperMap Class Reference

Map from class name to helper object. More...

#include <vtkKWESerializationHelperMap.h>

Inheritance diagram for vtkKWESerializationHelperMap:
Inheritance graph
[legend]
Collaboration diagram for vtkKWESerializationHelperMap:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWESerializationHelperMap, vtkObject)
void PrintSelf (ostream &os, vtkIndent indent)

Static Public Member Functions

static
vtkKWESerializationHelperMap
New ()
static void InstantiateDefaultHelpers ()
static int Serialize (vtkObject *obj, vtkKWESerializer *serializer)
static const char * GetSerializationType (vtkObject *object)
static bool IsSerializable (vtkObject *obj)
static vtkKWESerializationHelperGetHelper (const char *classType)
static void RemoveAllHelpers ()

static void RegisterHelperForClass (const char *classType, vtkKWESerializationHelper *helper)

static void UnRegisterHelperForClass (const char *classType, vtkKWESerializationHelper *helper)

Protected Member Functions

 vtkKWESerializationHelperMap ()
 ~vtkKWESerializationHelperMap ()

Detailed Description

Map from class name to helper object.

This class is used to map from class name to a helper class that has been registered to serialize the class.

Note, helper classes must be manually instantiated, at which time the class types supported by the helper should be registered with the vtkKWESerializationHelperMap (by calling RegisterWithHelperMap on the helper). The "known" helper classes (those for the VTK/VTKEdge kits) should be added to InstantiateDefaultHelpers(), which is called by both the vtkKWEXMLArchiveReader and vtkKWEXMLArchiveWriter during their construction. This class then manages destruction of the helper since the map holds a vtkSmartPointer to the helper for each supported class type.

See also:
vtkKWESerializationHelper

Definition at line 50 of file vtkKWESerializationHelperMap.h.


Constructor & Destructor Documentation

vtkKWESerializationHelperMap::vtkKWESerializationHelperMap (  )  [protected]
vtkKWESerializationHelperMap::~vtkKWESerializationHelperMap (  )  [protected]

Member Function Documentation

static vtkKWESerializationHelperMap* vtkKWESerializationHelperMap::New (  )  [static]

Reimplemented from vtkObject.

vtkKWESerializationHelperMap::vtkTypeRevisionMacro ( vtkKWESerializationHelperMap  ,
vtkObject   
)
void vtkKWESerializationHelperMap::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

static void vtkKWESerializationHelperMap::InstantiateDefaultHelpers (  )  [static]

Instantiate all "known" (supporting core VTK and VTKEdge) helpers and then register them with the helper map.

static void vtkKWESerializationHelperMap::RegisterHelperForClass ( const char *  classType,
vtkKWESerializationHelper helper 
) [static]

Register (add) a class type / helper with the map.

static void vtkKWESerializationHelperMap::UnRegisterHelperForClass ( const char *  classType,
vtkKWESerializationHelper helper 
) [static]

UnRegister (remove) a class type / helper in the map, if the registered helper matches.

static int vtkKWESerializationHelperMap::Serialize ( vtkObject obj,
vtkKWESerializer serializer 
) [static]

Serialize the input object using a registered helper. If successful (map entry exists), returns 1 (0 if not).

static const char* vtkKWESerializationHelperMap::GetSerializationType ( vtkObject object  )  [static]

Get the value for the "type" attribute (generally the ClassName but may be name of Superclass) of the specfied object type from a registerd helper for the object Clas

static bool vtkKWESerializationHelperMap::IsSerializable ( vtkObject obj  )  [static]

Returns true if the object class type is registered with the map, and thus can be serialized.

static vtkKWESerializationHelper* vtkKWESerializationHelperMap::GetHelper ( const char *  classType  )  [static]

Return the serialization helper registered for the indicated class (if one has been registerd); otherwise return NULL

static void vtkKWESerializationHelperMap::RemoveAllHelpers (  )  [static]

Removes all helpers from the map.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines