Go to the previous, next section.
#include <CNCL/FormInt.h>
CN_FORMINT
CNString
w
indicates, the most right ones are ignored.
Constructors:
CNFormInt();
CNFormInt(CNParam *param);
CNFormInt(int a, int w);
CNFormInt(int a, int w, char fill);
CNFormInt(int a, int w, char fill, int f);
Initializes CNFormInt
, setting the value to the integer value a
(default = 0), the string's width, the fill character fill (default = ' ')
and the format f (default = CNFormInt::right)
The different formats implemented in CNFormInt
are:
int right = 1
int left = 2
In addition to the member functions required by CNCL, CNFormInt
provides:
int get_value();
int value();
Returns the value as an integer.
void set_value(int a);
void value(int a);
Changes the old String and the old value to a.
char get_fill();
char fill();
Returns the current fill character.
void set_fill(char f);
void fill(char f);
Changes the String to the fill character f.
int get_format();
int format();
Returns the current format as an integer. '1' descibes 'right', '2' describes left.
void set_format(int f);
void format(int f);
Changes the String to the new CNFormInt::formats f.
int get_width();
int width();
Returns the String's width as an integer.
void set_width(int w);
void width(int w);
Changes the old String's width to w.
Go to the previous, next section.