"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/logit.h" (8 Sep 2001, 607 Bytes) of package /linux/privat/postal-0.76.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "logit.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef LOGIT_H
    2 #define LOGIT_H
    3 
    4 using namespace std;
    5 
    6 #include <stdio.h>
    7 
    8 #include <string>
    9 
   10 class Logit
   11 {
   12 public:
   13   Logit(const char *filename, bool is_verbose, bool numbered_files, int pid);
   14   ~Logit();
   15 
   16   int Write(const char *data, size_t len);
   17   int Write(const string &str) { return Write(str.c_str(), str.size() ); }
   18   bool verbose() const { return m_verbose; }
   19   bool reopen();
   20 
   21   Logit(const Logit &l, int pid);
   22 private:
   23   bool m_verbose;
   24   FILE *m_fp;
   25   int m_count;
   26   int m_numbered_files;
   27   string m_filename;
   28   int m_pid;
   29 
   30   Logit(const Logit&);
   31   Logit & operator=(const Logit&);
   32 };
   33 
   34 #endif
   35