Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

  1. #ifndef __STDSTRING_H_INCLUDED
  2. #define __STDSTRING_H_INCLUDED
  3. #include <string>
  4. class CStdString: public std::string
  5. {
  6. public:
  7. typedef std::string _Base;
  8. explicit CStdString(allocator_type _Al)
  9. : _Base(_Al) {}
  10. CStdString(const _Myt& _X)
  11. : _Base(_X) {}
  12. CStdString(const _Myt& _X, size_type _P, size_type _M, allocator_type _Al = allocator_type())
  13. : _Base(_X, _P, _M, _Al) {}
  14. CStdString(const traits_type::char_type *_S, size_type _N, allocator_type _Al = allocator_type())
  15. : _Base(_S, _N, _Al) {}
  16. CStdString(const traits_type::char_type *_S, allocator_type _Al = allocator_type())
  17. : _Base(_S, _Al) {}
  18. CStdString(size_type _N, traits_type::char_type _C, allocator_type _Al = allocator_type())
  19. : _Base(_N, _C, _Al) {}
  20. CStdString(_It _F, _It _L, allocator_type _Al = allocator_type())
  21. : _Base(_F, _L, _Al) {}
  22. CStdString() {}
  23. explicit CStdString(UINT uID)
  24. {
  25. LoadString(uID);
  26. }
  27. int LoadString(UINT uID);
  28. operator const traits_type::char_type*() const { return c_str(); }
  29. /*
  30. _Myt& operator=(const _Myt& _X)
  31. {return (assign(_X)); }
  32. _Myt& operator=(const _E *_S)
  33. {return (assign(_S)); }
  34. _Myt& operator=(_E _C)
  35. {return (assign(1, _C)); }
  36. _Myt& operator+=(const _Myt& _X)
  37. {return (append(_X)); }
  38. _Myt& operator+=(const _E *_S)
  39. {return (append(_S)); }
  40. _Myt& operator+=(_E _C)
  41. */
  42. };
  43. #endif // __STDSTRING_H_INCLUDED