OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
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 42 of file Inform.h.

Member Typedef Documentation

◆ FmtFlags_t

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

Definition at line 99 of file Inform.h.

Member Enumeration Documentation

◆ WriteMode

Enumerator
OVERWRITE 
APPEND 

Definition at line 46 of file Inform.h.

Constructor & Destructor Documentation

◆ Inform() [1/4]

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() [2/4]

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() [3/4]

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() [4/4]

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::~Inform ( void  )

Definition at line 150 of file Inform.cpp.

References MsgDest, Name, and NeedClose.

Member Function Documentation

◆ display_message()

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:

◆ display_single_line()

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:

◆ fill() [1/2]

char Inform::fill ( ) const
inline

Definition at line 110 of file Inform.h.

References FormatBuf.

◆ fill() [2/2]

char Inform::fill ( char  c)
inline

Definition at line 111 of file Inform.h.

References Physics::c, and FormatBuf.

◆ flags() [1/2]

FmtFlags_t Inform::flags ( ) const
inline

◆ flags() [2/2]

FmtFlags_t Inform::flags ( FmtFlags_t  f)
inline

Definition at line 107 of file Inform.h.

References FormatBuf.

◆ flush()

void Inform::flush ( )
inline

Definition at line 114 of file Inform.h.

References MsgDest.

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

◆ getDestination()

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

Definition at line 74 of file Inform.h.

References MsgDest.

◆ getMessageLevel()

int Inform::getMessageLevel ( void  ) const
inline

Definition at line 82 of file Inform.h.

References MsgLevel.

◆ getOutputLevel()

int Inform::getOutputLevel ( void  ) const
inline

Definition at line 78 of file Inform.h.

References OutputLevel.

Referenced by setup().

◆ getPrintNode()

int Inform::getPrintNode ( ) const
inline

Definition at line 85 of file Inform.h.

References PrintNode.

Referenced by spap().

◆ getStream()

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

Definition at line 89 of file Inform.h.

References FormatBuf.

Referenced by operator<<().

◆ isOn()

bool Inform::isOn ( ) const
inline

Definition at line 70 of file Inform.h.

References On.

◆ on()

void Inform::on ( const bool  o)
inline

Definition at line 69 of file Inform.h.

References On.

Referenced by Option::execute().

◆ openedSuccessfully()

bool Inform::openedSuccessfully ( )
inline

Definition at line 92 of file Inform.h.

References OpenedSuccessfully.

◆ outputMessage()

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:

◆ precision() [1/2]

int Inform::precision ( ) const
inline

◆ precision() [2/2]

int Inform::precision ( int  p)
inline

Definition at line 113 of file Inform.h.

References FormatBuf.

◆ setDestination()

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

Definition at line 216 of file Inform.cpp.

References MsgDest, and NeedClose.

Referenced by run_opal().

◆ setf() [1/2]

FmtFlags_t Inform::setf ( FmtFlags_t  f)
inline

Definition at line 104 of file Inform.h.

References FormatBuf.

◆ setf() [2/2]

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

◆ setMessageLevel()

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().

◆ setOutputLevel()

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().

◆ setPrintNode()

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

Definition at line 86 of file Inform.h.

References Hypervolume::n, and PrintNode.

◆ setup()

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:

◆ unsetf()

void Inform::unsetf ( FmtFlags_t  f)
inline

Definition at line 105 of file Inform.h.

References FormatBuf.

◆ width() [1/2]

int Inform::width ( ) const
inline

Definition at line 108 of file Inform.h.

References FormatBuf.

Referenced by Distribution::writeOutFileHeader().

◆ width() [2/2]

int Inform::width ( int  w)
inline

Definition at line 109 of file Inform.h.

References FormatBuf.

Member Data Documentation

◆ FormatBuf

std::ostringstream Inform::FormatBuf
private

Definition at line 122 of file Inform.h.

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

◆ MsgBuf

std::string Inform::MsgBuf
private

Definition at line 120 of file Inform.h.

Referenced by outputMessage().

◆ MsgDest

std::ostream* Inform::MsgDest
private

Definition at line 125 of file Inform.h.

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

◆ MsgLevel

int Inform::MsgLevel
private

◆ Name

char* Inform::Name
private

Definition at line 117 of file Inform.h.

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

◆ NeedClose

bool Inform::NeedClose
private

Definition at line 128 of file Inform.h.

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

◆ On

bool Inform::On
private

Definition at line 134 of file Inform.h.

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

◆ OpenedSuccessfully

bool Inform::OpenedSuccessfully
private

Definition at line 131 of file Inform.h.

Referenced by Inform(), and openedSuccessfully().

◆ OutputLevel

int Inform::OutputLevel
private

Definition at line 141 of file Inform.h.

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

◆ PrintNode

int Inform::PrintNode
private

Definition at line 137 of file Inform.h.

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


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