libQuotient
A Qt library for building matrix clients
Quotient::AbstractEventMetaType Class Referenceabstract

The base class for event metatypes. More...

#include <event.h>

Inheritance diagram for Quotient::AbstractEventMetaType:
Collaboration diagram for Quotient::AbstractEventMetaType:

Public Member Functions

 AbstractEventMetaType (const char *className, AbstractEventMetaType *nearestBase=nullptr, const char *matrixId=nullptr)
 
void addDerived (const AbstractEventMetaType *newType)
 
auto derivedTypes () const
 
virtual ~AbstractEventMetaType ()=default
 

Public Attributes

const char *const className
 C++ class name this metatype is for. More...
 
const AbstractEventMetaType *const baseType
 
const event_type_t matrixId
 

Protected Member Functions

virtual bool doLoadFrom (const QJsonObject &fullJson, const QString &type, Event *&event) const =0
 

Friends

template<class EventT >
class EventMetaType
 

Detailed Description

The base class for event metatypes.

You should not normally have to use this directly, unless you need to devise a whole new kind of event metatypes.

Definition at line 42 of file event.h.

Constructor & Destructor Documentation

◆ AbstractEventMetaType()

Quotient::AbstractEventMetaType::AbstractEventMetaType ( const char *  className,
AbstractEventMetaType nearestBase = nullptr,
const char *  matrixId = nullptr 
)
inlineexplicit

Definition at line 51 of file event.h.

◆ ~AbstractEventMetaType()

virtual Quotient::AbstractEventMetaType::~AbstractEventMetaType ( )
virtualdefault

Member Function Documentation

◆ addDerived()

void Quotient::AbstractEventMetaType::addDerived ( const AbstractEventMetaType newType)

◆ derivedTypes()

auto Quotient::AbstractEventMetaType::derivedTypes ( ) const
inline

Definition at line 61 of file event.h.

◆ doLoadFrom()

virtual bool Quotient::AbstractEventMetaType::doLoadFrom ( const QJsonObject &  fullJson,
const QString &  type,
Event *&  event 
) const
protectedpure virtual

Friends And Related Function Documentation

◆ EventMetaType

template<class EventT >
friend class EventMetaType
friend

Definition at line 68 of file event.h.

Member Data Documentation

◆ baseType

const AbstractEventMetaType* const Quotient::AbstractEventMetaType::baseType

Definition at line 47 of file event.h.

◆ className

const char* const Quotient::AbstractEventMetaType::className

C++ class name this metatype is for.

Definition at line 46 of file event.h.

◆ matrixId

const event_type_t Quotient::AbstractEventMetaType::matrixId

Definition at line 48 of file event.h.


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