d_debug.h

Go to the documentation of this file.
00001 #ifndef __test_debug_extra_h__
00002 #define __test_debug_extra_h__
00003 
00004 #include <iostream>
00005 #include <fstream>
00006 #include <string>
00007 
00008 #include "debug.h"
00009 
00010 #ifdef DEBUG
00011 class d_debug
00012 {
00013 public:
00014         d_debug();
00015         ~d_debug();
00016 
00017         bool open(const std::string& a_filename);
00018         bool close(void);
00019         bool is_open(void);
00020         bool get_line();
00021         bool str_equal(const std::string& a_str);
00022         bool str_begin(const std::string& a_str);
00023         bool str_end(const std::string& a_str);
00024         bool str_between(
00025                 const std::string& a_str, 
00026                 std::string::size_type a_begin, 
00027                 std::string::size_type a_end
00028                 );
00029         bool str_wrap(const std::string& a_begin, const std::string& a_end);
00030         bool str_sandwich(
00031                 const std::string& a_begin, 
00032                 const std::string& a_middle,
00033                 const std::string& a_end
00034                 );
00035 
00036 private:
00037         static const size_t m_buffer_size;
00038         char * m_buffer;
00039         std::string m_str;
00040         std::ifstream m_in;
00041         bool m_ok;
00042 
00043         void mf_clear_buffer(void);
00044 };
00045 
00046 extern d_debug ddbg;
00047 #endif
00048 
00049 #endif

Generated on Mon Jul 12 12:02:41 2004 for rvm by doxygen 1.3.6