Anope IRC Services  Version 2.0
Public Member Functions | Static Public Member Functions | Data Fields | Private Types | Private Attributes | Static Private Attributes
Serialize Class Reference

#include <serialize.h>

Inheritance diagram for Serialize:
Inheritance graph
Collaboration diagram for Serialize:
Collaboration graph

Public Member Functions

 Type (const Anope::string &n, unserialize_func f, Module *owner=NULL)
 ~Type ()
const Anope::stringGetName ()
SerializableUnserialize (Serializable *obj, Serialize::Data &data)
void Check ()
time_t GetTimestamp () const
void UpdateTimestamp ()
ModuleGetOwner () const

Static Public Member Functions

static Serialize::TypeFind (const Anope::string &name)
static const std::vector
< Anope::string > & 
GetTypeOrder ()
static const std::map
< Anope::string,
Serialize::Type * > & 
GetTypes ()

Data Fields

std::map< uint64_t,
Serializable * > 

Private Types

typedef Serializable *(* unserialize_func )(Serializable *obj, Serialize::Data &)

Private Attributes

Anope::string name
unserialize_func unserialize
time_t timestamp

Static Private Attributes

static std::vector< Anope::stringTypeOrder
static std::map< Anope::string,
Serialize::Type * > 

Detailed Description

Definition at line 112 of file serialize.h.

Member Typedef Documentation

typedef Serializable*(* Serialize::unserialize_func)(Serializable *obj, Serialize::Data &)

Definition at line 114 of file serialize.h.

Constructor & Destructor Documentation

Serialize::~Type ( )

Member Function Documentation

void Serialize::Check ( )

Check if this object type has any pending changes and update them.

static Serialize::Type* Serialize::Find ( const Anope::string name)
const Anope::string& Serialize::GetName ( )

Gets the name for this type

The name, eg "NickAlias"

Definition at line 148 of file serialize.h.

References name.

Module* Serialize::GetOwner ( ) const

Definition at line 171 of file serialize.h.

time_t Serialize::GetTimestamp ( ) const

Gets the timestamp for the object type. That is, the time we know all objects of this type are updated at least to.

static const std::vector<Anope::string>& Serialize::GetTypeOrder ( )
static const std::map<Anope::string, Serialize::Type *>& Serialize::GetTypes ( )
Serialize::Type ( const Anope::string n,
unserialize_func  f,
Module owner = NULL 
Serializable* Serialize::Unserialize ( Serializable obj,
Serialize::Data data 

Unserialized an object.

objNULL if this object doesn't yet exist. If this isn't NULL, instead update the contents of this object.
dataThe data to unserialize
The unserialized object. If obj != NULL this should be obj.
void Serialize::UpdateTimestamp ( )

Bumps object type timestamp to current time

Field Documentation

Anope::string Serialize::name

Definition at line 120 of file serialize.h.

std::map<uint64_t, Serializable *> Serialize::objects

Definition at line 135 of file serialize.h.

Module* Serialize::owner

Definition at line 125 of file serialize.h.

time_t Serialize::timestamp

Definition at line 131 of file serialize.h.

std::vector<Anope::string> Serialize::TypeOrder

Definition at line 116 of file serialize.h.

std::map<Anope::string, Serialize::Type *> Serialize::Types

Definition at line 117 of file serialize.h.

unserialize_func Serialize::unserialize

Definition at line 121 of file serialize.h.

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