Into

Modules

Documentation

classPiiSerializerTemplate

#include <PiiSerializer.h>

A template class that is statically instantiated to add serializable classes to an archive's serializer registry.

Inherits PiiSerializer< Archive >

Description

Constructors and destructor

(
  • const char * name
)

Create a new serializer instance that takes the class name from the PiiSerializationTraits::ClassName structure.

Public member functions

virtual void
(
  • Archive & archive
  • void * value
  • const unsigned int version
)

Subclasses override this function to serialize any custom type.

Function details

  • PiiSerializerTemplate

    (
    • const char * name
    )
    [inline]

    Create a new serializer instance that takes the class name from the PiiSerializationTraits::ClassName structure.

    The name is used as the class ID. Thus, it must be globally unique.

  • virtual void serialize

    (
    • Archive & archive
    • void * value
    • const unsigned int version
    )
    [inline, virtual]

    Subclasses override this function to serialize any custom type.

    Parameters
    archive

    the archive to store the data into

    value

    a pointer to the object to be stored. Subclasses should use reinterpret_cast to convert the pointer to the correct type.

    version

    the version of the class

    Reimplemented from PiiSerializer.

Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.