Apollo 10.0
自动驾驶开放平台
|
A Parameter
holds an apollo::cyber::proto::Param, It's more human-readable, you can use basic-value type and Protobuf values to construct a paramter.
更多...
#include <parameter.h>
Public 成员函数 | |
Parameter () | |
Empty constructor | |
Parameter (const Parameter ¶meter) | |
copy constructor | |
Parameter (const std::string &name) | |
construct with paramter's name | |
Parameter (const std::string &name, const bool bool_value) | |
construct with paramter's name and bool value type | |
Parameter (const std::string &name, const int int_value) | |
construct with paramter's name and int value type | |
Parameter (const std::string &name, const int64_t int_value) | |
construct with paramter's name and int value type | |
Parameter (const std::string &name, const float float_value) | |
construct with paramter's name and float value type | |
Parameter (const std::string &name, const double double_value) | |
construct with paramter's name and double value type | |
Parameter (const std::string &name, const std::string &string_value) | |
construct with paramter's name and string value type | |
Parameter (const std::string &name, const char *string_value) | |
construct with paramter's name and char* value type | |
Parameter (const std::string &name, const std::string &msg_str, const std::string &full_name, const std::string &proto_desc) | |
use a protobuf type value to construct the parameter | |
Parameter (const std::string &name, const google::protobuf::Message &msg) | |
use a google::protobuf::Message type value to construct the parameter | |
void | FromProtoParam (const Param ¶m) |
Parse a cyber::proto::Param object to cyber::parameter::Parameter object | |
Param | ToProtoParam () const |
Parse a cyber::parameter::Parameter object to cyber::proto::Param object | |
ParamType | Type () const |
Get the cyber:parameter::ParamType of this object | |
std::string | TypeName () const |
Get Paramter's type name, i.e. | |
std::string | Descriptor () const |
Get Paramter's descriptor, only work on protobuf types | |
const std::string | Name () const |
Get the Parameter name | |
bool | AsBool () const |
Get Paramter as a bool value | |
int64_t | AsInt64 () const |
Get Paramter as an int64_t value | |
double | AsDouble () const |
et Paramter as a double value | |
const std::string | AsString () const |
Get Paramter as a string value | |
std::string | DebugString () const |
show debug string | |
template<typename ValueType > | |
std::enable_if< std::is_base_of< google::protobuf::Message, ValueType >::value, ValueType >::type | value () const |
template<typename ValueType > | |
std::enable_if< std::is_integral< ValueType >::value &&!std::is_same< ValueType, bool >::value, ValueType >::type | value () const |
template<typename ValueType > | |
std::enable_if< std::is_floating_point< ValueType >::value, ValueType >::type | value () const |
template<typename ValueType > | |
std::enable_if< std::is_convertible< ValueType, std::string >::value, conststd::string & >::type | value () const |
template<typename ValueType > | |
std::enable_if< std::is_same< ValueType, bool >::value, bool >::type | value () const |
Translate paramter value to bool type | |
A Parameter
holds an apollo::cyber::proto::Param, It's more human-readable, you can use basic-value type and Protobuf values to construct a paramter.
Parameter is identified by their name
, and you can get Parameter content by call value()
在文件 parameter.h 第 42 行定义.
apollo::cyber::Parameter::Parameter | ( | ) |
Empty constructor
在文件 parameter.cc 第 26 行定义.
|
explicit |
|
explicit |
construct with paramter's name
name | Parameter name |
在文件 parameter.cc 第 31 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const bool | bool_value | ||
) |
construct with paramter's name and bool value type
name | Parameter name |
bool_value | bool value |
在文件 parameter.cc 第 40 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const int | int_value | ||
) |
construct with paramter's name and int value type
name | Parameter name |
int_value | int value |
在文件 parameter.cc 第 47 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const int64_t | int_value | ||
) |
construct with paramter's name and int value type
name | Parameter name |
int_value | int value |
在文件 parameter.cc 第 54 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const float | float_value | ||
) |
construct with paramter's name and float value type
name | Parameter name |
float_value | float value |
在文件 parameter.cc 第 61 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const double | double_value | ||
) |
construct with paramter's name and double value type
name | Parameter name |
double_value | double value |
在文件 parameter.cc 第 68 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const std::string & | string_value | ||
) |
construct with paramter's name and string value type
name | Parameter name |
string_value | string value |
在文件 parameter.cc 第 75 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const char * | string_value | ||
) |
construct with paramter's name and char* value type
name | Parameter name |
string_value | char* value |
在文件 parameter.cc 第 82 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const std::string & | msg_str, | ||
const std::string & | full_name, | ||
const std::string & | proto_desc | ||
) |
use a protobuf type value to construct the parameter
name | Parameter name |
msg_str | protobuf contents |
full_name | the proto full name |
proto_desc | the proto's description |
在文件 parameter.cc 第 89 行定义.
apollo::cyber::Parameter::Parameter | ( | const std::string & | name, |
const google::protobuf::Message & | msg | ||
) |
use a google::protobuf::Message type value to construct the parameter
name | Parameter name |
msg | protobuf message |
在文件 parameter.cc 第 99 行定义.
|
inline |
Get Paramter as a bool value
在文件 parameter.h 第 350 行定义.
|
inline |
et Paramter as a double value
在文件 parameter.h 第 354 行定义.
|
inline |
Get Paramter as an int64_t value
在文件 parameter.h 第 352 行定义.
|
inline |
Get Paramter as a string value
在文件 parameter.h 第 356 行定义.
std::string apollo::cyber::Parameter::DebugString | ( | ) | const |
show debug string
在文件 parameter.cc 第 116 行定义.
|
inline |
Get Paramter's descriptor, only work on protobuf types
在文件 parameter.h 第 346 行定义.
void apollo::cyber::Parameter::FromProtoParam | ( | const Param & | param | ) |
Parse a cyber::proto::Param object to cyber::parameter::Parameter object
param | The cyber::proto::Param object parse from A pointer to the target Parameter object |
在文件 parameter.cc 第 112 行定义.
|
inline |
Param apollo::cyber::Parameter::ToProtoParam | ( | ) | const |
Parse a cyber::parameter::Parameter object to cyber::proto::Param object
在文件 parameter.cc 第 114 行定义.
|
inline |
Get the cyber:parameter::ParamType of this object
在文件 parameter.h 第 342 行定义.
|
inline |
Get Paramter's type name, i.e.
INT,DOUBLE,STRING or protobuf message's fullname
在文件 parameter.h 第 344 行定义.
std::enable_if< std::is_same< ValueType, bool >::value, bool >::type apollo::cyber::Parameter::value | ( | ) | const |
@brief Translate paramter value as a protobuf::Message @tparam ValueType type of the value @return std::enable_if<
std::is_base_of<google::protobuf::Message, ValueType>::value, ValueType>::type protobuf::Message type result
在文件 parameter.h 第 288 行定义.
std::enable_if< std::is_integral< ValueType >::value &&!std::is_same< ValueType, bool >::value, ValueType >::type apollo::cyber::Parameter::value | ( | ) | const |
@brief Translate paramter value to int type @tparam ValueType type of the value @return std::enable_if<std::is_integral<ValueType>::value &&
!std::is_same<ValueType, bool>::value, ValueType>::type int type result
std::enable_if< std::is_floating_point< ValueType >::value, ValueType >::type apollo::cyber::Parameter::value | ( | ) | const |
@brief Translate paramter value to bool type @tparam ValueType type of the value @return std::enable_if<std::is_floating_point<ValueType>::value,
ValueType>::type floating type result
std::enable_if< std::is_convertible< ValueType, std::string >::value, conststd::string & >::type apollo::cyber::Parameter::value | ( | ) | const |
@brief Translate paramter value to string type @tparam ValueType type of the value @return std::enable_if<std::is_convertible<ValueType, std::string>::value,
const std::string&>::type string type result
std::enable_if< std::is_same< ValueType, bool >::value, bool >::type apollo::cyber::Parameter::value | ( | ) | const |
Translate paramter value to bool type
ValueType | type of the value |