FreePOOMA
2.4.1
|
A message is sent to an Inform object by treating it as an ostream, then ending the message by sending the 'inform' manipulator. More...
#include <Inform.h>
Public Types | |
enum | { out, app } |
enum | { allContexts = (-1) } |
enum | { off = (-1), on = 0 } |
typedef int | ID_t |
typedef int | Level_t |
typedef int | Context_t |
typedef std::ios_base::fmtflags | FmtFlags_t |
Public Member Functions | |
Inform (const char *prefix=0, Context_t outputContext=0) | |
Inform (const char *prefix, const char *fname, int writemode, Context_t outputContext=0) | |
Inform (const char *prefix, std::ostream &outstream, Context_t outputContext=0) | |
~Inform () | |
const std::string & | prefix () const |
void | setPrefix (const char *prefix=0) |
ID_t | open (Context_t context=0) |
ID_t | open (const char *fname, int writemode, Context_t context=0) |
ID_t | open (std::ostream &outstream, Context_t context=0) |
void | close (ID_t) |
void | close () |
Level_t | messageLevel () const |
Inform & | setMessageLevel (Level_t newval) |
Level_t | outputLevel (ID_t id=0) const |
void | setOutputLevel (Level_t newval, ID_t id) |
void | setOutputLevel (Level_t newval) |
Context_t | outputContext (ID_t id=0) const |
void | setOutputContext (Context_t outputContext, ID_t id) |
void | setOutputContext (Context_t outputContext) |
void | flush () |
void | print () |
void | output () |
std::ostream & | stream () |
FmtFlags_t | setf (FmtFlags_t setbits, FmtFlags_t field) |
FmtFlags_t | setf (FmtFlags_t f) |
void | unsetf (FmtFlags_t f) |
long | flags () const |
long | flags (FmtFlags_t f) |
int | width () const |
int | width (int w) |
char | fill () const |
char | fill (char c) |
int | precision () const |
int | precision (int p) |
void | lock () const |
void | unlock () const |
Static Public Member Functions | |
static Context_t | context () |
static Context_t | numContexts () |
static void | setContext (Context_t c) |
static void | setNumContexts (Context_t n) |
A message is sent to an Inform object by treating it as an ostream, then ending the message by sending the 'inform' manipulator.
In fact, Inform works much like an ostream, although it may actually just use stdio for I/O.
Each message is assigned the current 'level of interest'; the lower the level, the more important it is. Each Inform object is also set for a current level; messages with a level <= the current level are displayed. Level values >= 0 should be used to print values; setting the output threshhold level to be < 0 will turn off printing of all messages.
By default, a new Inform object will only print out the message on context 0. You may change the node on which this prints with the 'printContext(int)' method; if the argument is 'allContexts', the message will be printed on ALL nodes, not just one. Or, 'printAllContexts()' can be used instead. The final argument to the constructor may also be set to the context to print on.
typedef int Inform::ID_t |
typedef int Inform::Level_t |
typedef int Inform::Context_t |
typedef std::ios_base::fmtflags Inform::FmtFlags_t |
Inform::Inform | ( | const char * | prefix = 0 , |
Context_t | outputContext = 0 |
||
) |
Inform::Inform | ( | const char * | prefix, |
const char * | fname, | ||
int | writemode, | ||
Context_t | outputContext = 0 |
||
) |
Inform::Inform | ( | const char * | prefix, |
std::ostream & | outstream, | ||
Context_t | outputContext = 0 |
||
) |
Inform::~Inform | ( | ) |
const std::string& Inform::prefix | ( | ) | const [inline] |
void Inform::setPrefix | ( | const char * | prefix = 0 | ) |
Referenced by Pooma::Tester::setPrefix().
ID_t Inform::open | ( | Context_t | context = 0 | ) |
ID_t Inform::open | ( | const char * | fname, |
int | writemode, | ||
Context_t | context = 0 |
||
) |
ID_t Inform::open | ( | std::ostream & | outstream, |
Context_t | context = 0 |
||
) |
void Inform::close | ( | ID_t | ) |
void Inform::close | ( | ) |
Level_t Inform::messageLevel | ( | ) | const [inline] |
Inform& Inform::setMessageLevel | ( | Level_t | newval | ) | [inline] |
Level_t Inform::outputLevel | ( | ID_t | id = 0 | ) | const |
void Inform::setOutputLevel | ( | Level_t | newval, |
ID_t | id | ||
) |
Referenced by Pooma::Tester::setQuiet(), and Pooma::Tester::setVerbose().
void Inform::setOutputLevel | ( | Level_t | newval | ) |
Context_t Inform::outputContext | ( | ID_t | id = 0 | ) | const |
void Inform::setOutputContext | ( | Context_t | outputContext, |
ID_t | id | ||
) |
void Inform::setOutputContext | ( | Context_t | outputContext | ) |
static Context_t Inform::context | ( | ) | [inline, static] |
static Context_t Inform::numContexts | ( | ) | [inline, static] |
static void Inform::setContext | ( | Context_t | c | ) | [inline, static] |
static void Inform::setNumContexts | ( | Context_t | n | ) | [inline, static] |
void Inform::flush | ( | ) |
void Inform::print | ( | ) | [inline] |
References flush().
Referenced by Reduction< RemoteMultiPatchEvaluatorTag >::evaluate(), and operator<<().
void Inform::output | ( | ) | [inline] |
References flush().
std::ostream& Inform::stream | ( | ) | [inline] |
Referenced by operator<<().
FmtFlags_t Inform::setf | ( | FmtFlags_t | setbits, |
FmtFlags_t | field | ||
) | [inline] |
Referenced by operator<<().
FmtFlags_t Inform::setf | ( | FmtFlags_t | f | ) | [inline] |
void Inform::unsetf | ( | FmtFlags_t | f | ) | [inline] |
long Inform::flags | ( | ) | const [inline] |
long Inform::flags | ( | FmtFlags_t | f | ) | [inline] |
int Inform::width | ( | ) | const [inline] |
int Inform::width | ( | int | w | ) | [inline] |
char Inform::fill | ( | ) | const [inline] |
char Inform::fill | ( | char | c | ) | [inline] |
int Inform::precision | ( | ) | const [inline] |
int Inform::precision | ( | int | p | ) | [inline] |
void Inform::lock | ( | ) | const [inline] |
References Pooma::DummyMutex::lock().
void Inform::unlock | ( | ) | const [inline] |
References Pooma::DummyMutex::unlock().