SNAP Library 2.3, User Reference
2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
Main Page
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
console.h
Go to the documentation of this file.
1
// #define GLib_Console if you want Con output
2
3
class
TCon
;
4
6
// Console-Manipulator
7
class
TConManip
{
8
protected
:
9
TConManip
() { }
10
TConManip
(
const
TConManip
&);
11
TConManip
&
operator =
(
const
TConManip
&);
12
virtual
~TConManip
();
13
public
:
14
virtual
TCon
&
operator ()
(
TCon
& Con)
const
= 0;
15
};
16
18
// Console
19
class
TCon
{
20
private
:
21
#if defined (GLib_CreateConsole)
22
bool
Ok;
23
HANDLE HStdOut;
24
#endif
25
26
private
:
27
TCon
(
const
TCon
&);
28
TCon
&
operator =
(
const
TCon
&);
29
public
:
30
TCon
();
31
~TCon
();
32
33
int
PutCh
(
const
int
& Ch) {
PutBf
((
void
*) &Ch, 1);
return
Ch; }
34
void
PutBf
(
const
void
*LBf,
const
int
& LBfL);
35
void
Flush
() { }
36
37
TCon
&
operator <<
(
const
bool
& Bool) {
PutCh
(Bool ?
'T'
:
'F'
);
return
*
this
; }
38
TCon
&
operator <<
(
const
uchar
& UCh) {
PutBf
(&UCh,
sizeof
(UCh));
return
*
this
; }
39
TCon
&
operator <<
(
const
char
& Ch) {
PutBf
(&Ch,
sizeof
(Ch));
return
*
this
; }
40
TCon
&
operator <<
(
const
int
& Int);
41
TCon
&
operator <<
(
const
uint
& Int);
42
TCon
&
operator <<
(
const
short
& Sh) {
operator<<
((
int
) Sh);
return
*
this
; }
43
TCon
&
operator <<
(
const
ushort
& USh) {
operator<<
((
uint
) USh);
return
*
this
; }
44
TCon
&
operator <<
(
const
float
& Flt);
45
TCon
&
operator <<
(
const
double
& Double);
46
TCon
&
operator <<
(
const
long
double
& LDouble);
47
TCon
&
operator <<
(
const
char
*CStr) {
PutBf
(CStr,
int
(strlen(CStr)));
return
*
this
; }
48
TCon
&
operator <<
(
const
TStr
& Str) {
PutBf
(Str.
CStr
(), Str.
Len
());
return
*
this
; }
49
TCon
&
operator <<
(
const
TChA
& ChA) {
PutBf
(ChA.
CStr
(), ChA.
Len
());
return
*
this
; }
50
TCon
&
operator <<
(
const
TConManip
& Mnp) {
return
Mnp(*
this
); }
51
TCon
&
operator <<
(
TCon
& (*FuncPt)(
TCon
&)) {
return
FuncPt(*
this
); }
52
53
void
operator ()
(
const
char
* FmtStr, ...);
54
};
55
56
TCon
&
Eol
(
TCon
& Con);
57
TCon
&
Tab
(
TCon
& Con);
58
TCon
&
Spc
(
TCon
& Con);
59
60
#if defined (GLib_Console)
61
extern
TCon
Con;
62
#endif
63
TCon
Definition:
console.h:19
TStr::Len
int Len() const
Definition:
dt.h:487
Tab
TCon & Tab(TCon &Con)
Definition:
console.cpp:77
TConManip::operator=
TConManip & operator=(const TConManip &)
uint
unsigned int uint
Definition:
bd.h:11
Eol
TCon & Eol(TCon &Con)
Definition:
console.cpp:73
TConManip
Definition:
console.h:7
TChA::Len
int Len() const
Definition:
dt.h:259
TCon::Flush
void Flush()
Definition:
console.h:35
TCon::operator<<
TCon & operator<<(const short &Sh)
Definition:
console.h:42
TConManip::operator()
virtual TCon & operator()(TCon &Con) const =0
TCon::operator<<
TCon & operator<<(const ushort &USh)
Definition:
console.h:43
TCon::PutCh
int PutCh(const int &Ch)
Definition:
console.h:33
TCon::~TCon
~TCon()
Definition:
console.cpp:11
TChA::CStr
char * CStr()
Definition:
dt.h:255
TConManip::TConManip
TConManip()
Definition:
console.h:9
uchar
unsigned char uchar
Definition:
bd.h:10
Spc
TCon & Spc(TCon &Con)
Definition:
console.cpp:81
ushort
unsigned short ushort
Definition:
bd.h:13
TChA
Definition:
dt.h:201
TConManip::~TConManip
virtual ~TConManip()
TCon::operator<<
TCon & operator<<(const bool &Bool)
Definition:
console.h:37
TStr
Definition:
dt.h:412
TCon::PutBf
void PutBf(const void *LBf, const int &LBfL)
Definition:
console.cpp:17
TCon::TCon
TCon()
Definition:
console.cpp:3
TCon::operator()
void operator()(const char *FmtStr,...)
Definition:
console.cpp:65
TStr::CStr
char * CStr()
Definition:
dt.h:476
TCon::operator=
TCon & operator=(const TCon &)
glib-core
console.h
Generated on Mon Jun 16 2014 12:00:28 for SNAP Library 2.3, User Reference by
1.8.7