|
Nebula
|
#include <stringatom.h>
A StringAtom.
See StringAtomTableBase for details about the StringAtom system in N3.
TODO: WARNING/STATISTICS for creation from char* or String and converting back to String!
Public Member Functions | |
| StringAtom () | |
| default constructor | |
| StringAtom (const StringAtom &rhs) | |
| copy constructor | |
| StringAtom (char *ptr) | |
| construct from char ptr | |
| StringAtom (const char *ptr) | |
| construct from char ptr | |
| StringAtom (const char *ptr, size_t len) | |
| construct from char ptr | |
| StringAtom (unsigned char *ptr) | |
| construct from char ptr | |
| StringAtom (const unsigned char *ptr) | |
| construct from char ptr | |
| StringAtom (const String &str) | |
| construct from string object | |
| StringAtom (std::nullptr_t) | |
| constructor from nullptr | |
| void | operator= (const StringAtom &rhs) |
| assignment | |
| void | operator= (const char *ptr) |
| assignment from char ptr | |
| void | operator= (const String &str) |
| assignment from string object | |
| bool | operator== (const StringAtom &rhs) const |
| equality operator | |
| bool | operator== (std::nullptr_t) const |
| equality operator for nullptr | |
| bool | operator!= (const StringAtom &rhs) const |
| inequality operator | |
| bool | operator> (const StringAtom &rhs) const |
| greater-then operator | |
| bool | operator< (const StringAtom &rhs) const |
| less-then operator | |
| bool | operator>= (const StringAtom &rhs) const |
| greater-or-equal operator | |
| bool | operator<= (const StringAtom &rhs) const |
| less-or-equal operator | |
| bool | operator== (const char *rhs) const |
| equality with char* (SLOW!) | |
| bool | operator!= (const char *rhs) const |
| inequality with char* (SLOW!) | |
| bool | operator== (const String &rhs) const |
| equality with string object (SLOW!) | |
| bool | operator!= (const String &rhs) const |
| inequality with string object (SLOW!) | |
| void | Clear () |
| clear content (becomes invalid) | |
| bool | IsValid () const |
| return true if valid (contains a non-empty string) | |
| const char * | Value () const |
| get contained string as char ptr (fast) | |
| String | AsString () const |
| get containted string as string object (SLOW!!!) | |
| uint32_t | HashCode () const |
| calculate hash code for Util::HashTable (basically just the adress) | |
| uint32_t | StringHashCode () const |
| calculate persistent hash code (based on string content) | |
| const char * | c_str () const |
| helpers to interface with libraries that expect std::string like apis | |
| size_t | length () const |
| bool | empty () const |
Private Member Functions | |
| void | Setup (const char *str) |
| setup the string atom from a string pointer | |
Private Attributes | |
| const char * | content |
| __forceinline Util::StringAtom::StringAtom | ( | ) |
default constructor
| __forceinline Util::StringAtom::StringAtom | ( | const StringAtom & | rhs | ) |
copy constructor
|
inline |
construct from char ptr
|
inline |
construct from char ptr
|
inline |
construct from char ptr
|
inline |
construct from char ptr
|
inline |
construct from char ptr
|
inline |
construct from string object
|
inline |
constructor from nullptr
|
inline |
get containted string as string object (SLOW!!!)
SLOW!
!!
| __forceinline const char * Util::StringAtom::c_str | ( | ) | const |
helpers to interface with libraries that expect std::string like apis
| __forceinline void Util::StringAtom::Clear | ( | ) |
clear content (becomes invalid)
| __forceinline bool Util::StringAtom::empty | ( | ) | const |
|
inline |
calculate hash code for Util::HashTable (basically just the adress)
| __forceinline bool Util::StringAtom::IsValid | ( | ) | const |
return true if valid (contains a non-empty string)
| __forceinline size_t Util::StringAtom::length | ( | ) | const |
| bool Util::StringAtom::operator!= | ( | const char * | rhs | ) | const |
inequality with char* (SLOW!)
Compare with raw string.
Careful, slow!
|
inline |
| __forceinline bool Util::StringAtom::operator!= | ( | const StringAtom & | rhs | ) | const |
inequality operator
| __forceinline bool Util::StringAtom::operator< | ( | const StringAtom & | rhs | ) | const |
less-then operator
| __forceinline bool Util::StringAtom::operator<= | ( | const StringAtom & | rhs | ) | const |
less-or-equal operator
|
inline |
assignment from char ptr
|
inline |
assignment from string object
| __forceinline void Util::StringAtom::operator= | ( | const StringAtom & | rhs | ) |
assignment
| bool Util::StringAtom::operator== | ( | const char * | rhs | ) | const |
equality with char* (SLOW!)
Compare with raw string.
Careful, slow!
|
inline |
| __forceinline bool Util::StringAtom::operator== | ( | const StringAtom & | rhs | ) | const |
equality operator
| bool Util::StringAtom::operator== | ( | std::nullptr_t | ) | const |
equality operator for nullptr
| __forceinline bool Util::StringAtom::operator> | ( | const StringAtom & | rhs | ) | const |
greater-then operator
| __forceinline bool Util::StringAtom::operator>= | ( | const StringAtom & | rhs | ) | const |
greater-or-equal operator
|
private |
setup the string atom from a string pointer
| uint32_t Util::StringAtom::StringHashCode | ( | ) | const |
calculate persistent hash code (based on string content)
| __forceinline const char * Util::StringAtom::Value | ( | ) | const |
get contained string as char ptr (fast)
|
private |