Caffa
1.1.0
C++ Application Framework for Embedded Systems with introspection
|
#include <cafObjectHandle.h>
Public Types | |
using | InheritanceStackType = std::vector< std::string > |
using | Ptr = std::shared_ptr< ObjectHandle > |
using | ConstPtr = std::shared_ptr< const ObjectHandle > |
Public Member Functions | |
virtual std::string | classKeyword () const |
virtual InheritanceStackType | classInheritanceStack () const |
virtual std::string | classDocumentation () const |
std::list< FieldHandle * > | fields () const |
std::list< MethodHandle * > | methods () const |
FieldHandle * | findField (const std::string &keyword) const |
MethodHandle * | findMethod (const std::string &keyword) const |
void | addCapability (std::unique_ptr< ObjectCapability > capability) |
template<typename CapabilityType > | |
CapabilityType * | capability () const |
virtual std::string | uuid () const |
virtual void | setUuid (const std::string &) |
virtual ObjectHandle::Ptr | deepClone (caffa::ObjectFactory *optionalObjectFactory=nullptr) const =0 |
Deep clone the object using an optional object factory. More... | |
virtual void | initAfterRead () |
void | disconnectObserverFromAllSignals (SignalObserver *observer) |
void | accept (Inspector *visitor) const |
void | accept (Editor *visitor) |
![]() | |
std::list< AbstractSignal * > | observedSignals () const |
void | addObservedSignal (AbstractSignal *signalToAdd) const |
void | removeObservedSignal (AbstractSignal *signalToRemove) const noexcept |
![]() | |
void | addEmittedSignal (AbstractSignal *signalToAdd) const |
std::list< AbstractSignal * > | emittedSignals () const |
Static Public Member Functions | |
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) |
Protected Member Functions | |
void | addField (FieldHandle *field, const std::string &keyword) |
void | addMethod (MethodHandle *method, const std::string &keyword, MethodHandle::Type type) |
The base class of all objects
void ObjectHandle::accept | ( | Editor * | visitor | ) |
Accept the visit by an editing visitor
visitor |
void ObjectHandle::accept | ( | Inspector * | visitor | ) | const |
Accept the visit by an inspecting visitor
visitor |
|
inline |
Add an object capability to the object
capability | the new capability |
|
protected |
Add a field to the object
|
protected |
Add a method to the object
|
inline |
Get an object capability of the given type
|
pure virtual |
Deep clone the object using an optional object factory.
optionalObjectFactory | if null the default object factory will be used |
Implemented in caffa::Object.
std::list< FieldHandle * > ObjectHandle::fields | ( | ) | const |
The registered fields contained in this Object.
FieldHandle * ObjectHandle::findField | ( | const std::string & | keyword | ) | const |
MethodHandle * ObjectHandle::findMethod | ( | const std::string & | keyword | ) | const |
|
inlinevirtual |
|
inlinestaticconstexpr |
Checks whether the keyword is a valid one. We accept regular letters and underscore '_'
std::list< MethodHandle * > ObjectHandle::methods | ( | ) | const |
The registered methods for this Object.