Into

Modules

Documentation

classPiiOutputArchive

#include <PiiOutputArchive.h>

A base class for output archive implementations.

Description

This class provides functions for saving pointers.

Classes

struct
struct
struct
struct
struct
struct

Public types

enum
{ InputArchive = false, OutputArchive = true }

This enumeration is used as a static constant for compile-time checking of input/output.

Constructors and destructor

Public member functions

template<class T>
void
(
  • T & from
  • T & to
)
template<class T>
Archive &
(
  • const T & obj
)

This operator is defined for both input and output archives, which makes it possible to serialize and deserialize data with a single function.

template<class T>
Archive &
(
  • T & obj
)
template<class T>
Archive &
(
  • const T & value
)
template<class T>
Archive &
(
  • T & value
)

Default implementation for the << operator.

template<class T>
void
(
  • const T & value
)

Separates pointers and references into different serialization functions.

Archive *
( )

A design pattern for casting the type of this archive to that of the template parameter (i.e.

template<class T>
void
(
  • const T * ptr
  • unsigned int size
)

Writes an array of size elements to the archive.

Friends

friend struct
friend struct
friend struct
friend struct
friend struct
friend struct

Enumeration details

  • enum @32

    This enumeration is used as a static constant for compile-time checking of input/output.

Function details

  • ~PiiOutputArchive

    ()
    [inline]
  • template<class T>

    void objectMoved

    (
    • T & from
    • T & to
    )
    [inline]
  • template<class T>

    Archive & operator&

    (
    • const T & obj
    )
    [inline]

    This operator is defined for both input and output archives, which makes it possible to serialize and deserialize data with a single function.

    The output archive converts the operator to operator<<.

  • template<class T>

    Archive & operator&

    (
    • T & obj
    )
    [inline]

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  • template<class T>

    Archive & operator<<

    (
    • const T & value
    )
    [inline]
  • template<class T>

    Archive & operator<<

    (
    • T & value
    )
    [inline]

    Default implementation for the << operator.

    If Archive does not have any overrides, this will be called by operator&. This function calls save(value). You may provide any overrides applicable to your archive type. At the minimum, an override for all primitive types must be provided.

  • template<class T>

    void save

    (
    • const T & value
    )
    [inline]

    Separates pointers and references into different serialization functions.

  • Archive * self

    ()
    [inline]

    A design pattern for casting the type of this archive to that of the template parameter (i.e.

    the most derived class). The pattern is known as "Curiously Recurring Template Pattern" (CRTP), in which the most derived class uses itself as the template parameter for its parents.

  • template<class T>

    void writeArray

    (
    • const T * ptr
    • unsigned int size
    )
    [inline]

    Writes an array of size elements to the archive.

Notes (0)

Add a note

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