Public Types | Public Member Functions | Public Attributes | List of all members
sdf::v9::ParamPrivate Class Reference

#include <Param.hh>

Public Types

typedef std::variant< bool, char, std::string, int, std::uint64_t, unsigned int, double, float, sdf::Time, gz::math::Angle, gz::math::Color, gz::math::Vector2i, gz::math::Vector2d, gz::math::Vector3d, gz::math::Quaterniond, gz::math::Pose3d > ParamVariant
 

Public Member Functions

template<typename T >
std::string TypeToString () const
 Data type to string mapping. More...
 
bool 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...
 

Public Attributes

ParamVariant defaultValue
 This parameter's default value. More...
 
std::string description
 Description of the parameter. More...
 
std::string key
 Key value. More...
 
bool required
 True if the parameter is required. More...
 
bool set
 True if the parameter is set. More...
 
std::string typeName
 
std::function< std::any()> updateFunc
 Update function pointer. More...
 
ParamVariant value
 This parameter's value. More...
 

Member Typedef Documentation

◆ ParamVariant

typedef std::variant<bool, char, std::string, int, std::uint64_t, unsigned int, double, float, sdf::Time, gz::math::Angle, gz::math::Color, gz::math::Vector2i, gz::math::Vector2d, gz::math::Vector3d, gz::math::Quaterniond, gz::math::Pose3d> sdf::v9::ParamPrivate::ParamVariant

Member Function Documentation

◆ TypeToString()

template<typename T >
std::string sdf::v9::ParamPrivate::TypeToString

Data type to string mapping.

Returns
The type as a string, empty string if unknown type

◆ ValueFromStringImpl()

bool SDFORMAT_VISIBLE sdf::v9::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]_typeNameThe data type of the value to set
[in]_valueStrThe value as a string
[out]_valueToSetThe value to set
Returns
True if the value was successfully set, false otherwise

Member Data Documentation

◆ defaultValue

ParamVariant sdf::v9::ParamPrivate::defaultValue

This parameter's default value.

◆ description

std::string sdf::v9::ParamPrivate::description

Description of the parameter.

◆ key

std::string sdf::v9::ParamPrivate::key

Key value.

◆ required

bool sdf::v9::ParamPrivate::required

True if the parameter is required.

◆ set

bool sdf::v9::ParamPrivate::set

True if the parameter is set.

◆ typeName

std::string sdf::v9::ParamPrivate::typeName

◆ updateFunc

std::function<std::any ()> sdf::v9::ParamPrivate::updateFunc

Update function pointer.

◆ value

ParamVariant sdf::v9::ParamPrivate::value

This parameter's value.


The documentation for this class was generated from the following file: