Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Inform.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr
00003  *cr            (C) Copyright 1995-2008 The Board of Trustees of the
00004  *cr                        University of Illinois
00005  *cr                         All Rights Reserved
00006  *cr
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: Inform.h,v $
00013  *      $Author: johns $       $Locker:  $             $State: Exp $
00014  *      $Revision: 1.24 $       $Date: 2008/03/27 19:36:40 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  * Inform - takes messages and displays them to the given ostream.
00020  *
00021  ***************************************************************************/
00022 #ifndef INFORM_H
00023 #define INFORM_H
00024 
00025 // largest message (in bytes) that can be kept
00026 #define MAX_MSG_SIZE    (1024 * 8)
00027 
00028 
00033 class Inform {
00034 private:
00035   char *name;                    
00036   char buf[MAX_MSG_SIZE+1];      
00037 
00038 public:
00039   Inform(const char *);          
00040   ~Inform();                     
00041   Inform &send();                
00042   Inform &reset();               
00043 
00045   Inform& operator<<(const char *);
00046   Inform& operator<<(char);
00047   Inform& operator<<(int);
00048   Inform& operator<<(long);
00049   Inform& operator<<(unsigned long);
00050   Inform& operator<<(double);
00051   Inform& operator<<(Inform& (*f)(Inform &));
00052 
00054   const char *text() const {
00055     return buf;
00056   }
00057 };
00058 
00059 extern Inform& sendmsg(Inform&); 
00060 extern Inform& ends(Inform&);    
00061 
00062 // XXX these are global
00063 extern Inform msgInfo;           
00064 extern Inform msgWarn;           
00065 extern Inform msgErr;            
00066 
00067 #endif // INFORM_H
00068 

Generated on Sat Aug 30 01:26:45 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002