You.i Engine
YiStringUnorderedContainerKey.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_STRING_UNORDERED_CONTAINER_KEY_H_
3 #define _YI_STRING_UNORDERED_CONTAINER_KEY_H_
4 
5 #include "utility/YiString.h"
6 
22 {
23 public:
27 
32 
39 
42 
43  bool operator==(const CYIStringUnorderedContainerKey &other) const;
44  bool operator!=(const CYIStringUnorderedContainerKey &other) const;
45 
49  CYIStringView GetData() const;
50 
57  const CYIString &GetOwnedData() const;
58 
62  bool IsOwnerOfData() const;
63 
64 private:
65  CYIString m_ownedData;
66  CYIStringView m_data;
67 };
68 
69 // std::hash specialization for CYIStringUnorderedContainerKey
70 namespace std
71 {
72 template<>
73 struct hash<CYIStringUnorderedContainerKey>;
74 } // namespace std
75 
78 #include "utility/YiStringUnorderedContainerKey.inl"
79 
80 #endif
const CYIString & GetOwnedData() const
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
A CYIString wrapper that can be used as key for an unordered container (such as std::unordered_map) w...
Definition: YiStringUnorderedContainerKey.h:21
STL namespace.
CYIStringView GetData() const
CYIStringUnorderedContainerKey & operator=(const CYIStringUnorderedContainerKey &other)
bool operator==(const CYIStringUnorderedContainerKey &other) const
bool operator!=(const CYIStringUnorderedContainerKey &other) const
A lightweight wrapper around a sequence of Unicode characters.
Definition: YiStringView.h:57