Fast DDS  Version 3.0.1
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.
 

Member Function Documentation

◆ as_double()

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 
)
inlinestatic

Parse a property value as a double.

Parameters
propertyProperty to parse
check_upper_boundIf true, check that the value is lower than upper_bound
upper_boundUpper bound to check
check_lower_boundIf true, check that the value is greater than lower_bound
lower_boundLower bound to check
exceptionException 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 >
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 
)
inlinestatic

Parse a property value as an integer.

Parameters
propertyProperty to parse
check_upper_boundIf true, check that the value is lower than upper_bound
upper_boundUpper bound to check
check_lower_boundIf true, check that the value is greater than lower_bound
lower_boundLower bound to check
exceptionException 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: