arg  1.2
a C++ command-line parser
Public Member Functions | List of all members
arg::RelValue Class Reference

double that can be relative (if it begins with '+' sign) More...

#include <val.hh>

Inheritance diagram for arg::RelValue:
Inheritance graph
[legend]
Collaboration diagram for arg::RelValue:
Collaboration graph
[legend]

Public Member Functions

 RelValue (double &var, bool &is_relative)
 a double value that can be relative More...
 
void set (std::string const &str)
 convert the str to value and put it in storage
 
std::string to_str () const
 convert the value to a string
 
std::string get_type () const
 type name of the value
 

Detailed Description

double that can be relative (if it begins with '+' sign)

Constructor & Destructor Documentation

◆ RelValue()

RelValue::RelValue ( double &  var,
bool &  is_relative 
)

a double value that can be relative

Parameters
varactual variable to stow the value
is_relativeis it relative?