|
libabigail
|
The abstraction of an interned string. More...
#include <abg-interned-str.h>
Public Member Functions | |
| interned_string () | |
| Default constructor. More... | |
| interned_string (const interned_string &o) | |
| Copy constructor. More... | |
| void | clear () |
| Clear the string. More... | |
| bool | empty () const |
| Test if the current instance of interned_string is empty. More... | |
| operator string () const | |
| Conversion operator to string. More... | |
| bool | operator!= (const interned_string &o) const |
| Inequality operator. More... | |
| bool | operator!= (const string &o) const |
| Inequality operator. More... | |
| bool | operator< (const interned_string &o) const |
| "Less than" operator. More... | |
| interned_string & | operator= (const interned_string &o) |
| Assignment operator. More... | |
| bool | operator== (const interned_string &o) const |
| Compare the current instance of interned_string against another instance of interned_string. More... | |
| bool | operator== (const string &o) const |
| Compare the current instance of interned_string against an instance of std::string. More... | |
| const string * | raw () const |
| Return the underlying pointer to std::string that this interned_string wraps. More... | |
Friends | |
| class | interned_string_pool |
The abstraction of an interned string.
It's a wrapper around a pointer to a std::string, along with a set of method that helps make this string integrate with std::string seamlessly. For instance, the type provides equality operators that help compare it against std::string.
Note that this interned_string type is design to have the same size as a pointer to a string.
Definition at line 42 of file abg-interned-str.h.
|
inline |
Default constructor.
Constructs an empty pointer to string.
Definition at line 59 of file abg-interned-str.h.
|
inline |
Copy constructor.
| o | the other instance to copy from. |
Definition at line 66 of file abg-interned-str.h.
|
inline |
Clear the string.
Definition at line 81 of file abg-interned-str.h.
|
inline |
Test if the current instance of interned_string is empty.
Definition at line 89 of file abg-interned-str.h.
|
inline |
Conversion operator to string.
Definition at line 174 of file abg-interned-str.h.
|
inline |
Inequality operator.
| o | the other interned_string to compare the current instance against. |
o. Definition at line 123 of file abg-interned-str.h.
|
inline |
Inequality operator.
Takes the current instance of interned_string and an instance of std::string.
| o | the instance of std::string to compare the current instance of interned_string against. |
o. Definition at line 154 of file abg-interned-str.h.
|
inline |
"Less than" operator.
Lexicographically compares the current instance of interned_string against another instance.
| o | the other instance of interned_string to compare against. |
o. Definition at line 167 of file abg-interned-str.h.
|
inline |
Assignment operator.
| o | the other instance to assign to the current one. |
Definition at line 73 of file abg-interned-str.h.
|
inline |
Compare the current instance of interned_string against another instance of interned_string.
Note that this comparison is done in O(1), because it compares the pointer values of the two underlying pointers to std::string held by each instances of interned_string.
| o | the other interned_string to compare against. |
o. Definition at line 112 of file abg-interned-str.h.
|
inline |
Compare the current instance of interned_string against an instance of std::string.
Note that this comparison is done in O(N), N being the size (in number of characters) of the strings being compared.
| o | the instance of std::string to compare against. |
o. Definition at line 136 of file abg-interned-str.h.
|
inline |
Return the underlying pointer to std::string that this interned_string wraps.
Definition at line 98 of file abg-interned-str.h.
|
friend |
Definition at line 181 of file abg-interned-str.h.