Operator
C++ library for plugging into matrix.org
All Classes Namespaces Files Functions Typedefs Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Operator::Event::Event Class Reference

base event class. More...

#include <event.hh>

Inheritance diagram for Operator::Event::Event:
Inheritance graph
[legend]

Public Types

typedef std::function< std::unique_ptr< Event >nlohmann::json data, const std::string &)> event_builder_t
 

Public Member Functions

 Event (nlohmann::json d, const std::string &_room_id="") throw (Error::Error)
 
const std::string & getType () const throw ()
 
const nlohmann::json & getContent () const throw ()
 
const nlohmann::json & getRawData () const throw ()
 
const std::string & getRoomID () const throw ()
 

Static Public Member Functions

static std::unique_ptr< EventnewEvent (nlohmann::json data, const std::string &="") throw (Error::Error)
 
static void registerEventClass (const std::string &type, event_builder_t)
 
template<typename T >
static std::unique_ptr< Event_new_helper (nlohmann::json data, const std::string &room_id)
 

Static Public Attributes

static const std::string TYPE = "*"
 

Protected Member Functions

const std::string & get_room_name (const nlohmann::json &data, const std::string &room_id)
 

Protected Attributes

nlohmann::json data
 
std::string room_id
 

Detailed Description

base event class.

Examples:
liboperator-glib/examples/echo.cc, and liboperator-qt/examples/echo.cc.

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