ParamKit
A small library helping to parse commandline parameters (for Windows).
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
paramkit::IntListParam Class Reference

#include <param.h>

Inheritance diagram for paramkit::IntListParam:
Inheritance graph
[legend]

Public Member Functions

 IntListParam (const std::string &_argStr, bool _isRequired, char _delimiter)
 
 IntListParam (const std::string &_argStr, bool _isRequired, std::string _delimiter)
 
virtual std::string type () const
 Returns the string representation of the parameter's type. More...
 
virtual bool parse (const char *arg)
 Parses the parameter from the given string. More...
 
size_t stripToIntElements (OUT std::set< long > &elements_list)
 
- Public Member Functions inherited from paramkit::StringListParam
 StringListParam (const std::string &_argStr, bool _isRequired, char _delimiter)
 
 StringListParam (const std::string &_argStr, bool _isRequired, std::string _delimiter)
 
size_t stripToElements (OUT std::set< std::string > &elements_list)
 
- Public Member Functions inherited from paramkit::StringParam
 StringParam (const std::string &_argStr, bool _isRequired)
 
virtual std::string valToString () const
 Returns the string representation of the parameter's value. More...
 
virtual bool isSet () const
 Returns true if the parameter is filled, false otherwise. More...
 
size_t copyToCStr (char *buf, size_t buf_max) const
 Copy the stored string value into an external buffer of a given length. More...
 
- Public Member Functions inherited from paramkit::Param
 Param (const std::string &_argStr, bool _isRequired)
 A constructor of a parameter. More...
 
 Param (const std::string &_argStr, const std::string &_typeDescStr, bool _isRequired)
 A constructor of a parameter. More...
 
virtual bool parse (const wchar_t *arg)
 Parses the parameter from the given wide string. More...
 
void setActive (bool _active)
 
virtual bool isActive () const
 Returns true if the parameter is active, false otherwise. More...
 
virtual std::string info (bool isExtended) const
 
void printInColor (int color)
 Prints the parameter using the given color. Appends the parameter switch to the name. More...
 

Additional Inherited Members

- Public Attributes inherited from paramkit::StringListParam
const std::string delimiter
 
- Public Attributes inherited from paramkit::StringParam
std::string value
 
- Protected Member Functions inherited from paramkit::Param
void printDesc (bool isExtended=true) const
 Prints a formatted description of the parameter, including its unique name, type, and the info. More...
 
virtual bool isNameSimilar (const std::string &filter)
 Checks if the param name is similar to the given filter. More...
 
virtual bool isKeywordInType (const std::string &keyword)
 Checks if the parameter type contains the keyword. More...
 
virtual bool isKeywordInDescription (const std::string &keyword)
 Checks if the description contains the keyword. More...
 
virtual std::string extendedInfo () const
 Extended information. More...
 
- Protected Attributes inherited from paramkit::Param
std::string argStr
 a unique name of the parameter More...
 
std::string typeDescStr
 a description of the type of the parameter: what type of values are allowed More...
 
std::string m_info
 a basic information about the the parameter's purpose More...
 
std::string m_extInfo
 an extended information about the the parameter's purpose More...
 
bool isRequired
 a flag indicating if this parameter is required More...
 
bool requiredArg
 a flag indicating if this parameter needs to be followed by a value More...
 
bool active
 a flag indicating if this parameter is available More...
 

Detailed Description

Definition at line 604 of file param.h.

Constructor & Destructor Documentation

◆ IntListParam() [1/2]

paramkit::IntListParam::IntListParam ( const std::string &  _argStr,
bool  _isRequired,
char  _delimiter 
)
inline

Definition at line 606 of file param.h.

◆ IntListParam() [2/2]

paramkit::IntListParam::IntListParam ( const std::string &  _argStr,
bool  _isRequired,
std::string  _delimiter 
)
inline

Definition at line 611 of file param.h.

Member Function Documentation

◆ parse()

virtual bool paramkit::IntListParam::parse ( const char *  arg)
inlinevirtual

Parses the parameter from the given string.

Reimplemented from paramkit::StringParam.

Definition at line 621 of file param.h.

Here is the call graph for this function:

◆ stripToIntElements()

size_t paramkit::IntListParam::stripToIntElements ( OUT std::set< long > &  elements_list)
inline

Definition at line 638 of file param.h.

Here is the call graph for this function:

◆ type()

virtual std::string paramkit::IntListParam::type ( ) const
inlinevirtual

Returns the string representation of the parameter's type.

Reimplemented from paramkit::StringListParam.

Definition at line 616 of file param.h.


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