home *** CD-ROM | disk | FTP | other *** search
- #ifdef BUILD_TCCORE
- #define TCCORELIB __declspec(dllexport)
- #else
- #ifdef BUILD_LOCAL
- #define TCCORELIB
- #else
- #define TCCORELIB __declspec(dllimport)
- #endif
- #endif
-
- // **********************************************************************
- class TCCORELIB TC_CSharedBuffer
- {
- public: union {
- public: char m_CPtr [ 20 ];
- public: char* m_PPtr ;
- };
- public: int m_Use ;
- public: int m_Len ;
- public: int m_Alc ;
- public: TC_CSharedBuffer () ;
- public: ~TC_CSharedBuffer () ;
- public: BOOL Unuse () ;
- public: void Use ()
- {
- m_Use++;
- } // end of func
- // **********************************************************************
-
- public: void* Ptr () ;
- public: void SetSize (int size) ;
- public: void AddSize (int add) ;
-
- }; // end of class TC_CSharedBuffer
-
- // **********************************************************************
-
- // **********************************************************************
- class TCCORELIB TC_CShareData
- {
- public: TC_CSharedBuffer* m_Bf ;
- public: TC_CShareData () ;
- public: virtual ~TC_CShareData () ;
- public: void* Ptr () ;
- public: void MakePrivate () ;
- public: void SetSize (int size) ;
- public: void AddSize (int size) ;
-
- }; // end of class TC_CShareData
-
- // **********************************************************************
-
- // **********************************************************************
- class TCCORELIB TC_CSText
- : public TC_CShareData
- {
- friend TCCORELIB BOOL operator == (const char *s1, const TC_CSText & s2);
- public: TC_CSText () ;
- public: TC_CSText (const TC_CSText & src) ;
- public: TC_CSText (const char * str) ;
- public: TC_CSText (int length) ;
- public: void Set (const char * str_) ;
- public: void SetLen (int length) ;
- public: char* Get () ;
- public: int Len ( void ) ;
- public: operator const char* () ;
- public: TC_CSText & operator += (const char * str_) ;
- public: TC_CSText & operator += ( const char chr ) ;
- public: TC_CSText & operator += (const TC_CSText & str) ;
- public: TC_CSText & operator = (const TC_CSText & str) ;
- public: TC_CSText & operator = (const char * str) ;
- public: void Instantiate () ;
-
- }; // end of class TC_CSText
-
- // **********************************************************************
- TCCORELIB TC_CSText operator + (const TC_CSText & s1, const TC_CSText & s2) ;
- TCCORELIB TC_CSText operator + (const TC_CSText & s1, const char *s2) ;
- TCCORELIB TC_CSText operator + (const char *s1, const TC_CSText & s2) ;
- TCCORELIB BOOL operator == (const TC_CSText &s1, const TC_CSText &s2) ;
- TCCORELIB BOOL operator == (const TC_CSText & s1, const char *s2) ;
- TCCORELIB BOOL operator == (const char *s1, const TC_CSText & s2) ;
- TCCORELIB BOOL operator != (const TC_CSText & s1, const TC_CSText & s2) ;
- TCCORELIB BOOL operator != (const TC_CSText & s1, const char *s2) ;
- TCCORELIB BOOL operator != (const char *s1, const TC_CSText & s2) ;
-