The PropertyBase class is used to hold general Property information.
More...
#include "PropertyBase.h"
|
static std::string | toString (PropertyFlag _flag) |
| Creates a string representation of the provided PropertyFlag.
|
|
static PropertyFlag | stringToFlag (const std::string &_flag) |
| Returns the PropertyFlag that is represented by the string.
|
|
static std::list< std::string > | toStringList (PropertyFlags _flags) |
| Creates a list containing strings that represent the set PropertyFlags.
|
|
static PropertyFlags | stringListToFlags (const std::list< std::string > &_flags) |
| Returns the PropertyFlags that are represented by the string list.
|
|
The PropertyBase class is used to hold general Property information.
◆ PropertyFlags
The PropertyFlag enum contains different settings for properties.
◆ PropertyFlag
The PropertyFlag enum contains different settings for properties.
Enumerator |
---|
NoFlags | |
IsReadOnly | No property flags set.
|
IsProtected | Property is read only.
|
IsHidden | Property is protected.
|
HasMultipleValues | Property is hidden to the user.
|
HasInputError | Property has multiple values.
|
IsDeletable | The value is invalid.
|
AllowCustomValues | Property is deletable.
|
AllowMultiselection | User may set user values (e.g. in the StringListProperty)
|
◆ PropertyBase() [1/3]
Default constructor.
- Parameters
-
_flags | Intially set flags. |
◆ PropertyBase() [2/3]
Assignment constructor.
- Parameters
-
_name | Property name. |
_flags | Intially set flags. |
◆ PropertyBase() [3/3]
ot::PropertyBase::PropertyBase |
( |
const PropertyBase & | _other | ) |
|
Copy constructor.
- Parameters
-
◆ ~PropertyBase()
virtual ot::PropertyBase::~PropertyBase |
( |
| ) |
|
|
inlinevirtual |
◆ addAdditionalPropertyData()
void ot::PropertyBase::addAdditionalPropertyData |
( |
const std::string & | _key, |
|
|
const std::string & | _data ) |
|
inline |
◆ addToJsonObject()
Add the object contents to the provided JSON object.
- Parameters
-
_object | Json object reference |
_allocator | Allocator |
Implements ot::Serializable.
Reimplemented in ot::Property.
◆ getAdditionalPropertyData()
std::string ot::PropertyBase::getAdditionalPropertyData |
( |
const std::string & | _key | ) |
const |
◆ getAllAdditionalPropertyData()
const std::map< std::string, std::string > & ot::PropertyBase::getAllAdditionalPropertyData |
( |
void | | ) |
const |
|
inline |
◆ getPropertyFlags() [1/2]
◆ getPropertyFlags() [2/2]
const PropertyFlags & ot::PropertyBase::getPropertyFlags |
( |
void | | ) |
const |
|
inline |
◆ getPropertyName()
const std::string & ot::PropertyBase::getPropertyName |
( |
void | | ) |
const |
|
inline |
◆ getPropertyTip() [1/2]
std::string & ot::PropertyBase::getPropertyTip |
( |
void | | ) |
|
|
inline |
◆ getPropertyTip() [2/2]
const std::string & ot::PropertyBase::getPropertyTip |
( |
void | | ) |
const |
|
inline |
◆ getPropertyTitle()
const std::string & ot::PropertyBase::getPropertyTitle |
( |
void | | ) |
const |
|
inline |
Property title If no title set the name will be used as title.
◆ getSpecialType()
const std::string & ot::PropertyBase::getSpecialType |
( |
void | | ) |
const |
|
inline |
◆ operator=()
Assignment operator.
- Parameters
-
◆ setAdditionalPropertyData()
void ot::PropertyBase::setAdditionalPropertyData |
( |
const std::map< std::string, std::string > & | _data | ) |
|
|
inline |
◆ setFromJsonObject()
Will set the object contents from the provided JSON object.
- Parameters
-
_object | The JSON object containing the information |
- Exceptions
-
Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Implements ot::Serializable.
Reimplemented in ot::Property.
◆ setPropertyFlag()
void ot::PropertyBase::setPropertyFlag |
( |
PropertyFlag | _flag, |
|
|
bool | _active = true ) |
|
inline |
◆ setPropertyFlags()
◆ setPropertyName()
void ot::PropertyBase::setPropertyName |
( |
const std::string & | _name | ) |
|
|
inline |
◆ setPropertyTip()
void ot::PropertyBase::setPropertyTip |
( |
const std::string & | _tip | ) |
|
|
inline |
◆ setPropertyTitle()
void ot::PropertyBase::setPropertyTitle |
( |
const std::string & | _title | ) |
|
|
inline |
Set the property title If no title set the name will be used as title.
◆ setSpecialType()
void ot::PropertyBase::setSpecialType |
( |
const std::string & | _type | ) |
|
|
inline |
◆ stringListToFlags()
Returns the PropertyFlags that are represented by the string list.
◆ stringToFlag()
Returns the PropertyFlag that is represented by the string.
◆ toString()
std::string ot::PropertyBase::toString |
( |
PropertyFlag | _flag | ) |
|
|
static |
Creates a string representation of the provided PropertyFlag.
◆ toStringList()
std::list< std::string > ot::PropertyBase::toStringList |
( |
PropertyFlags | _flags | ) |
|
|
static |
Creates a list containing strings that represent the set PropertyFlags.
The documentation for this class was generated from the following files: