| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
PropertyParser Struct Reference

`#include <Property.hpp>`

## Static Public Member Functions

template<typename exception_t>
static int | as_int (const Property &property, const bool &check_upper_bound, const int &upper_bound, const bool &check_lower_bound, const int &lower_bound, const exception_t &exception)
| Parse a property value as an integer.
template<typename exception_t>
static double | as_double (const Property &property, const bool &check_upper_bound, const double &upper_bound, const bool &check_lower_bound, const double &lower_bound, const exception_t &exception)
| Parse a property value as a double.
static bool | as_bool (const Property &property)
| Parse a property value as a boolean.

## Member Function Documentation

## ◆ as_bool()

bool as_bool | ( | const Property & | property | ) |

inline static

Parse a property value as a boolean.

Parameters

  property | Property to parse

Returns
  The parsed boolean value

## ◆ as_double()

template<typename exception_t>

double as_double | ( | const Property & | property,
|  | const bool & | check_upper_bound,
|  | const double & | upper_bound,
|  | const bool & | check_lower_bound,
|  | const double & | lower_bound,
|  | const exception_t & | exception )

inline static

Parse a property value as a double.

Parameters

  property | Property to parse
  check_upper_bound | If true, check that the value is lower than upper_bound
  upper_bound | Upper bound to check
  check_lower_bound | If true, check that the value is greater than lower_bound
  lower_bound | Lower bound to check
  exception | Exception to throw if the value is not a valid double or if it is out of bounds

Returns
  The parsed double value

Warning
  May throw an exception_t if the value is not a valid double or if it is out of bounds.

## ◆ as_int()

template<typename exception_t>

int as_int | ( | const Property & | property,
|  | const bool & | check_upper_bound,
|  | const int & | upper_bound,
|  | const bool & | check_lower_bound,
|  | const int & | lower_bound,
|  | const exception_t & | exception )

inline static

Parse a property value as an integer.

Parameters

  property | Property to parse
  check_upper_bound | If true, check that the value is lower than upper_bound
  upper_bound | Upper bound to check
  check_lower_bound | If true, check that the value is greater than lower_bound
  lower_bound | Lower bound to check
  exception | Exception to throw if the value is not a valid integer or if it is out of bounds

Returns
  The parsed integer value

Warning
  May throw an exception_t if the value is not a valid integer or if it is out of bounds.

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

- include/fastdds/rtps/common/Property.hpp