InspIRCd  3.0
Public Types | Public Member Functions | Friends | List of all members
Extensible Class Reference

#include <extensible.h>

Inheritance diagram for Extensible:
classbase Serializable Channel Membership User FakeUser LocalUser RemoteUser

Public Types

typedef insp::flat_map< reference< ExtensionItem >, void * > ExtensibleStore
 

Public Member Functions

const ExtensibleStoreGetExtList () const
 
CullResult cull () CXX11_OVERRIDE
 
void doUnhookExtensions (const std::vector< reference< ExtensionItem > > &toRemove)
 
void FreeAllExtItems ()
 
bool Deserialize (Data &data) CXX11_OVERRIDE
 
bool Serialize (Serializable::Data &data) CXX11_OVERRIDE
 

Friends

class ExtensionItem
 

Detailed Description

class Extensible is the parent class of many classes such as User and Channel. class Extensible implements a system which allows modules to 'extend' the class by attaching data within a map associated with the object. In this way modules can store their own custom information within user objects, channel objects and server objects, without breaking other modules (this is more sensible than using a flags variable, and each module defining bits within the flag as 'theirs' as it is less prone to conflict and supports arbitrary data storage).

Member Function Documentation

◆ cull()

CullResult Extensible::cull ( )
virtual

Called just prior to destruction via cull list.

Reimplemented from classbase.

Reimplemented in FakeUser, LocalUser, and User.

◆ Deserialize()

bool Extensible::Deserialize ( Serializable::Data data)
virtual

Deserializes the specified Data instance into this object.

Parameters
dataThe Data object to deserialize from.
Returns
True if the deserialisation succeeded; otherwise, false.

Implements Serializable.

Reimplemented in LocalUser, and User.

◆ FreeAllExtItems()

void Extensible::FreeAllExtItems ( )

Free all extension items attached to this Extensible

◆ GetExtList()

const ExtensibleStore& Extensible::GetExtList ( ) const
inline

Get the extension items for iteraton (i.e. for metadata sync during netburst)

◆ Serialize()

bool Extensible::Serialize ( Serializable::Data data)
virtual

Deserializes the specified Data instance into this object.

Parameters
dataThe Data object to deserialize from.
Returns
True if the deserialisation succeeded; otherwise, false.

Implements Serializable.

Reimplemented in LocalUser, and User.


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