Lines 36-43
Link Here
|
36 |
|
36 |
|
37 |
#endif // TSTRING_DEBUG |
37 |
#endif // TSTRING_DEBUG |
38 |
|
38 |
|
39 |
template<class T> |
39 |
|
40 |
class TString{ |
40 |
template<class T> class TString; |
|
|
41 |
|
42 |
template <class T> bool operator== (const TString<T>& lhs, const TString<T>& rhs); |
43 |
template <class T> bool operator== (const TString<T>& lhs, typename TString<T>::LPCT pszRhs); |
44 |
template <class T> bool operator== (typename TString<T>::LPCT pszLhs, const TString<T>& rhs); |
45 |
template <class T> bool operator== (const TString<T>& lhs,T cRhs); |
46 |
template <class T> bool operator== (T cLhs,const TString<T>& rhs); |
47 |
template <class T> bool operator!= (const TString<T>& lhs, const TString<T>& rhs); |
48 |
template <class T> bool operator!= (const TString<T>& lhs, typename TString<T>::LPCT pszRhs); |
49 |
template <class T> bool operator!= (typename TString<T>::LPCT pszLhs, const TString<T>& rhs); |
50 |
template <class T> bool operator!= (const TString<T>& lhs,T cRhs); |
51 |
template <class T> bool operator!= (T cLhs,const TString<T>& rhs); |
52 |
template <class T> bool operator> (const TString<T>& lhs, const TString<T>& rhs); |
53 |
template <class T> bool operator> (const TString<T>& lhs, typename TString<T>::LPCT pszRhs); |
54 |
template <class T> bool operator> (typename TString<T>::LPCT pszLhs, const TString<T>& rhs); |
55 |
template <class T> bool operator> (const TString<T>& lhs,T cRhs); |
56 |
template <class T> bool operator> (T cLhs,const TString<T>& rhs); |
57 |
template <class T> bool operator< (const TString<T>& lhs, const TString<T>& rhs); |
58 |
template <class T> bool operator< (const TString<T>& lhs, typename TString<T>::LPCT pszRhs); |
59 |
template <class T> bool operator< (typename TString<T>::LPCT pszLhs, const TString<T>& rhs); |
60 |
template <class T> bool operator< (const TString<T>& lhs,T cRhs); |
61 |
template <class T> bool operator< (T cLhs,const TString<T>& rhs); |
62 |
template <class T> TString<T> operator+ (const TString<T>& lhs, const TString<T>& rhs); |
63 |
template <class T> TString<T> operator+ (const TString<T>& lhs,typename TString<T>::LPCT pszRhs); |
64 |
template <class T> TString<T> operator+ (typename TString<T>::LPCT pszLhs, const TString<T>& rhs); |
65 |
template <class T> TString<T> operator+ (const TString<T>& lhs, T cRhs); |
66 |
template <class T> TString<T> operator+ (T cLhs, const TString<T>& rhs); |
67 |
template <class T> std::ostream& operator<< (std::ostream& os, const TString<T>& st); |
68 |
template <class T> std::istream& operator>> (std::istream& is, const TString<T>& st); |
69 |
|
70 |
template<class T> |
71 |
class TString{ |
41 |
public: |
72 |
public: |
42 |
typedef T* LPT; |
73 |
typedef T* LPT; |
43 |
typedef const T* LPCT; |
74 |
typedef const T* LPCT; |
Lines 629-635
Link Here
|
629 |
template<class T> |
660 |
template<class T> |
630 |
bool operator>(const TString<T>& lhs, T cRhs) { if (!lhs.m_pBuffer) return true; return lhs.m_pBuffer[0] < cRhs; } |
661 |
bool operator>(const TString<T>& lhs, T cRhs) { if (!lhs.m_pBuffer) return true; return lhs.m_pBuffer[0] < cRhs; } |
631 |
template<class T> |
662 |
template<class T> |
632 |
bool operator>(T CLhs, const TString<T>& rhs) { if (!rhs.m_pBuffer) return false; return cLhs < rhs.m_pBuffer[0]; } |
663 |
bool operator>(T cLhs, const TString<T>& rhs) { if (!rhs.m_pBuffer) return true; return cLhs > rhs.m_pBuffer[0]; } |
633 |
|
664 |
|
634 |
template<class T> |
665 |
template<class T> |
635 |
bool operator<(const TString<T>& lhs, const TString<T>& rhs) { return 0 > TString<T>::_strcmp(lhs.m_pBuffer, rhs.m_pBuffer); } |
666 |
bool operator<(const TString<T>& lhs, const TString<T>& rhs) { return 0 > TString<T>::_strcmp(lhs.m_pBuffer, rhs.m_pBuffer); } |
Lines 640-646
Link Here
|
640 |
template<class T> |
671 |
template<class T> |
641 |
bool operator<(const TString<T>& lhs, T cRhs) { if (!lhs.m_pBuffer) return false; return lhs.m_pBuffer[0] > cRhs; } |
672 |
bool operator<(const TString<T>& lhs, T cRhs) { if (!lhs.m_pBuffer) return false; return lhs.m_pBuffer[0] > cRhs; } |
642 |
template<class T> |
673 |
template<class T> |
643 |
bool operator<(T CLhs, const TString<T>& rhs) { if (!rhs.m_pBuffer) return true; return cLhs > rhs.m_pBuffer[0]; } |
674 |
bool operator<(T cLhs, const TString<T>& rhs) { if (!rhs.m_pBuffer) return true; return cLhs > rhs.m_pBuffer[0]; } |
644 |
|
675 |
|
645 |
template<class T> |
676 |
template<class T> |
646 |
TString<T> operator+(const TString<T>& lhs, const TString<T>& rhs) { |
677 |
TString<T> operator+(const TString<T>& lhs, const TString<T>& rhs) { |