NeoPZ
Public Member Functions | Protected Member Functions | List of all members
clarg::argBool Class Reference

#include <arglib.h>

Inheritance diagram for clarg::argBool:
[legend]
Collaboration diagram for clarg::argBool:
[legend]

Public Member Functions

 argBool (const char *arg, const char *desc, bool v=false)
 
- Public Member Functions inherited from clarg::argT< bool >
 argT (const char *arg, const char *desc)
 
const bool & get_value () const
 
void set_value (const bool &v) const
 
- Public Member Functions inherited from clarg::arg_base
 arg_base (const char *name, const char *desc)
 
const string & get_name () const
 
const string & get_desc () const
 
bool was_set () const
 
void mark_set (bool m)
 

Protected Member Functions

int parse_parameters (int argc, char *argv [])
 
void write_parameters (ostream &os, bool def) const
 

Additional Inherited Members

- Protected Attributes inherited from clarg::argT< bool >
bool value
 
bool def_value
 
- Protected Attributes inherited from clarg::arg_base
bool arg_set
 
string arg_name
 
string arg_desc
 

Detailed Description

Boolean argument class.

Definition at line 284 of file arglib.h.

Constructor & Destructor Documentation

◆ argBool()

clarg::argBool::argBool ( const char *  arg,
const char *  desc,
bool  v = false 
)
inline

Definition at line 287 of file arglib.h.

Member Function Documentation

◆ parse_parameters()

int clarg::argBool::parse_parameters ( int  argc,
char *  argv[] 
)
inlineprotectedvirtual

Parse the argument parameters. Must be implemented by the specialized argument class. When parsing, make sure you copy the parsed parameters into the arg_parameters array. Returns the number of parameters parsed if ok, -1 if an error occured.

Implements clarg::arg_base.

Definition at line 294 of file arglib.h.

◆ write_parameters()

void clarg::argBool::write_parameters ( ostream &  os,
bool  def 
) const
inlineprotectedvirtual

write the argument parameters into the output stream.

Implements clarg::arg_base.

Definition at line 296 of file arglib.h.


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