00001 // str_prtc.h (C) [email protected] 00002 00012 #ifndef _str_prtc_h 00013 #define _str_prtc_h 00014 00015 #include "ADH_port.h" 00016 00029 class str_prtc { 00030 public: 00031 enum { SIZE_in = 10, 00032 SIZE_out = 1 * SIZE_in, 00033 Fix_char = '!' 00034 }; 00035 private: 00036 char _before [SIZE_out]; 00037 char _s [SIZE_in]; 00038 char _after [SIZE_out]; 00039 00040 public: 00041 str_prtc() { Fix(); } 00042 friend bool Check_Ok(const str_prtc&); 00043 bool Ok() { return Check_Ok(*this); } 00044 void Fix(); 00045 const char* operator=( const char* ); 00046 operator char* ( ) { return _s; } 00047 00048 public: 00049 const char* Before() { return _before; } 00050 const char* After() { return _after; } 00051 }; // str_prtc 00052 00053 #endif // _str_prtc_h 00054 00055 // EOF: str_prtc.h
1.4.4