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

#include <extensible.h>

Inheritance diagram for Extensible:
Cullable Serializable insp::uncopiable Channel Membership User FakeUser LocalUser RemoteUser

Public Types

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

Public Member Functions

const ExtensibleStoreGetExtList () const
 
Cullable::Result Cull () override
 
void UnhookExtensions (const std::vector< ExtensionItem * > &toRemove)
 
void FreeAllExtItems ()
 
bool Deserialize (Data &data) override
 
bool Serialize (Serializable::Data &data) override
 
- Public Member Functions inherited from Cullable
virtual ~Cullable ()
 

Friends

class ExtensionItem
 

Additional Inherited Members

- Protected Member Functions inherited from Cullable
 Cullable ()
 

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()

Cullable::Result Extensible::Cull ( )
overridevirtual

Called just before the instance is deleted to allow culling members.

Reimplemented from Cullable.

Reimplemented in FakeUser, LocalUser, and User.

◆ Deserialize()

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

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)
overridevirtual

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: