#include <directives.h>
Inheritance diagram for conf::ConfRatio:
Public Member Functions | |
ConfRatio (std::string const &name, bool reloadable, int32_t minx, int32_t maxx, int32_t miny, int32_t maxy) | |
Constructor without default value. | |
ConfRatio (std::string const &name, misc::Ratio const &defval, bool reloadable, int32_t minx, int32_t maxx, int32_t miny, int32_t maxy) | |
Constructor with default value. | |
ConfRatio (std::string const &name, bool reloadable) | |
ConfArray-specific constructor. | |
ConfRatio (ConfRatio const &cd) | |
Copy constructor. | |
virtual ConfRatio & | operator= (ConfRatio const &right) |
Assignment operator. | |
virtual char const * | label (size_t index) const |
Implements ConfDir::label(). | |
Protected Member Functions | |
virtual bool | assign (Conf &conf, unsigned short count, std::string const params[]) |
Sets the value. | |
virtual bool | check (Conf &conf, misc::Ratio value) const |
Checks for ranges of value.x() and value.y(). | |
Protected Attributes | |
time_t | m_minx |
The minimum X value. | |
time_t | m_maxx |
The maximum X value. | |
time_t | m_miny |
The minimum Y value. | |
time_t | m_maxy |
The maximum Y value. |
It converts string expressions of a ratio in the form x:y where x and y are integers, to a value of the Ratio class.
|
This constructor sets the directive name and whether it can be reloaded, along with the minimum and maximum X and Y values that will be accepted when the directive is set.
|
|
This constructor sets the directive name, default value and whether it can be reloaded, along with the minimum and maximum X and Y values that will be accepted when the directive is set.
|
|
Transforms the string array passed by the parser into the directive's value. This function must ensure that the value is valid through a call to check() before setting it (you don't need to set m_value_set to true, this will be handled by set() when the function returns successfully).
Implements conf::ConfValue< misc::Ratio >. |