libStatGen Software 1
Loading...
Searching...
No Matches
IntParameter Class Reference
Inheritance diagram for IntParameter:
Collaboration diagram for IntParameter:

Public Member Functions

 IntParameter (char c, const char *desc, int &v)
 
virtual void Status ()
 
- Public Member Functions inherited from Parameter
 Parameter (char c, const char *desc, void *v)
 
virtual bool Read (int argc, char **argv, int argn)
 
virtual void addParamsToString (String &params)
 
void SetWarningBuffer (String &buffer)
 
void warning (const char *format,...)
 

Protected Member Functions

virtual void Translate (const char *value)
 
virtual bool TranslateExtras (const char *value, const char *extras)
 

Additional Inherited Members

- Static Public Member Functions inherited from Parameter
static void SetNameLen (int len)
 
static void SetStatusLen (int len)
 
- Static Protected Member Functions inherited from Parameter
static bool CheckInteger (const char *value)
 
static bool CheckDouble (const char *value)
 
- Protected Attributes inherited from Parameter
char ch
 
char * description
 
void * var
 
Stringwarnings
 
bool myNoPhoneHome
 
String myVersion
 
- Static Protected Attributes inherited from Parameter
static const char PARAM_STR_SEP = ','
 
static int nameCol = 30
 
static int statusCol = 15
 

Detailed Description

Definition at line 93 of file Parameters.h.

Constructor & Destructor Documentation

◆ IntParameter()

IntParameter::IntParameter ( char  c,
const char *  desc,
int &  v 
)
inline

Definition at line 96 of file Parameters.h.

97 : Parameter(c, desc, &v)
98 {}

Member Function Documentation

◆ Status()

void IntParameter::Status ( )
virtual

Implements Parameter.

Definition at line 99 of file Parameters.cpp.

100{
101 fprintf(stderr, "%*s : %*d (-%c9999)\n", nameCol, description,
102 statusCol, *(int *) var, ch);
103}

◆ Translate()

void IntParameter::Translate ( const char *  value)
protectedvirtual

Implements Parameter.

Definition at line 84 of file Parameters.cpp.

85{
86 *(int *) var = atoi(value);
87}

◆ TranslateExtras()

bool IntParameter::TranslateExtras ( const char *  value,
const char *  extras 
)
protectedvirtual

Reimplemented from Parameter.

Definition at line 89 of file Parameters.cpp.

90{
91 if (value[0] != 0 || !CheckInteger(extras))
92 return false;
93
94 Translate(extras);
95
96 return true;
97}

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