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

#include <arglib.h>

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

Public Member Functions

 argInt (const char *arg, const char *desc, int v=0)
 
- Public Member Functions inherited from clarg::argT< int >
 argT (const char *arg, const char *desc)
 
const int & get_value () const
 
void set_value (const int &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< int >
int value
 
int def_value
 
- Protected Attributes inherited from clarg::arg_base
bool arg_set
 
string arg_name
 
string arg_desc
 

Detailed Description

Integer argument class.

Definition at line 222 of file arglib.h.

Constructor & Destructor Documentation

◆ argInt()

clarg::argInt::argInt ( const char *  arg,
const char *  desc,
int  v = 0 
)
inline

Definition at line 225 of file arglib.h.

Member Function Documentation

◆ parse_parameters()

int clarg::argInt::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 232 of file arglib.h.

◆ write_parameters()

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

write the argument parameters into the output stream.

Implements clarg::arg_base.

Definition at line 241 of file arglib.h.


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