OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Inform Class Reference

#include <Inform.h>

Public Types

enum  WriteMode { OVERWRITE, APPEND }
 
typedef std::ios_base::fmtflags FmtFlags_t
 

Public Member Functions

 Inform (const char *=0, int=0)
 
 Inform (const char *prefix, const char *fname, const WriteMode, int=0)
 
 Inform (const char *, std::ostream &, int=0)
 
 Inform (const char *myname, const Inform &os, int pnode=0)
 
 ~Inform ()
 
void on (const bool o)
 
bool isOn () const
 
void setDestination (std::ostream &dest)
 
std::ostream & getDestination ()
 
InformsetOutputLevel (const int)
 
int getOutputLevel (void) const
 
InformsetMessageLevel (const int)
 
int getMessageLevel (void) const
 
int getPrintNode () const
 
void setPrintNode (int n=(-1))
 
std::ostream & getStream ()
 
bool openedSuccessfully ()
 
InformoutputMessage (void)
 
FmtFlags_t setf (FmtFlags_t setbits, FmtFlags_t field)
 
FmtFlags_t setf (FmtFlags_t f)
 
void unsetf (FmtFlags_t f)
 
FmtFlags_t flags () const
 
FmtFlags_t 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 flush ()
 

Private Member Functions

void display_message (char *)
 
void display_single_line (char *)
 
void setup (const char *, int)
 

Private Attributes

char * Name
 
std::string MsgBuf
 
std::ostringstream FormatBuf
 
std::ostream * MsgDest
 
bool NeedClose
 
bool OpenedSuccessfully
 
bool On
 
int PrintNode
 
int OutputLevel
 
int MsgLevel
 

Detailed Description

Definition at line 41 of file Inform.h.

Member Typedef Documentation

typedef std::ios_base::fmtflags Inform::FmtFlags_t

Definition at line 101 of file Inform.h.

Member Enumeration Documentation

Enumerator
OVERWRITE 
APPEND 

Definition at line 45 of file Inform.h.

Constructor & Destructor Documentation

Inform::Inform ( const char *  myname = 0,
int  pnode = 0 
)

Definition at line 77 of file Inform.cpp.

References MsgDest, NeedClose, and setup().

Here is the call graph for this function:

Inform::Inform ( const char *  prefix,
const char *  fname,
const WriteMode  opnmode,
int  pnode = 0 
)

Definition at line 91 of file Inform.cpp.

References endl(), MsgDest, IpplInfo::myNode(), NeedClose, OpenedSuccessfully, OVERWRITE, and setup().

Here is the call graph for this function:

Inform::Inform ( const char *  myname,
std::ostream &  os,
int  pnode = 0 
)

Definition at line 123 of file Inform.cpp.

References MsgDest, NeedClose, and setup().

Here is the call graph for this function:

Inform::Inform ( const char *  myname,
const Inform os,
int  pnode = 0 
)

Definition at line 137 of file Inform.cpp.

References NeedClose, and setup().

Here is the call graph for this function:

Inform::~Inform ( void  )

Definition at line 150 of file Inform.cpp.

References MsgDest, Name, and NeedClose.

Member Function Documentation

void Inform::display_message ( char *  buf)
private

Definition at line 186 of file Inform.cpp.

References display_single_line(), MIN_INFORM_LEVEL, MsgLevel, On, and OutputLevel.

Referenced by outputMessage().

Here is the call graph for this function:

void Inform::display_single_line ( char *  buf)
private

Definition at line 159 of file Inform.cpp.

References endl(), IpplInfo::getNodes(), MsgDest, MsgLevel, IpplInfo::myNode(), and Name.

Referenced by display_message().

Here is the call graph for this function:

char Inform::fill ( ) const
inline

Definition at line 113 of file Inform.h.

References FormatBuf.

char Inform::fill ( char  c)
inline

Definition at line 114 of file Inform.h.

References FormatBuf.

FmtFlags_t Inform::flags ( ) const
inline
FmtFlags_t Inform::flags ( FmtFlags_t  f)
inline

Definition at line 110 of file Inform.h.

References FormatBuf.

void Inform::flush ( )
inline

Definition at line 117 of file Inform.h.

References MsgDest.

Referenced by Population< Individual_t >::computeHypervolume().

std::ostream& Inform::getDestination ( )
inline

Definition at line 73 of file Inform.h.

References MsgDest.

int Inform::getMessageLevel ( void  ) const
inline

Definition at line 81 of file Inform.h.

References MsgLevel.

int Inform::getOutputLevel ( void  ) const
inline

Definition at line 77 of file Inform.h.

References OutputLevel.

Referenced by setup().

int Inform::getPrintNode ( ) const
inline

Definition at line 84 of file Inform.h.

References PrintNode.

Referenced by spap().

std::ostream& Inform::getStream ( )
inline

Definition at line 88 of file Inform.h.

References FormatBuf.

Referenced by operator<<().

bool Inform::isOn ( ) const
inline

Definition at line 69 of file Inform.h.

References On.

void Inform::on ( const bool  o)
inline

Definition at line 68 of file Inform.h.

References On.

Referenced by Option::execute().

bool Inform::openedSuccessfully ( )
inline

Definition at line 91 of file Inform.h.

References OpenedSuccessfully.

Inform & Inform::outputMessage ( void  )

Definition at line 248 of file Inform.cpp.

References display_message(), FormatBuf, MsgBuf, IpplInfo::myNode(), and PrintNode.

Referenced by endl().

Here is the call graph for this function:

int Inform::precision ( ) const
inline
int Inform::precision ( int  p)
inline

Definition at line 116 of file Inform.h.

References FormatBuf.

void Inform::setDestination ( std::ostream &  dest)

Definition at line 216 of file Inform.cpp.

References MsgDest, and NeedClose.

Referenced by run_opal().

FmtFlags_t Inform::setf ( FmtFlags_t  setbits,
FmtFlags_t  field 
)
inline
FmtFlags_t Inform::setf ( FmtFlags_t  f)
inline

Definition at line 107 of file Inform.h.

References FormatBuf.

Inform & Inform::setMessageLevel ( const int  ol)

Definition at line 238 of file Inform.cpp.

References MAX_INFORM_LEVEL, MIN_INFORM_LEVEL, and MsgLevel.

Referenced by level1(), level2(), level3(), level4(), and level5().

Inform & Inform::setOutputLevel ( const int  ol)

Definition at line 228 of file Inform.cpp.

References MAX_INFORM_LEVEL, MIN_INFORM_LEVEL, and OutputLevel.

Referenced by IpplInfo::IpplInfo().

void Inform::setPrintNode ( int  n = (-1))
inline

Definition at line 85 of file Inform.h.

References Hypervolume::n, and PrintNode.

Referenced by FieldBlock< T, Dim, Mesh, Centering >::write().

void Inform::setup ( const char *  myname,
int  pnode 
)
private

Definition at line 55 of file Inform.cpp.

References getOutputLevel(), IpplInfo::Info, MIN_INFORM_LEVEL, MsgLevel, Name, On, OutputLevel, and PrintNode.

Referenced by Inform().

Here is the call graph for this function:

void Inform::unsetf ( FmtFlags_t  f)
inline

Definition at line 108 of file Inform.h.

References FormatBuf.

int Inform::width ( ) const
inline

Definition at line 111 of file Inform.h.

References FormatBuf.

Referenced by Distribution::writeOutFileHeader().

int Inform::width ( int  w)
inline

Definition at line 112 of file Inform.h.

References FormatBuf.

Member Data Documentation

std::ostringstream Inform::FormatBuf
private

Definition at line 125 of file Inform.h.

Referenced by fill(), flags(), getStream(), outputMessage(), precision(), setf(), unsetf(), and width().

std::string Inform::MsgBuf
private

Definition at line 123 of file Inform.h.

Referenced by outputMessage().

std::ostream* Inform::MsgDest
private

Definition at line 128 of file Inform.h.

Referenced by display_single_line(), flush(), getDestination(), Inform(), setDestination(), and ~Inform().

int Inform::MsgLevel
private
char* Inform::Name
private

Definition at line 120 of file Inform.h.

Referenced by display_single_line(), setup(), and ~Inform().

bool Inform::NeedClose
private

Definition at line 131 of file Inform.h.

Referenced by Inform(), setDestination(), and ~Inform().

bool Inform::On
private

Definition at line 137 of file Inform.h.

Referenced by display_message(), isOn(), on(), and setup().

bool Inform::OpenedSuccessfully
private

Definition at line 134 of file Inform.h.

Referenced by Inform(), and openedSuccessfully().

int Inform::OutputLevel
private

Definition at line 144 of file Inform.h.

Referenced by display_message(), getOutputLevel(), setOutputLevel(), and setup().

int Inform::PrintNode
private

Definition at line 140 of file Inform.h.

Referenced by getPrintNode(), outputMessage(), setPrintNode(), and setup().


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