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 | Protected Member Functions | Protected Attributes | Friends | List of all members
paramkit::ParamGroup Class Reference

The class responsible for grouping parameters (objects of the type Param) More...

#include <param_group.h>

Public Member Functions

 ParamGroup (const std::string &_name)
 A constructor of a ParamGroup. More...
 
size_t printGroup (bool printGroupName, bool printRequired, bool hilightMissing, const std::string &filter="", bool isExtended=false)
 Prints the whole group of parameters (their names and descriptions), optionally with the group name. More...
 

Protected Member Functions

size_t countParams (bool printRequired, bool hilightMissing, const std::string &filter)
 
bool hasParam (Param *param)
 
bool addParam (Param *param)
 
bool removeParam (Param *param)
 

Protected Attributes

std::string name
 
std::set< Param *, ParamCompareparams
 
const int hdrColor
 
const int paramColor
 
const int separatorColor
 

Friends

class Params
 

Detailed Description

The class responsible for grouping parameters (objects of the type Param)

Definition at line 24 of file param_group.h.

Constructor & Destructor Documentation

◆ ParamGroup()

paramkit::ParamGroup::ParamGroup ( const std::string &  _name)
inline

A constructor of a ParamGroup.

Parameters
_name: a name of the group that will be used to identify it

Definition at line 30 of file param_group.h.

Member Function Documentation

◆ addParam()

bool paramkit::ParamGroup::addParam ( Param param)
inlineprotected

Definition at line 128 of file param_group.h.

Here is the call graph for this function:

◆ countParams()

size_t paramkit::ParamGroup::countParams ( bool  printRequired,
bool  hilightMissing,
const std::string &  filter 
)
inlineprotected

Definition at line 92 of file param_group.h.

Here is the call graph for this function:

◆ hasParam()

bool paramkit::ParamGroup::hasParam ( Param param)
inlineprotected

Definition at line 119 of file param_group.h.

◆ printGroup()

size_t paramkit::ParamGroup::printGroup ( bool  printGroupName,
bool  printRequired,
bool  hilightMissing,
const std::string &  filter = "",
bool  isExtended = false 
)
inline

Prints the whole group of parameters (their names and descriptions), optionally with the group name.

Parameters
printGroupName: a flag indicating if the group name will be printed
printRequired: a flag indicating if the required parameters should be printed. If true, only required are printed. If false, only optional are printed.
hilightMissing: a flag indicating if the required parameters that are not filled should be hiligted.
filter: a string that will be searched among the parameters. If filled, only the parameters that are similar to the given string are printed.
isExtended: print extended info about each parameter
Returns
number of printed parameters

Definition at line 45 of file param_group.h.

Here is the call graph for this function:

◆ removeParam()

bool paramkit::ParamGroup::removeParam ( Param param)
inlineprotected

Definition at line 135 of file param_group.h.

Friends And Related Function Documentation

◆ Params

friend class Params
friend

Definition at line 152 of file param_group.h.

Member Data Documentation

◆ hdrColor

const int paramkit::ParamGroup::hdrColor
protected

Definition at line 148 of file param_group.h.

◆ name

std::string paramkit::ParamGroup::name
protected

Definition at line 145 of file param_group.h.

◆ paramColor

const int paramkit::ParamGroup::paramColor
protected

Definition at line 149 of file param_group.h.

◆ params

std::set<Param*, ParamCompare> paramkit::ParamGroup::params
protected

Definition at line 146 of file param_group.h.

◆ separatorColor

const int paramkit::ParamGroup::separatorColor
protected

Definition at line 150 of file param_group.h.


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