Caffa  1.1.0
C++ Application Framework for Embedded Systems with introspection
Public Member Functions | Protected Member Functions | List of all members
caffa::Object Class Reference
Inheritance diagram for caffa::Object:
Inheritance graph
[legend]
Collaboration diagram for caffa::Object:
Collaboration graph
[legend]

Public Member Functions

 Object (bool generateUuid=true)
 
- Public Member Functions inherited from caffa::ObjectHandle
 ObjectHandle (bool generateUuid=true)
 
virtual std::string classKeyword () const
 
virtual InheritanceStackType classInheritanceStack () const
 
std::string parentClassKeyword () const
 Get the parent class keyword. More...
 
virtual std::string classDocumentation () const
 
std::vector< FieldHandle * > fields () const
 
std::vector< MethodHandle * > methods () const
 
FieldHandlefindField (const std::string &keyword) const
 
MethodHandlefindMethod (const std::string &keyword) const
 
const std::string & uuid () const
 
void setUuid (const std::string &)
 
virtual void initAfterRead ()
 
void accept (Inspector *visitor) const
 
void accept (Editor *editor)
 

Protected Member Functions

template<typename FieldType >
FieldInitHelper< FieldType > initField (FieldType &field, const std::string &keyword)
 
template<typename MethodType , typename CallbackT >
MethodInitHelper< MethodType > initMethod (MethodType &method, const std::string &keyword, CallbackT &&callback)
 
template<typename MethodType , typename CallbackT >
MethodInitHelper< MethodType > initMethodWithSession (MethodType &method, const std::string &keyword, CallbackT &&callback)
 
- Protected Member Functions inherited from caffa::ObjectHandle
void addField (FieldHandle *field, const std::string &keyword)
 
void addMethod (MethodHandle *method, const std::string &keyword)
 

Additional Inherited Members

- Public Types inherited from caffa::ObjectHandle
using InheritanceStackType = std::vector< std::string >
 
- Static Public Member Functions inherited from caffa::ObjectHandle
static std::string classKeywordStatic ()
 
static bool matchesClassKeyword (const std::string &classKeyword, const InheritanceStackType &inheritanceStack)
 
static constexpr bool isValidCharacter (char c)
 
static constexpr bool isValidKeyword (const std::string_view &type)
 

Member Function Documentation

◆ initField()

template<typename FieldType >
FieldInitHelper<FieldType> caffa::Object::initField ( FieldType &  field,
const std::string &  keyword 
)
inlineprotected

Initialises the field with a keyword and registers it with the class

Parameters
fieldA reference to the field
keywordThe field keyword. Has to be unique within the class.

◆ initMethod()

template<typename MethodType , typename CallbackT >
MethodInitHelper<MethodType> caffa::Object::initMethod ( MethodType &  method,
const std::string &  keyword,
CallbackT &&  callback 
)
inlineprotected

Initialises the method with a keyword and registers it with the class

Parameters
methodA reference to the method
keywordThe method keyword. Has to be unique within the class.
callbackThe method that will be called locally

◆ initMethodWithSession()

template<typename MethodType , typename CallbackT >
MethodInitHelper<MethodType> caffa::Object::initMethodWithSession ( MethodType &  method,
const std::string &  keyword,
CallbackT &&  callback 
)
inlineprotected

Initialises the method with a keyword and registers it with the class

Parameters
methodA reference to the method
keywordThe method keyword. Has to be unique within the class.
argumentNamesA vector of argument names
callbackThe method that will be called locally

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