InspIRCd  4.0
Public Member Functions | List of all members
SimpleExtItem< T, Del > Class Template Reference

#include <extensible.h>

Inheritance diagram for SimpleExtItem< T, Del >:
ExtensionItem ServiceProvider Cullable insp::uncopiable

Public Member Functions

 SimpleExtItem (Module *parent, const std::string &Key, ExtensibleType exttype)
 
T * Get (const Extensible *container) const
 
void Set (Extensible *container, T *value, bool sync=true)
 
template<typename... Args>
void Set (Extensible *container, Args &&... args)
 
void Unset (Extensible *container, bool sync=true)
 
void Delete (Extensible *container, void *item) override
 
- Public Member Functions inherited from ExtensionItem
 ExtensionItem (Module *owner, const std::string &key, ExtensibleType exttype)
 
virtual void FromInternal (Extensible *container, const std::string &value) noexcept
 
virtual void FromNetwork (Extensible *container, const std::string &value) noexcept
 
virtual std::string ToHuman (const Extensible *container, void *item) const noexcept
 
virtual std::string ToInternal (const Extensible *container, void *item) const noexcept
 
virtual std::string ToNetwork (const Extensible *container, void *item) const noexcept
 
void RegisterService () override
 
- Public Member Functions inherited from ServiceProvider
 ServiceProvider (Module *Creator, const std::string &Name, ServiceType Type)
 
const char * GetTypeString () const
 
void DisableAutoRegister ()
 
- Public Member Functions inherited from Cullable
virtual ~Cullable ()
 
virtual Result Cull ()
 

Additional Inherited Members

- Public Types inherited from ExtensionItem
enum  ExtensibleType { EXT_USER , EXT_CHANNEL , EXT_MEMBERSHIP }
 
- Public Attributes inherited from ExtensionItem
const ExtensibleType type
 
- Public Attributes inherited from ServiceProvider
ModuleRef creator
 
const std::string name
 
const ServiceType service
 
- Protected Member Functions inherited from ExtensionItem
void * GetRaw (const Extensible *container) const
 
void * SetRaw (Extensible *container, void *value)
 
void * UnsetRaw (Extensible *container)
 
void Sync (const Extensible *container, void *item)
 
- Protected Member Functions inherited from Cullable
 Cullable ()
 

Detailed Description

template<typename T, typename Del = std::default_delete<T>>
class SimpleExtItem< T, Del >

Represents a simple ExtensionItem.

Constructor & Destructor Documentation

◆ SimpleExtItem()

template<typename T , typename Del = std::default_delete<T>>
SimpleExtItem< T, Del >::SimpleExtItem ( Module parent,
const std::string &  Key,
ExtensibleType  exttype 
)
inline

Initializes an instance of the SimpleExtItem class.

Parameters
parentThe module which created this SimpleExtItem.
KeyThe name of the extension item (e.g. ssl_cert).
exttypeThe type of Extensible that this SimpleExtItem applies to.

Member Function Documentation

◆ Delete()

template<typename T , typename Del = std::default_delete<T>>
void SimpleExtItem< T, Del >::Delete ( Extensible container,
void *  item 
)
inlineoverridevirtual

Deallocates the specified ExtensionItem value.

Parameters
containerThe container that the ExtensionItem is set on.
itemThe item to deallocate.

Implements ExtensionItem.


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