Lines Matching defs:string

10 /// Declaration of types pertaining to the interned string pool used
22 #include <string>
30 using std::string;
33 /// The abstraction of an interned string.
35 /// It's a wrapper around a pointer to a std::string, along with a set
36 /// of method that helps make this string integrate with std::string
38 /// that help compare it against std::string.
41 /// same size as a pointer to a string.
44 std::string* raw_;
48 /// @param raw the pointer to string that this interned_string
50 interned_string(string* raw)
58 /// Constructs an empty pointer to string.
79 /// Clear the string.
92 /// Return the underlying pointer to std::string that this
95 /// @return a pointer to the underlying std::string, or 0 if this
97 const string*
105 /// the pointer values of the two underlying pointers to std::string
127 /// an instance of std::string.
132 /// @param o the instance of std::string to compare against.
136 operator==(const string& o) const
146 /// instance of std::string.
148 /// @param o the instance of std::string to compare the current
154 operator!=(const string& o) const
166 /// lexicographycally less than the string @p o.
169 {return static_cast<string>(*this) < static_cast<std::string>(o);}
171 /// Conversion operator to string.
173 /// @return the underlying string this instance refers too.
174 operator string() const
185 operator==(const string& l, const interned_string& r);
188 operator!=(const string& l, const interned_string& r);
193 string
194 operator+(const interned_string& s1,const string& s2);
196 string
197 operator+(const string& s1, const interned_string& s2);
204 /// It's super fast because hashing an interned string amounts to
205 /// hashing the pointer to it's underlying string. It's because
206 /// every distinct string is present only in one copy in the
221 /// The interned string pool.
236 create_string(const std::string&);