zenilib: Zeni::Serializable Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
Zeni::Serializable Class Referenceabstract
Zenilib

A base class for objects that can be sent over the network. More...

`#include <Serialization.h>`

Inherited by Zeni::VLUID.

## Public Member Functions

| Serializable ()
virtual | ~Serializable ()
virtual std::ostream & | serialize (std::ostream &os) const =0
virtual Uint16 | size () const
virtual std::istream & | unserialize (std::istream &is)=0

## Protected Attributes

Uint16 | m_size

## Detailed Description

A base class for objects that can be sent over the network.

Any class deriving from Serializable should know how to send themselves over a network socket, and how to receive themselves from a network socket. This is good for primitives, but for complicated interactions where only part of a class should be sent or received at a time, it is not the way to go. Go higher level in those cases.

Author
  bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 83 of file Serialization.h.

## Constructor & Destructor Documentation

Zeni::Serializable::Serializable | ( |  | ) |

inline

Definition at line 85 of file Serialization.h.

virtual Zeni::Serializable::~Serializable | ( |  | ) |

inlinevirtual

Definition at line 86 of file Serialization.h.

## Member Function Documentation

std::ostream & Zeni::Serializable::serialize | ( | std::ostream & | os | ) | const

pure virtual

Implemented in Zeni::VLUID.

Definition at line 230 of file Serialization.cpp.

References m_size, and Zeni::serialize().

Referenced by Zeni::VLUID::serialize(), and Zeni::serialize().

virtual Uint16 Zeni::Serializable::size | ( |  | ) | const

inlinevirtual

Reimplemented in Zeni::VLUID.

Definition at line 88 of file Serialization.h.

std::istream & Zeni::Serializable::unserialize | ( | std::istream & | is | ) |

pure virtual

Implemented in Zeni::VLUID.

Definition at line 234 of file Serialization.cpp.

References m_size, and Zeni::unserialize().

Referenced by Zeni::VLUID::unserialize(), and Zeni::unserialize().

## Member Data Documentation

Uint16 Zeni::Serializable::m_size

protected

Definition at line 94 of file Serialization.h.

Referenced by Zeni::VLUID::compare(), Zeni::VLUID::operator++(), Zeni::VLUID::serialize(), serialize(), Zeni::VLUID::size(), Zeni::VLUID::unserialize(), and unserialize().

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

- zenilib/jni/external/zenilib/zeni/Zeni/Serialization.h
- zenilib/jni/external/zenilib/zeni/Serialization.cpp