#include <ImFusion/Core/Configurable.h>
#include <ImFusion/Core/Parameter.h>
#include <ImFusion/Core/Properties.h>
#include <ImFusion/Core/SubProperty.h>
{
public:
{
if (!p)
return;
}
{
if (!p)
return;
p->
param(
"count", m_count);
}
private:
int m_count = 42;
SomeOtherConfigurableClass m_nestedClass;
};
{
public:
SubProperty<SomeOtherConfigurableClass> p_nestedClass = {"NestedClass", SomeOtherConfigurableClass(), this};
}
Base interface for classes that support object serialization from/to Properties objects.
Definition Configurable.h:77
virtual void configure(const Properties *p)
Configure this object instance by de-serializing the given Properties.
virtual void configuration(Properties *p) const
Serialize the current object configuration into the given Properties object.
The Parameter class represents a single parameter of a Configurable entity.
Definition Parameter.h:53
Storage container for serialization of arbitrary types, internally backed by strings.
Definition Properties.h:50
const Properties * subProperties(const std::string &name) const
Return (first) sub-properties instance with the specified name.
void setParam(const std::string &name, const T &value, const T &defaultValue)
Set a parameter with arbitrary type and a default value.
Definition Properties.h:424
bool param(const std::string &name, T &value) const
Return the value of a parameter of arbitrary types.
Definition Properties.h:436
Properties * addSubProperties(const std::string &name)
Add sub-properties with specified name and return the created instance.
Namespace of the ImFusion SDK.
Definition Assert.h:7