public |
Inheritance Graph
graph BT
_StringAttribute
_StringAttribute --> GenericStringAttribute
click _StringAttribute "classUtil_1_1__StringAttribute"
click GenericStringAttribute "classUtil_1_1GenericStringAttribute"
Description
Generic attribute to store a string.
Public Types
typedef _StringAttribute < StringType > | attr_t |
Public Functions
template< typename other_string_t , typename > | |
_StringAttribute(other_string_t && otherString) Construct the attribute taking a convertible string as parameter. |
|
~_StringAttribute() | |
const StringType & | get() const |
void | set(const StringType & newString) |
attr_t * | clone() const |
bool | toBool() const returns true iff the string is “true”, “TRUE” or “1” |
std::string | toString() const |
std::string | toJSON() const |
double | toDouble() const |
float | toFloat() const |
int | toInt() const |
unsigned int | toUnsignedInt() const |
bool | operator==(const GenericAttribute & void) const Per default, the comparison returns false for unspecified types. |
Documentation
typedef
Util::_StringAttribute::attr_t
public |
typedef _StringAttribute < StringType > attr_t |
Defined in Util/GenericAttribute.h:417
function
Util::_StringAttribute::_StringAttribute
public | inline | explicit |
template< typename other_string_t , typename = typename std::enable_if< std::is_convertible< other_string_t, StringType>::value>::type > | ||
_StringAttribute( | other_string_t && | otherString ) |
Construct the attribute taking a convertible string as parameter.
Defined in Util/GenericAttribute.h:425
function
Util::_StringAttribute::~_StringAttribute
public | inline | virtual |
~_StringAttribute( | ) |
Defined in Util/GenericAttribute.h:429
function
Util::_StringAttribute::get
public | const | inline |
const StringType & get( | ) const |
Return a read-only reference to the stored string.
Returns
Reference to string
Defined in Util/GenericAttribute.h:437
function
Util::_StringAttribute::set
public | inline |
void set( | const StringType & | newString ) |
Replace the stored string by the given one.
Parameters
- newString
- String replacement
Defined in Util/GenericAttribute.h:446
function
Util::_StringAttribute::clone
public | const | inline | virtual |
attr_t * clone( | ) const |
Create a copy of this object.
Returns
Exact copy.
Defined in Util/GenericAttribute.h:450
function
Util::_StringAttribute::toBool
public | const | inline | virtual |
bool toBool( | ) const |
returns true iff the string is “true”, “TRUE” or “1”
Defined in Util/GenericAttribute.h:452
function
Util::_StringAttribute::toString
public | const | inline | virtual |
std::string toString( | ) const |
Convert the object to a human-readable string.
Returns
String representation.
Defined in Util/GenericAttribute.h:453
function
Util::_StringAttribute::toJSON
public | const | inline | virtual |
std::string toJSON( | ) const |
Convert the object to JavaScript Object Notation (JSON).
Returns
JSON representation;
Defined in Util/GenericAttribute.h:454
function
Util::_StringAttribute::toDouble
public | const | inline | virtual |
double toDouble( | ) const |
Convert the object to a floating-point value with double precision.
Returns
Floating-point representation with double precision.
Defined in Util/GenericAttribute.h:455
function
Util::_StringAttribute::toFloat
public | const | inline | virtual |
float toFloat( | ) const |
Convert the object to a floating-point value.
Returns
Floating-point representation.
Defined in Util/GenericAttribute.h:456
function
Util::_StringAttribute::toInt
public | const | inline | virtual |
int toInt( | ) const |
Convert the object to an integer value.
Returns
Integer representation.
Defined in Util/GenericAttribute.h:457
function
Util::_StringAttribute::toUnsignedInt
public | const | inline | virtual |
unsigned int toUnsignedInt( | ) const |
Convert the object to an unsigned integer value.
Returns
Unsigned integer representation.
Defined in Util/GenericAttribute.h:458
function
Util::_StringAttribute::operator==
public | const | inline | virtual |
bool operator==( | const GenericAttribute & | void ) const |
Per default, the comparison returns false for unspecified types.
Defined in Util/GenericAttribute.h:459