79 Name = strcpy(
new char[strlen(myname) + 1], myname);
105 if (pnode >= 0 && pnode ==
ippl::Comm->rank()) {
107 MsgDest =
new std::ofstream(fname, std::ios::out);
109 MsgDest =
new std::ofstream(fname, std::ios::app);
114 if (pnode >= 0 && pnode ==
ippl::Comm->rank()) {
115 std::cerr <<
"Inform: Cannot open file '" << fname <<
"'." << std::endl;
125 setup(myname, pnode);
138 setup(myname, pnode);
151 setup(myname, pnode);
192 char* stend = buf + strlen(buf);
195 while (*buf ==
'\n') {
201 while ((buf = strtok(buf,
"\n")) != 0) {
208 while (*buf ==
'\n') {
250 char* cstring =
const_cast<char*
>(
MsgBuf.c_str());
265#ifdef DEBUG_INFORM_CLASS
267int main(
int argc,
char* argv[]) {
271 Inform inf(
"Inform Test");
274 for (i = 0; i < argc; i++)
275 inf <<
"Argument " << i <<
" = " << argv[i] <<
"\n";
279 inf.setOutputLevel(3);
280 inf <<
level2 <<
"This is the second test." <<
endl;
int main(int argc, char *argv[])
Inform & level2(Inform &inf)
Inform & level4(Inform &inf)
constexpr int MAX_INFORM_LEVEL
Inform & endl(Inform &inf)
Inform & level1(Inform &inf)
Inform & level3(Inform &inf)
constexpr int MIN_INFORM_LEVEL
Inform & level5(Inform &inf)
std::unique_ptr< Inform > Info
std::unique_ptr< mpi::Communicator > Comm
Inform & outputMessage(void)
void display_single_line(char *)
Inform(const char *=0, int=0)
void setDestination(std::ostream &dest)
Inform & setOutputLevel(const int)
void display_message(char *)
std::ostringstream FormatBuf
Inform & setMessageLevel(const int)
void setup(const char *, int)