ewmscp
..
|
#include <Options.h>
Public Types | |
typedef T | valueType |
typedef std::conditional< std::is_same< T, const char * >::value||forceRangeValueTypeString, std::string, T >::type | rangeValueType |
typedef std::conditional< forceRangeValueTypeString, std::string, T >::type | compareValueType |
Public Member Functions | |
template<class ... Types> | |
typed_base (Types ... args) | |
virtual void | fAddToRange (rangeValueType aValue) |
add a value to the range of allowed values More... | |
template<typename TT = std::string> | |
std::enable_if<(!std::is_same< rangeValueType, std::string >::value) &&std::is_same< TT, std::string >::value, void >::type | fAddToRange (const TT &aString) |
template<typename InputIt > | |
void | fAddToRange (InputIt aBegin, InputIt aEnd) |
add values from the iterator range [aBegin,aEnd) to the range of allowed values More... | |
template<typename TT > | |
void | fAddToRange (const std::vector< TT > &aRange) |
add values from a vector (may be given as initializer list) to the range of allowed values More... | |
void | fAddToRangeFromStream (std::istream &aStream) override |
void | fWriteRange (std::ostream &aStream) const override |
virtual void | fCheckValueForRange (const compareValueType &aValue) const |
![]() | |
base (char aShortName, const std::string &aLongName, const std::string &aExplanation, short aNargs) | |
construct an object of type base More... | |
virtual | ~base () |
virtual void | fAddDefaultFromStream (std::istream &aStream)=0 |
special for use in the shellScriptOptionParser More... | |
virtual void | fWriteValue (std::ostream &aStream) const =0 |
write textual representation of value to a std::ostream More... | |
virtual void | fRequire (const base *aOtherOption) |
require aOtherOption when this option is set More... | |
virtual void | fRequire (std::vector< const base * > aOtherOptions) |
add vector of other options, particlularly nice for use with initializer list More... | |
template<typename InputIt > | |
void | fRequire (InputIt aBegin, InputIt aEnd) |
add all options from the pair of iterators [aBegin,aEnd) to the list of required options More... | |
virtual void | fForbid (const base *aOtherOption) |
forbid aOtherOption when this option is set More... | |
virtual void | fForbid (std::vector< const base * > aOtherOptions) |
add vector of other options, particlularly nice for use with initializer list More... | |
template<typename InputIt > | |
void | fForbid (InputIt aBegin, InputIt aEnd) |
add all options from the pair of iterators [aBegin,aEnd) to the list of forbidden options More... | |
virtual bool | fIsSet () const |
check if this option was set, regardless of from command line or config file More... | |
virtual bool | fIsContainer () const |
const std::string & | fGetLongName () const |
returns long name of option, usually only for internal use. More... | |
Protected Attributes | |
std::multiset< rangeValueType > | lRange |
![]() | |
char | lShortName |
const std::string | lLongName |
const std::string | lExplanation |
internal::sourceItem | lSource |
short | lNargs |
bool | lHidden |
std::vector< std::string > * | lPreserveWorthyStuff |
std::vector< const base * > | lRequiredOptions |
std::vector< const base * > | lForbiddenOptions |
Additional Inherited Members | |
![]() | |
virtual void | fSetMe (std::istream &aStream, const internal::sourceItem &aSource)=0 |
function to set the value from a string, remembering the source More... | |
virtual void | fSetMeNoarg (const internal::sourceItem &) |
virtual void | fSetSource (const internal::sourceItem &aSource) |
remember the source that provided the value, e.g. commandline or a config file More... | |
virtual void | fWriteCfgLines (std::ostream &aStream, const char *aPrefix) const |
virtual void | fCheckRange () const =0 |
void | fSetPreserveWorthyStuff (std::vector< std::string > *aStuff) |
void | fHide () |
hide option, will be respected by help More... | |
bool | fIsHidden () const |
void | fDisable () |
disable option by removing it from the maps More... | |
![]() | |
static std::map< std::string, base * > & | fGetOptionMap () |
static std::map< char, base * > & | fGetShortOptionMap () |
typedef std::conditional<forceRangeValueTypeString, std::string, T>::type options::internal::typed_base< T, forceRangeValueTypeString >::compareValueType |
typedef std::conditional< std::is_same<T, const char *>::value || forceRangeValueTypeString, std::string, T >::type options::internal::typed_base< T, forceRangeValueTypeString >::rangeValueType |
typedef T options::internal::typed_base< T, forceRangeValueTypeString >::valueType |
|
inline |
|
inline |
add values from a vector (may be given as initializer list) to the range of allowed values
|
inline |
|
inline |
add values from the iterator range [aBegin,aEnd) to the range of allowed values
|
inlinevirtual |
add a value to the range of allowed values
Definition at line 458 of file Options.h.
Referenced by escapism::addAllowedNamesToOption(), requestProvider::addAllowedNamesToOption(), maskName::addToRange(), davixCfgEnum< const Davix::RequestProtocol::Protocol >::davixCfgEnum(), options::internal::typed_base< std::chrono::seconds >::fAddToRange(), options::internal::typed_base< std::chrono::seconds >::fAddToRangeFromStream(), and libsshCommon::sshOptions::sshOptions().
|
inlineoverridevirtual |
read a line from aStream and then add as many values as can be read from that line to the list of allowed values
Implements options::base.
Definition at line 480 of file Options.h.
|
inlinevirtual |
|
inlineoverridevirtual |
|
protected |