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

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

#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
 
template<class U >
Flagoperator= (U const &that)
 
template<class U >
Flagoperator= (U &&that)
 
template<class U >
bool operator== (U const &that) const
 
template<class U >
bool operator!= (U const &that) const
 
template<class U >
bool operator< (U const &that) const
 
template<class U >
bool operator> (U const &that) const
 
template<class U >
bool operator<= (U const &that) const
 
template<class U >
bool operator>= (U const &that) const
 

Constructor & Destructor Documentation

◆ Flag() [1/3]

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

◆ Flag() [2/3]

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

◆ Flag() [3/3]

template<class T>
simgrid::config::Flag< T >::Flag ( Flag< T > const &  )
delete

Member Function Documentation

◆ operator=() [1/3]

template<class T>
Flag& simgrid::config::Flag< T >::operator= ( Flag< T > const &  )
delete

◆ get() [1/2]

template<class T>
T& simgrid::config::Flag< T >::get ( )
inline

◆ get() [2/2]

template<class T>
T const& simgrid::config::Flag< T >::get ( ) const
inline

◆ operator T &()

template<class T>
simgrid::config::Flag< T >::operator T& ( )
inline

◆ operator T const &()

template<class T>
simgrid::config::Flag< T >::operator T const & ( ) const
inline

◆ operator=() [2/3]

template<class T>
template<class U >
Flag& simgrid::config::Flag< T >::operator= ( U const &  that)
inline

◆ operator=() [3/3]

template<class T>
template<class U >
Flag& simgrid::config::Flag< T >::operator= ( U &&  that)
inline

◆ operator==()

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

◆ operator!=()

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

◆ operator<()

template<class T>
template<class U >
bool simgrid::config::Flag< T >::operator< ( U const &  that) const
inline

◆ operator>()

template<class T>
template<class U >
bool simgrid::config::Flag< T >::operator> ( U const &  that) const
inline

◆ operator<=()

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

◆ operator>=()

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

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