#include <nmstl/internal.h>
#include <nmstl/io>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <nmstl/ntime>
Compounds | |
class | iserial |
An iserial is analogous to an ObjectInputStream in Java. More... | |
class | iserialdata |
class | iserialstring |
class | oserial |
An oserial is analogous to an ObjectOutputStream in Java. More... | |
class | oserialstream |
class | oserialstring |
Defines | |
#define | NMSTL_SERIALIZABLE(T) |
Declares a class T as serializable. | |
#define | NMSTL_NO_FIELDS |
#define | NMSTL_SIMPLE_SERIALIZATION(fields) |
#define | NMSTL_SIMPLE_VIRTUAL_SERIALIZATION(fields) |
#define | NMSTL_SIMPLE_VIRTUAL_SERIALIZATION_SUPER(Super, fields) |
#define | NMSTL_TYPEID(T, keytype) |
#define | NMSTL_BASE_CLASS(T, keytype) |
#define | NMSTL_SERIAL(T, fields) public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_SERIALIZATION(fields) |
Declares a class as T as simply serializable, i.e., specifies that T can be read or written simply by reading or writing a set of instance variables. | |
#define | NMSTL_SIMPLY_SERIALIZABLE(T, fields) public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_SERIALIZATION(fields) |
#define | NMSTL_SIMPLY_SERIALIZABLE_BASE_CLASS(T, fields) |
#define | NMSTL_SIMPLY_SERIALIZABLE_SUBCLASS(T, Super, fields) |
#define | NMSTL_SIMPLY_SERIALIZABLE_BASE_CLASS_WITH_ID(T, keytype, fields) |
#define | NMSTL_SIMPLY_SERIALIZABLE_SUBCLASS_WITH_ID(T, Super, fields) |
#define | NMSTL_SERIAL_BASE(T, keytype, fields) NMSTL_SIMPLY_SERIALIZABLE_BASE_CLASS_WITH_ID(T, keytype, fields) |
#define | NMSTL_SERIAL_SUBCLASS(T, Super, fields) NMSTL_SIMPLY_SERIALIZABLE_SUBCLASS_WITH_ID(T, Super, fields) |
#define | NMSTL_SERIAL_DEFINE(T, key) |
Functions | |
void | freeze (oserial &out, const ntime &m) |
void | unfreeze (iserial &in, ntime &m) |
Variables | |
NMSTL_NAMESPACE_BEGIN | |
NMSTL_NAMESPACE_END |
|
Value: NMSTL_TYPEID(T, keytype) \ static iserial::reg<keytype, T>& __nmstl_serialreg() { static iserial::reg<keytype, T> r; return r; } \ static string typename_for_typeid(keytype id) { return __nmstl_serialreg().typename_for_typeid(id); } |
|
|
|
Declares a class as T as simply serializable, i.e., specifies that T can be read or written simply by reading or writing a set of instance variables. Should be included inside a class declaration. The second argument should be the list of variables to be read/written, each prefixed with the << operator (see the oserial documentation for usage). For base classes, you should use NMSTL_SIMPLY_SERIALIZABLE_BASE_CLASS instead of this macro. For subclasses, use NMSTL_SIMPLY_SERIALIZABLE_SUBCLASS instead. |
|
|
|
Value: const bool T::__nmstl_serial_registered = T::__nmstl_serial_register(); \ const T::typeid_type T::__nmstl_serial_class_typeid = key; |
|
|
|
Value: friend inline void freeze(::nmstl::oserial &out, const T& m) { out.begin_container(m); m.freeze(out); out.end_container(m); } \ friend inline void unfreeze(::nmstl::iserial &in, T& m) { in.begin_container<T>(); if (in) m.unfreeze(in); in.end_container<T>(); } Should be included inside T's class declaration (see the oserial documentation for usage). |
|
Value: |
|
Value: |
|
Value: virtual void freeze(::nmstl::oserial& out) const { Super::freeze(out); if (out fields) ; } \ virtual void unfreeze(::nmstl::iserial& in) { Super::unfreeze(in); (*::nmstl::__iserial_adaptor(in)) fields; } |
|
|
|
Value: public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_VIRTUAL_SERIALIZATION(fields) \ NMSTL_BASE_CLASS(T, string, typeid(T).name()) |
|
Value: public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_VIRTUAL_SERIALIZATION(fields) \ NMSTL_BASE_CLASS(T, keytype) |
|
Value: public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_VIRTUAL_SERIALIZATION_SUPER(Super, fields) \ NMSTL_TYPEID(T, string, typeid(T).name()) |
|
Value: public: NMSTL_SERIALIZABLE(T) NMSTL_SIMPLE_VIRTUAL_SERIALIZATION_SUPER(Super, fields) \ NMSTL_TYPEID(T, Super::typeid_type) |
|
Value: typedef keytype typeid_type; \ static const typeid_type __nmstl_serial_class_typeid; \ virtual typeid_type get_typeid() const { return __nmstl_serial_class_typeid; } \ virtual string get_typename() const { return #T; } \ static typeid_type class_typeid() { return __nmstl_serial_class_typeid; } \ static string class_typename() { return #T; } \ static bool __nmstl_serial_register() { return __nmstl_serialreg().add<T>(#T); } \ static const bool __nmstl_serial_registered; |
|
|
|
|
|
|
|
|