home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / VisualProgrammingArmoury / data1.cab / MyFileGroup / INCLUDE / SText.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-23  |  3.1 KB  |  106 lines

  1. #ifndef _INC_STEXT_HPP
  2. #define _INC_STEXT_HPP
  3. #ifdef __GNUG__
  4.  
  5. #ifdef BUILD_TCCORE
  6. #define TCCORELIB    dllexport
  7. #else
  8. #ifdef BUILD_LOCAL
  9. #define TCCORELIB
  10. #else
  11. #define TCCORELIB    dllimport
  12. #endif
  13. #endif
  14.  
  15. #else
  16.  
  17. #ifdef BUILD_TCCORE
  18. #define TCCORELIB    __declspec(dllexport)
  19. #else
  20. #ifdef BUILD_LOCAL
  21. #define TCCORELIB
  22. #else
  23. #define TCCORELIB    __declspec(dllimport)
  24. #endif
  25. #endif
  26.  
  27. #endif
  28.  
  29. // **********************************************************************
  30. class TCCORELIB TC_CSharedBuffer 
  31. {
  32. public: union {
  33. public:  char m_CPtr [ 20 ];
  34. public:  char* m_PPtr ;
  35. };
  36. public:  int m_Use ;
  37. public:  int m_Len ;
  38. public:  int m_Alc ;
  39. public:   TC_CSharedBuffer ()  ;
  40. public:   ~TC_CSharedBuffer ()  ;
  41. public:  BOOL Unuse ()  ;
  42. public:  void Use () 
  43. {
  44. m_Use++;
  45. } // end of func
  46. // **********************************************************************
  47.  
  48. public:  void* Ptr ()  ;
  49. public:  void SetSize (int size)  ;
  50. public:  void AddSize (int add)  ;
  51.  
  52. }; // end of class TC_CSharedBuffer
  53.  
  54. // **********************************************************************
  55.  
  56. // **********************************************************************
  57. class TCCORELIB TC_CShareData 
  58. {
  59. public:  TC_CSharedBuffer* m_Bf ;
  60. public:   TC_CShareData ()  ;
  61. public: virtual  ~TC_CShareData ()  ;
  62. public:  void* Ptr ()  ;
  63. public:  void MakePrivate ()  ;
  64. public:  void SetSize (int size)  ;
  65. public:  void AddSize (int size)  ;
  66.  
  67. }; // end of class TC_CShareData
  68.  
  69. // **********************************************************************
  70.  
  71. // **********************************************************************
  72. class TCCORELIB TC_CSText 
  73.     : public TC_CShareData
  74. {
  75. friend TCCORELIB BOOL operator == (const char *s1, const TC_CSText & s2);
  76. public:   TC_CSText ()  ;
  77. public:   TC_CSText (const TC_CSText & src)  ;
  78. public:   TC_CSText (const char * str)  ;
  79. public:   TC_CSText (int length)  ;
  80. public:  void Set (const char * str_)  ;
  81. public:  void SetLen (int length)  ;
  82. public:  char* Get ()  ;
  83. public:  int Len ( void )  ;
  84. public:   operator const char* ()  ;
  85. public:  TC_CSText & operator += (const char * str_)  ;
  86. public:  TC_CSText & operator += ( const char chr )  ;
  87. public:  TC_CSText & operator += (const TC_CSText & str)  ;
  88. public:  TC_CSText & operator = (const TC_CSText & str)  ;
  89. public:  TC_CSText & operator = (const char * str)  ;
  90. public:  void Instantiate ()  ;
  91.  
  92. }; // end of class TC_CSText
  93.  
  94. // **********************************************************************
  95. TCCORELIB TC_CSText operator + (const TC_CSText & s1, const TC_CSText & s2)  ;
  96. TCCORELIB TC_CSText operator + (const TC_CSText & s1, const char *s2)  ;
  97. TCCORELIB TC_CSText operator + (const char *s1, const TC_CSText & s2)  ;
  98. TCCORELIB BOOL operator == (const TC_CSText &s1, const TC_CSText &s2)  ;
  99. TCCORELIB BOOL operator == (const TC_CSText & s1, const char *s2)  ;
  100. TCCORELIB BOOL operator == (const char *s1, const TC_CSText & s2)  ;
  101. TCCORELIB BOOL operator != (const TC_CSText & s1, const TC_CSText & s2)  ;
  102. TCCORELIB BOOL operator != (const TC_CSText & s1, const char *s2)  ;
  103. TCCORELIB BOOL operator != (const char *s1, const TC_CSText & s2)  ;
  104.  
  105. #endif // _INC_STEXT_HPP
  106.