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

Base for all content types that can be stored in RoomMessageEvent. More...

#include <eventcontent.h>

Inheritance diagram for Quotient::EventContent::Base:

Public Member Functions

 Base (QJsonObject o={})
 
virtual ~Base ()=default
 
QJsonObject toJson () const
 
virtual QMimeType type () const =0
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&)=delete
 

Public Attributes

QJsonObject originalJson
 

Protected Member Functions

 Base (const Base &)=default
 
 Base (Base &&) noexcept=default
 
virtual void fillJson (QJsonObject &) const =0
 

Detailed Description

Base for all content types that can be stored in RoomMessageEvent.

Each content type class should have a constructor taking a QJsonObject and override fillJson() with an implementation that will fill the target QJsonObject with stored values. It is assumed but not required that a content object can also be created from plain data.

Definition at line 31 of file eventcontent.h.

Constructor & Destructor Documentation

◆ Base() [1/3]

Quotient::EventContent::Base::Base ( QJsonObject  o = {})
inlineexplicit

Definition at line 33 of file eventcontent.h.

◆ ~Base()

virtual Quotient::EventContent::Base::~Base ( )
virtualdefault

◆ Base() [2/3]

Quotient::EventContent::Base::Base ( const Base )
protecteddefault

◆ Base() [3/3]

Quotient::EventContent::Base::Base ( Base &&  )
protecteddefaultnoexcept

Member Function Documentation

◆ fillJson()

virtual void Quotient::EventContent::Base::fillJson ( QJsonObject &  ) const
protectedpure virtual

◆ operator=() [1/2]

Base& Quotient::EventContent::Base::operator= ( Base &&  )
delete

◆ operator=() [2/2]

Base& Quotient::EventContent::Base::operator= ( const Base )
delete

◆ toJson()

QJsonObject Quotient::EventContent::Base::toJson ( ) const

◆ type()

virtual QMimeType Quotient::EventContent::Base::type ( ) const
pure virtual

Member Data Documentation

◆ originalJson

QJsonObject Quotient::EventContent::Base::originalJson

Definition at line 41 of file eventcontent.h.


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