#include <console.h>
List of all members.
Detailed Description
Definition at line 19 of file console.h.
Constructor & Destructor Documentation
Definition at line 3 of file console.cpp.
{
#if defined (GLib_CreateConsole)
Ok = (AllocConsole() != 0);
HStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
IAssert(HStdOut != INVALID_HANDLE_VALUE);
#endif
}
Definition at line 11 of file console.cpp.
{
#if defined (GLib_CreateConsole)
if (Ok) IAssert(FreeConsole());
#endif
}
Member Function Documentation
void TCon::operator() |
( |
const char * |
FmtStr, |
|
|
|
... |
|
) |
| |
Definition at line 65 of file console.cpp.
{
static char Bf [2048];
va_list valist; va_start(valist, FmtStr);
int BfL=vsnprintf(Bf, 2048, FmtStr, valist); va_end(valist);
if (BfL!=-1){PutBf((void *) Bf, BfL);}
else {PutBf((void *) Bf, 2048);}
}
TCon& TCon::operator<< |
( |
const bool & |
Bool | ) |
[inline] |
Definition at line 37 of file console.h.
{ PutCh(Bool ? 'T' : 'F'); return *this; }
TCon& TCon::operator<< |
( |
const uchar & |
UCh | ) |
[inline] |
Definition at line 38 of file console.h.
{ PutBf(&UCh, sizeof(UCh)); return *this; }
TCon& TCon::operator<< |
( |
const char & |
Ch | ) |
[inline] |
Definition at line 39 of file console.h.
{ PutBf(&Ch, sizeof(Ch)); return *this; }
TCon & TCon::operator<< |
( |
const int & |
Int | ) |
|
Definition at line 29 of file console.cpp.
{
char Bf[255];
sprintf(Bf, "%d", Int);
PutBf((void *) Bf, int(strlen(Bf)));
return *this;
}
TCon & TCon::operator<< |
( |
const uint & |
Int | ) |
|
Definition at line 36 of file console.cpp.
{
char Bf[255];
sprintf(Bf, "%u", UInt);
PutBf((void *) Bf, int(strlen(Bf)));
return *this;
}
TCon& TCon::operator<< |
( |
const short & |
Sh | ) |
[inline] |
TCon& TCon::operator<< |
( |
const ushort & |
USh | ) |
[inline] |
TCon & TCon::operator<< |
( |
const float & |
Flt | ) |
|
Definition at line 43 of file console.cpp.
{
char Bf[255];
sprintf(Bf, "%g", Flt);
PutBf((void *) Bf, int(strlen(Bf)));
return *this;
}
TCon & TCon::operator<< |
( |
const double & |
Double | ) |
|
Definition at line 51 of file console.cpp.
{
char Bf[255];
sprintf(Bf, "%g", Double);
PutBf((void *) Bf, int(strlen(Bf)));
return *this;
}
TCon & TCon::operator<< |
( |
const long double & |
LDouble | ) |
|
Definition at line 58 of file console.cpp.
{
char Bf[255];
sprintf(Bf, "%Lg", LDouble);
PutBf((void *) Bf, int(strlen(Bf)));
return *this;
}
TCon& TCon::operator<< |
( |
const char * |
CStr | ) |
[inline] |
Definition at line 47 of file console.h.
{ PutBf(CStr, int(strlen(CStr))); return *this; }
TCon& TCon::operator<< |
( |
const TStr & |
Str | ) |
[inline] |
TCon& TCon::operator<< |
( |
const TChA & |
ChA | ) |
[inline] |
Definition at line 51 of file console.h.
{ return FuncPt(*this); }
TCon& TCon::operator= |
( |
const TCon & |
| ) |
[private] |
void TCon::PutBf |
( |
const void * |
LBf, |
|
|
const int & |
LBfL |
|
) |
| |
Definition at line 17 of file console.cpp.
{
#if defined (GLib_Console)
#if defined (GLib_CreateConsole)
DWORD ChsWritten;
WriteConsole(HStdOut, LBf, LBfL, &ChsWritten, 0);
IAssert(ChsWritten == static_cast<DWORD>(LBfL));
#else
fwrite(LBf, sizeof(char), LBfL, stdout);
#endif
#endif
}
The documentation for this class was generated from the following files: