#include <Param.hh>
|
typedef std::variant< bool, char, std::string, int, std::uint64_t, unsigned int, double, float, sdf::Time, ignition::math::Angle, ignition::math::Color, ignition::math::Vector2i, ignition::math::Vector2d, ignition::math::Vector3d, ignition::math::Quaterniond, ignition::math::Pose3d > | ParamVariant |
|
|
bool | StringFromValueImpl (const PrintConfig &_config, const std::string &_typeName, const ParamVariant &_value, const std::optional< std::string > &_originalStr, std::string &_valueStr) const |
| Method used to get the string representation from a ParamVariant, or the string that was used to set it. More...
|
|
bool | StringFromValueImpl (const PrintConfig &_config, const std::string &_typeName, const ParamVariant &_value, std::string &_valueStr) const |
| Method used to get the string representation from a ParamVariant, or the string that was used to set it. More...
|
|
template<typename T > |
std::string | TypeToString () const |
| Data type to string mapping. More...
|
|
bool IGNITION_SDFORMAT_VISIBLE | ValueFromStringImpl (const std::string &_typeName, const std::string &_valueStr, ParamVariant &_valueToSet) const |
| Method used to set the Param from a passed-in string. More...
|
|
◆ ParamVariant
typedef std::variant<bool, char, std::string, int, std::uint64_t, unsigned int, double, float, sdf::Time, ignition::math::Angle, ignition::math::Color, ignition::math::Vector2i, ignition::math::Vector2d, ignition::math::Vector3d, ignition::math::Quaterniond, ignition::math::Pose3d> sdf::v12::ParamPrivate::ParamVariant |
◆ StringFromValueImpl() [1/2]
bool sdf::v12::ParamPrivate::StringFromValueImpl |
( |
const PrintConfig & |
_config, |
|
|
const std::string & |
_typeName, |
|
|
const ParamVariant & |
_value, |
|
|
const std::optional< std::string > & |
_originalStr, |
|
|
std::string & |
_valueStr |
|
) |
| const |
Method used to get the string representation from a ParamVariant, or the string that was used to set it.
- Parameters
-
[in] | _config | Print configuration for the string output |
[in] | _typeName | The data type of the value |
[in] | _value | The value |
[in] | _orignalStr | The original string that was used to set the value. A nullopt can be passed in if it is not available. |
[out] | _valueStr | The output string. |
- Returns
- True if the string was successfully retrieved, false otherwise.
◆ StringFromValueImpl() [2/2]
bool sdf::v12::ParamPrivate::StringFromValueImpl |
( |
const PrintConfig & |
_config, |
|
|
const std::string & |
_typeName, |
|
|
const ParamVariant & |
_value, |
|
|
std::string & |
_valueStr |
|
) |
| const |
Method used to get the string representation from a ParamVariant, or the string that was used to set it.
- Parameters
-
[in] | _config | Print configuration for the string output |
[in] | _typeName | The data type of the value |
[in] | _value | The value |
[out] | _valueStr | The output string. |
- Returns
- True if the string was successfully retrieved, false otherwise.
◆ TypeToString()
template<typename T >
std::string sdf::v12::ParamPrivate::TypeToString |
Data type to string mapping.
- Returns
- The type as a string, empty string if unknown type
◆ ValueFromStringImpl()
bool IGNITION_SDFORMAT_VISIBLE sdf::v12::ParamPrivate::ValueFromStringImpl |
( |
const std::string & |
_typeName, |
|
|
const std::string & |
_valueStr, |
|
|
ParamVariant & |
_valueToSet |
|
) |
| const |
Method used to set the Param from a passed-in string.
- Parameters
-
[in] | _typeName | The data type of the value to set |
[in] | _valueStr | The value as a string |
[out] | _valueToSet | The value to set |
- Returns
- True if the value was successfully set, false otherwise
◆ defaultStrValue
std::string sdf::v12::ParamPrivate::defaultStrValue |
This parameter's default value that was provided as a string.
◆ defaultValue
This parameter's default value.
◆ description
std::string sdf::v12::ParamPrivate::description |
Description of the parameter.
◆ ignoreParentAttributes
bool sdf::v12::ParamPrivate::ignoreParentAttributes |
True if the value has been parsed while ignoring its parent element's attributes, and will continue to ignore them for subsequent reparses.
◆ key
std::string sdf::v12::ParamPrivate::key |
◆ maxValue
std::optional<ParamVariant> sdf::v12::ParamPrivate::maxValue |
This parameter's maximum allowed value.
◆ minValue
std::optional<ParamVariant> sdf::v12::ParamPrivate::minValue |
This parameter's minimum allowed value.
◆ parentElement
◆ required
bool sdf::v12::ParamPrivate::required |
True if the parameter is required.
◆ set
bool sdf::v12::ParamPrivate::set |
True if the parameter is set.
◆ strValue
std::optional<std::string> sdf::v12::ParamPrivate::strValue |
This parameter's value that was provided as a string.
◆ typeName
std::string sdf::v12::ParamPrivate::typeName |
◆ updateFunc
std::function<std::any ()> sdf::v12::ParamPrivate::updateFunc |
◆ value
The documentation for this class was generated from the following file: