Anope IRC Services  Version 2.0
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Private Attributes | Static Private Attributes
Serializable Class Referenceabstract

#include <serialize.h>

Inheritance diagram for Serializable:
Inheritance graph
[legend]
Collaboration diagram for Serializable:
Collaboration graph
[legend]

Public Member Functions

virtual ~Serializable ()
 
void QueueUpdate ()
 
bool IsCached (Serialize::Data &)
 
void UpdateCache (Serialize::Data &)
 
bool IsTSCached ()
 
void UpdateTS ()
 
Serialize::TypeGetSerializableType () const
 
virtual void Serialize (Serialize::Data &data) const =0
 
- Public Member Functions inherited from Base
 Base ()
 
virtual ~Base ()
 
void AddReference (ReferenceBase *r)
 
void DelReference (ReferenceBase *r)
 

Static Public Member Functions

static const std::list
< Serializable * > & 
GetItems ()
 

Data Fields

uint64_t id
 
unsigned short redis_ignore
 

Protected Member Functions

 Serializable (const Anope::string &serialize_type)
 
 Serializable (const Serializable &)
 
Serializableoperator= (const Serializable &)
 

Private Attributes

Serialize::Types_type
 
std::list< Serializable * >
::iterator 
s_iter
 
size_t last_commit
 
time_t last_commit_time
 

Static Private Attributes

static std::list< Serializable * > * SerializableItems
 

Detailed Description

A serialziable object. Serializable objects can be serialized into abstract data types (Serialize::Data), and then reconstructed or updated later at any time.

Definition at line 54 of file serialize.h.

Constructor & Destructor Documentation

Serializable::Serializable ( const Anope::string serialize_type)
protected

Definition at line 46 of file serialize.cpp.

References FOREACH_MOD, s_iter, s_type, and SerializableItems.

Serializable::Serializable ( const Serializable other)
protected

Definition at line 60 of file serialize.cpp.

References FOREACH_MOD, s_iter, s_type, and SerializableItems.

Serializable::~Serializable ( )
virtual

Definition at line 71 of file serialize.cpp.

References FOREACH_MOD, s_iter, and SerializableItems.

Member Function Documentation

const std::list< Serializable * > & Serializable::GetItems ( )
static

Definition at line 112 of file serialize.cpp.

References SerializableItems.

Referenced by DBFlatFile::OnSaveDatabase().

Serialize::Type* Serializable::GetSerializableType ( ) const
inline

Get the type of serializable object this is

Returns
The serializable object type

Definition at line 101 of file serialize.h.

Referenced by DatabaseRedis::InsertObject(), DBMySQL::OnNotify(), DBSQL::OnNotify(), IDInterface::OnResult(), DBFlatFile::OnSaveDatabase(), and QueueUpdate().

bool Serializable::IsCached ( Serialize::Data data)
bool Serializable::IsTSCached ( )

Definition at line 102 of file serialize.cpp.

References Anope::CurTime, and last_commit_time.

Serializable & Serializable::operator= ( const Serializable )
protected

Definition at line 78 of file serialize.cpp.

void Serializable::QueueUpdate ( )
virtual void Serializable::Serialize ( Serialize::Data data) const
pure virtual
void Serializable::UpdateCache ( Serialize::Data data)
void Serializable::UpdateTS ( )

Definition at line 107 of file serialize.cpp.

References Anope::CurTime, and last_commit_time.

Field Documentation

uint64_t Serializable::id
size_t Serializable::last_commit
private

Definition at line 69 of file serialize.h.

Referenced by IsCached(), and UpdateCache().

time_t Serializable::last_commit_time
private

Definition at line 71 of file serialize.h.

Referenced by IsTSCached(), and UpdateTS().

unsigned short Serializable::redis_ignore

Definition at line 86 of file serialize.h.

Referenced by Updater::OnResult(), and SubscriptionListener::OnResult().

std::list<Serializable *>::iterator Serializable::s_iter
private

Definition at line 67 of file serialize.h.

Referenced by Serializable(), and ~Serializable().

Serialize::Type* Serializable::s_type
private

Definition at line 64 of file serialize.h.

Referenced by Serializable().

std::list< Serializable * > * Serializable::SerializableItems
staticprivate

Definition at line 62 of file serialize.h.

Referenced by GetItems(), Serializable(), and ~Serializable().


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