CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
MetaObject::State Struct Reference

Internal state. More...

#include <MetaObject>

Inheritance diagram for MetaObject::State:

Public Member Functions

 State (const String &className=String{})
 
virtual MetaObject produce () const
 
virtual void realize ()
 
Variant value (const String &name) const
 Convenience method to get the value of member name
 
Variantvalue (const String &name)
 Convenience method to get/set the value of member name
 
- Public Member Functions inherited from Object::State
 State ()=default
 Default constructor.
 
 State (const State &)
 Copy constructor.
 
virtual ~State ()
 Virtual destructor.
 
long useCount () const
 Reference count.
 
const Stateoperator= (const State &) const
 
template<class T >
bool is () const
 Check if this state is of type T.
 
template<class T >
T & as ()
 Statically cast this state to a different type T.
 
template<class T >
const T & as () const
 Statically cast this state to a different type T.
 

Public Attributes

String className_
 
Map< String, Variantmembers_
 
List< MetaObjectchildren_
 

Detailed Description

Internal state.

Member Function Documentation

◆ value() [1/2]

Variant value ( const String & name) const

Convenience method to get the value of member name

◆ value() [2/2]

Variant & value ( const String & name)

Convenience method to get/set the value of member name