CppCMS
Public Member Functions
cppcms::serializable Class Reference

Abstract class for serialization object. More...

#include <cppcms/serialization_classes.h>

Inheritance diagram for cppcms::serializable:
cppcms::serializable_base

List of all members.

Public Member Functions

virtual void serialize (archive &a)=0
virtual void load (archive &a)
virtual void save (archive &a) const

Detailed Description

Abstract class for serialization object.


Member Function Documentation

virtual void cppcms::serializable::load ( archive a) [inline, virtual]

Calls serialize member functions

Implements cppcms::serializable_base.

References serialize().

virtual void cppcms::serializable::save ( archive a) const [inline, virtual]

Const-casts and calls serialize member function

Implements cppcms::serializable_base.

References serialize().

virtual void cppcms::serializable::serialize ( archive a) [pure virtual]

Abstract function that should be implemented for correct serialization of an object, it allows implementing only one function for load and save instead of two.

For example:

  struct persone : public serializable {
    double age;
    std::string name;
    std::vector<std::string> kids_names;

    void serialize(archive &a) 
    {
         a & age & name & kids_names;
    }
  };

Referenced by load(), and save().


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