SimGrid  3.13
Versatile Simulation of Distributed Systems
simgrid::config::Flag< T > Class Template Reference

A variable bound to a CLI option. More...

#include <config.hpp>

Public Member Functions

 Flag (const char *name, const char *desc, T value)
 Constructor. More...
 
template<class F >
 Flag (const char *name, const char *desc, T value, F callback)
 
 Flag (Flag const &)=delete
 
Flagoperator= (Flag const &)=delete
 
T & get ()
 
T const & get () const
 
 operator T & ()
 
 operator T const & () const
 
Flagoperator= (T const &that)
 
Flagoperator= (T &&that)
 
bool operator== (T const &that) const
 
bool operator!= (T const &that) const
 
bool operator< (T const &that) const
 
bool operator> (T const &that) const
 
bool operator<= (T const &that) const
 
bool operator>= (T const &that) const
 

Detailed Description

template<class T>
class simgrid::config::Flag< T >

A variable bound to a CLI option.


static simgrid::config::flag<int> answer("answer", "Expected answer", 42);
static simgrid::config::flag<std::string> name("name", "Ford Prefect", "John Doe");
static simgrid::config::flag<double> gamma("gamma", "Gamma factor", 1.987);

Constructor & Destructor Documentation

template<class T>
simgrid::config::Flag< T >::Flag ( const char *  name,
const char *  desc,
value 
)
inline

Constructor.

Parameters
nameFlag name
descFlag description
valueFlag initial/default value
template<class T>
template<class F >
simgrid::config::Flag< T >::Flag ( const char *  name,
const char *  desc,
value,
callback 
)
inline
template<class T>
simgrid::config::Flag< T >::Flag ( Flag< T > const &  )
delete

Member Function Documentation

template<class T>
Flag& simgrid::config::Flag< T >::operator= ( Flag< T > const &  )
delete
template<class T>
T& simgrid::config::Flag< T >::get ( )
inline
template<class T>
T const& simgrid::config::Flag< T >::get ( ) const
inline
template<class T>
simgrid::config::Flag< T >::operator T & ( )
inline
template<class T>
simgrid::config::Flag< T >::operator T const & ( ) const
inline
template<class T>
Flag& simgrid::config::Flag< T >::operator= ( T const &  that)
inline
template<class T>
Flag& simgrid::config::Flag< T >::operator= ( T &&  that)
inline
template<class T>
bool simgrid::config::Flag< T >::operator== ( T const &  that) const
inline
template<class T>
bool simgrid::config::Flag< T >::operator!= ( T const &  that) const
inline
template<class T>
bool simgrid::config::Flag< T >::operator< ( T const &  that) const
inline
template<class T>
bool simgrid::config::Flag< T >::operator> ( T const &  that) const
inline
template<class T>
bool simgrid::config::Flag< T >::operator<= ( T const &  that) const
inline
template<class T>
bool simgrid::config::Flag< T >::operator>= ( T const &  that) const
inline

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