Classes | |
| class | Activator |
| Object with active/inactive state management. More... | |
| class | Any |
| Generic container for objects of any type. More... | |
| class | Array |
| Basic resizable array storage. More... | |
| class | AVLTreeNode |
| Node in AVL tree container. More... | |
| class | AVLTreeIterator |
| AVL tree iterator. More... | |
| class | AVLTree |
| Balanced binary tree container. More... | |
| class | Config |
| Configuration repository. More... | |
| class | Core |
| Core engine singleton object More... | |
| class | GlobalObject |
| Global object. More... | |
| class | Exception |
| Base exception class for all engine exceptions. More... | |
| class | NotImplementedException |
| Unimplemented method exception. More... | |
| class | InvalidValueException |
| Invalid value in method call exception. More... | |
| class | InvalidMethodException |
| Invalid method call exception. More... | |
| class | UnreachableCodeException |
| Unreachable code exception. More... | |
| class | SystemException |
| System exception. More... | |
| class | HashString |
| Hashed string. More... | |
| class | HashTableNode |
| Hash table node. More... | |
| class | HashTableIterator |
| Hash table iterator. More... | |
| class | HashTable |
| Hash table. More... | |
| class | ListNode |
| Node in list. More... | |
| class | ListIter |
| Sequential list iterator. More... | |
| class | ListConstIter |
| Sequential list const iterator. More... | |
| class | List |
| Basic double-linked list. More... | |
| class | LocaleDictionary |
| Dictionary for a single locale. More... | |
| class | Locale |
| Locale definition. More... | |
| class | LocalizationManager |
| Localization manager. More... | |
| class | Pointer |
| Smart pointer. More... | |
| class | ScopedPointer |
| Scoped pointer. More... | |
| class | ScopedArray |
| Scoped array pointer. More... | |
| class | ProfileBlock |
| Data for a profile block. More... | |
| class | ProfileManager |
| Profile manager. More... | |
| class | Queue |
| Basic queue storage. More... | |
| class | RadixSort |
| Radix sorter for primitive types. More... | |
| class | Random |
| Mersenne Twister random number generator. More... | |
| class | RefCount |
| Reference counted object base class. More... | |
| class | RefCountDebugger |
| Reference count debugger. More... | |
| class | Resource |
| Loadable named resource base class. More... | |
| class | ResourceManager |
| Resource manager More... | |
| class | SingletonBase |
| Singleton strawman class More... | |
| class | Singleton |
| Singleton base class More... | |
| class | StackTraceData |
| Stack trace data. More... | |
| class | Timer |
| Timer object providing platform-independent high-precision timing methods More... | |
| class | TypeTraits |
| Type traits. More... | |
| class | TypeMoreTraits |
| Extended type traits. More... | |
| class | TypeInfo |
| Extended type information. More... | |
| class | StringUTF8 |
| UTF-8 string. More... | |
| class | StringUTF16 |
| UTF-16 string. More... | |
| class | StringUTF32 |
| UTF-32 string. More... | |
| class | Noncopyable |
| Traits class to enforce non-copyable types. More... | |
| class | Comparator |
| Comparator function object. More... | |
Enumerations | |
| enum | Architecture { ARCHITECTURE_X86 = 0, ARCHITECTURE_X86_64 = 1, ARCHITECTURE_PPC = 2 } |
| Architecture identifiers. More... | |
| enum | Byteorder { BYTEORDER_LITTLEENDIAN = 0, BYTEORDER_BIGENDIAN = 1 } |
| Machine byte order identifiers. More... | |
| enum | CPUCaps { CPUCAPS_MMX = 0x00000001, CPUCAPS_FXSR = 0x00000002, CPUCAPS_SSE = 0x00000004, CPUCAPS_SSE2 = 0x00000008, CPUCAPS_3DNOW = 0x00000010, CPUCAPS_3DNOWEX = 0x00000020, CPUCAPS_ALTIVEC = 0x00000040, CPUCAPS_SSE3 = 0x00000080 } |
| CPU capabilities. More... | |
| enum | Platform { PLATFORM_WINDOWS, PLATFORM_LINUX, PLATFORM_MACOSX } |
| Platform identifiers. More... | |
| enum | ResourceType |
| Built-in resource types Resource type identifiers for built-in resource types in the engine. | |
Functions | |
| void | swap (Any &lval, Any &rval) |
| Swap any containers. | |
| template<typename T> | |
| void | swap (Array< T > &lval, Array< T > &rval) |
| Swap arrays. | |
| template<typename T, typename Key, typename Cmp> | |
| AVLTree< T, Cmp >::iterator | searchBestFit (AVLTree< T, Cmp > &tree, const Key &key) |
| Search tree with generic key for best fit. | |
| template<typename T, typename Cmp> | |
| void | swap (AVLTree< T, Cmp > &lval, AVLTree< T, Cmp > &rval) |
| Swap trees. | |
| void | swap (Config &lval, Config &rval) |
| Swap config repositories. | |
| template<class T> | |
| T | swapByteorder (const T &val) |
| Swap byte order. | |
| template<typename T> | |
| unsigned int | hash (const T &val, size_t len=0) |
| Hash value. | |
| template<typename Key, typename T, typename Cmp> | |
| void | swap (HashTable< Key, T, Cmp > &lval, HashTable< Key, T, Cmp > &rval) |
| Swap hash tables. | |
| template<typename T> | |
| void | swap (List< T > &lval, List< T > &rval) |
| Swap lists. | |
| void | beginProfile (const HashString &name) |
| Begin a profiling block. | |
| void | endProfile () |
| End a profiling block. | |
| template<typename T> | |
| void | swap (Queue< T > &lval, Queue< T > &rval) |
| Swap queues. | |
| std::string | getStackTrace (int skip=0, int depth=0, const std::string &prefix="") |
| Get stack trace Get strack trace as string, skipping specified number of frames and prefixing each line with given string. | |
| void | getStackTraceData (int skip, int depth, StackTraceData &data) |
| Get stack trace Get stack trace as data for later conversion to string. | |
| std::string | getStackTraceFromData (StackTraceData &data, const std::string &prefix="") |
| Get stack trace Get stack trace from data. | |
| std::string::size_type | explode (const std::string &str, const std::string &separators, Array< std::string > *p_result, bool allowempty=false) |
| Tokenize a string. | |
| size_t | explode (char *p_str, const char *p_separators, Array< char * > *p_result, bool allowempty=false) |
| Tokenize a string. | |
| std::string | strip (const std::string &str, const std::string &delimiters=" \t\n\r") |
| Strip string. | |
| std::string | replace (const std::string &str, const std::string &key, const std::string &newkey, bool repeat=false) |
| Replace all occurances in string. | |
| void | split (const std::string &str, const std::string &separators, std::string &left, std::string &right, bool allowempty=false) |
| Split a string. | |
| std::string | merge (const core::Array< const char * > &strings, const std::string &separators) |
| Merge strings. | |
| std::string | merge (const core::Array< std::string > &strings, const std::string &separators) |
| Merge strings. | |
| int | toInteger (const std::string &str) |
| Convert string to integer. | |
| unsigned int | toIntegerUnsigned (const std::string &str) |
| Convert string to unsigned integer. | |
| float | toFloat (const std::string &str) |
| Convert string to float. | |
| std::string | toString (int val, bool hex=false, bool showbase=false, unsigned int width=0, char padding= ' ') |
| Convert integer to string. | |
| std::string | toString (unsigned int val, bool hex=false, bool showbase=false, unsigned int width=0, char padding= ' ') |
| Convert unsigned integer to string. | |
| std::string | toString (int64_t val, bool hex=false, bool showbase=false, unsigned int width=0, char padding= ' ') |
| Convert integer to string. | |
| std::string | toString (uint64_t val, bool hex=false, bool showbase=false, unsigned int width=0, char padding= ' ') |
| Convert unsigned integer to string. | |
| std::string | toString (float val, bool fixed=false, unsigned int precision=0, unsigned int width=0, char padding= ' ') |
| Convert float to string. | |
| std::string | timeToString (time_t time) |
| Convert timestamp to string. | |
| std::string | encodeBase64 (const unsigned char *p_arr, unsigned int size) |
| Encode data as base64. | |
| void | decodeBase64 (const std::string &data, unsigned char *p_arr, unsigned int *p_size) |
| Decode data as base64. | |
| template<class Derived, class Base> | |
| ptrdiff_t | castPointerOffset () |
| Calculate pointer offsets. | |
| template<class Derived, class Base> | |
| ptrdiff_t | castPointerOffset (Derived *p_ptr) |
| Calculate pointer offsets. | |
| void | swap (StringUTF8 &lval, StringUTF8 &rval) |
| Swap strings. | |
| void | swap (StringUTF16 &lval, StringUTF16 &rval) |
| Swap strings. | |
| void | swap (StringUTF32 &lval, StringUTF32 &rval) |
| Swap strings. | |
| StringUTF16 | operator+ (const StringUTF16 &lhs, const StringUTF16 &rhs) |
| Concatenate strings in UTF-16 format. | |
| bool | operator== (const StringUTF8 &lhs, const StringUTF8 &rhs) |
| Compare strings in UTF-8 format. | |
| bool | operator== (const StringUTF16 &lhs, const StringUTF16 &rhs) |
| Compare strings in UTF-16 format. | |
Identifiers for all architectures the engine supports. For compile-time selection of architecture, use the NEO_ARCH_X86, NEO_ARCH_X86_64 or NEO_ARCH_PPC preprocessor macros.
| enum neo::core::Byteorder |
| enum neo::core::CPUCaps |
| enum neo::core::Platform |
| void neo::core::swap | ( | Any & | lval, | |
| Any & | rval | |||
| ) | [inline] |
Swap contents of two any containers
| lval | First container | |
| rval | Second container |
| void neo::core::swap | ( | Array< T > & | lval, | |
| Array< T > & | rval | |||
| ) | [inline] |
Swap two arrays of same type.
| lval | First array | |
| rval | Second array |
| AVLTree< T, Cmp >::iterator neo::core::searchBestFit | ( | AVLTree< T, Cmp > & | tree, | |
| const Key & | key | |||
| ) |
Search the given tree for the object best matching the given key, which is of a generic type and does not have to be related to the tree stored type. The best matching object will be the smallest object which is equal to or larger than the given key.
The search utilizes a comparator type implementing "equal" and "less" methods
Note that the key must order the tree items in the same order as the comparison between items do as when inserting nodes into the tree, or you will not get the correct results. For example, if storing pointers to compound objects in the tree with specialized methods for comparison, and forgetting to implement comparator methods for comparing with a key of unsigned int type, the search will compare the pointer addresses with the key yielding strange results. Example of correct usage:
struct Foo {
int _val;
static inline bool equal( Foo* const& p_lhs, Foo* const& p_rhs ) { return p_lhs->_val == p_rhs->_val; }
static inline bool less( Foo* const& p_lhs, Foo* const& p_rhs ) { return p_lhs->_val < p_rhs->_val; }
static inline bool lessequal( Foo* const& p_lhs, Foo* const& p_rhs ) { return p_lhs->_val <= p_rhs->_val; }
static inline bool equal( Foo* const& p_lhs, const int& val ) { return p_lhs->_val == val; }
static inline bool less( Foo* const& p_lhs, const int& val ) { return p_lhs->_val < val; }
static inline bool lessequal( Foo* const& p_lhs, const int& val ) { return p_lhs->_val <= val; }
}
AVLTree< Foo*, Foo > tree;
// ..insert items in tree
AVLTree< Foo*, Foo >::iterator pp_node = searchBestFit( tree, 10 );
// pp_node will now point to the Foo item with the _val equal to 10 or the
// Foo item with the smallest _val greater than 10
| tree | The tree to search | |
| key | Key |
| void neo::core::swap | ( | AVLTree< T, Cmp > & | lval, | |
| AVLTree< T, Cmp > & | rval | |||
| ) | [inline] |
Swap two AVL trees of same type.
| lval | First tree | |
| rval | Second tree |
| void neo::core::swap | ( | Config & | lval, | |
| Config & | rval | |||
| ) | [inline] |
Swap contents of two configuration repositories
| lval | First container | |
| rval | Second container |
| T neo::core::swapByteorder | ( | const T & | val | ) | [inline] |
Swap the byte order of object
| val | Value |
| unsigned int neo::core::hash | ( | const T & | val, | |
| size_t | len = 0 | |||
| ) | [inline] |
Calculate object hash value. The engine provides specializations for hashing strings (both C-style and std::string), as well as a default fallback implementation.
| val | Value to hash | |
| len | Optional length of value, zero if not applicable |
| void neo::core::swap | ( | HashTable< Key, T, Cmp > & | lval, | |
| HashTable< Key, T, Cmp > & | rval | |||
| ) | [inline] |
Swap two hash tables of same type.
| lval | First hashtable | |
| rval | Second hashtable |
| void neo::core::swap | ( | List< T > & | lval, | |
| List< T > & | rval | |||
| ) | [inline] |
Swap two lists of same type.
| lval | First list | |
| rval | Second list |
| void neo::core::beginProfile | ( | const HashString & | name | ) | [inline] |
Begin a profiling block which will be a child of the last begun block, or a root block if there was no previous block active
| name | Block name |
| void neo::core::endProfile | ( | ) | [inline] |
End the current profiling block and make parent block (if any) the current active block
| void neo::core::swap | ( | Queue< T > & | lval, | |
| Queue< T > & | rval | |||
| ) | [inline] |
Swap two queues of same type.
| lval | First queue | |
| rval | Second queue |
| std::string neo::core::getStackTrace | ( | int | skip = 0, |
|
| int | depth = 0, |
|||
| const std::string & | prefix = "" | |||
| ) |
| skip | Number of frames to skip | |
| depth | Number of frames to include (0 - unlimited) | |
| prefix | String to prefix each line with |
| void neo::core::getStackTraceData | ( | int | skip, | |
| int | depth, | |||
| StackTraceData & | data | |||
| ) |
| skip | Number of frames to skip | |
| depth | Number of frames to include (0 - unlimited) | |
| data | Data object |
| std::string neo::core::getStackTraceFromData | ( | StackTraceData & | data, | |
| const std::string & | prefix = "" | |||
| ) |
| data | Data object | |
| prefix | Prefix string appended to each line |
| std::string::size_type neo::core::explode | ( | const std::string & | str, | |
| const std::string & | separators, | |||
| Array< std::string > * | p_result, | |||
| bool | allowempty = false | |||
| ) |
Tokenize a string using the given separators, storing the resulting token strings in the given array. If the allowempty flag is not set, separators at beginning and end of the input string will be ignored without generating empty tokens, and consecutive separators will be treated as one separation (no empty tokens are generated). If the flag is set, each separator char will yield a token, even if it is empty.
For example, a call to explode with input string ": :test:explode: :method::" with separators " :" will generate an array with three tokens, "test" "explode" "method"
| str | String to tokenize | |
| separators | Token delimiters | |
| p_result | Pointer to array receiving resulting tokens | |
| allowempty | Allow empty tokens flag |
| size_t neo::core::explode | ( | char * | p_str, | |
| const char * | p_separators, | |||
| Array< char * > * | p_result, | |||
| bool | allowempty = false | |||
| ) |
Tokenize a string. Modifies string argument!
| p_str | String to tokenize, null-terminated string | |
| p_separators | Token delimiters, null-terminated string | |
| p_result | Pointer to array receiving resulting tokens as null-terminated strings | |
| allowempty | Allow empty tokens flag |
| std::string neo::core::strip | ( | const std::string & | str, | |
| const std::string & | delimiters = " \t\n\r" | |||
| ) |
String leading and ending delimiter characters from the given string, returning the stripped string.
For example, a call to strip with string " : test :: strip: :" with delimiters " :" will generate the stripped string "test :: strip".
| str | Input string | |
| delimiters | Characters to strip from start and end of string, default to whitespace (space, tabs and newlines) |
| std::string neo::core::replace | ( | const std::string & | str, | |
| const std::string & | key, | |||
| const std::string & | newkey, | |||
| bool | repeat = false | |||
| ) |
Replace all occurrences of key with newkey in the given string, optionally repeating replace from the last found position if the repeat flag is set.
Repeating is safe in the sense it detects if the replacment introduces an infinite extension of the string, like replacing "foo" with "foobar".
For example, a call to replace with string "test repreplacelace method", key "replace", newkey "rep" and repeat flag set will yield the string "test reprep method".
| str | String | |
| key | Key to search for | |
| newkey | New key to replace with | |
| repeat | Repeat search from last found position each time if true |
| void neo::core::split | ( | const std::string & | str, | |
| const std::string & | separators, | |||
| std::string & | left, | |||
| std::string & | right, | |||
| bool | allowempty = false | |||
| ) |
Split a string into two tokens using the first occurrence of the given separators, except for leading separators that will be ignored unless the allowempty flag is set.
For example, a call to split with input string ": :test: :split::" with separators " :" and allowempty flag not set will generate the left string "test" and the right string "split::"
| str | String to split | |
| separators | Token delimiters | |
| left | String receiving left substring | |
| right | String receiving right substring | |
| allowempty | Allow empty token flag |
| std::string neo::core::merge | ( | const core::Array< const char * > & | strings, | |
| const std::string & | separators | |||
| ) |
Merge array of string to single string with given separators (see merge method for std::string)
| strings | Array of strings | |
| separators | String to insert between strings |
| std::string neo::core::merge | ( | const core::Array< std::string > & | strings, | |
| const std::string & | separators | |||
| ) |
Merge strings by inserting separator string between them, returning the merged string.
For example, a call to merge with strings "test" "merge" "strings" with separator string "::" will result in a final merged string "test::merge::strings"
| strings | Array of strings | |
| separators | String to insert between strings |
| int neo::core::toInteger | ( | const std::string & | str | ) |
Convert string to integer. If the string begins with a 0x prefix the number will be treated as a hexadecimal number
| str | String |
| unsigned int neo::core::toIntegerUnsigned | ( | const std::string & | str | ) |
Convert string to unsigned integer. If the string begins with a 0x prefix the number will be treated as a hexadecimal number
| str | String |
| float neo::core::toFloat | ( | const std::string & | str | ) |
| str | String |
| std::string neo::core::toString | ( | int | val, | |
| bool | hex = false, |
|||
| bool | showbase = false, |
|||
| unsigned int | width = 0, |
|||
| char | padding = ' ' | |||
| ) |
Convert an integer to a string, with optional hexadecimal base and base prefix, field width and fill character
| val | Integer value | |
| hex | Hexadecimal flag | |
| showbase | Show base prefix flag | |
| width | Field width | |
| padding | Fill character |
| std::string neo::core::toString | ( | unsigned int | val, | |
| bool | hex = false, |
|||
| bool | showbase = false, |
|||
| unsigned int | width = 0, |
|||
| char | padding = ' ' | |||
| ) |
Convert an integer to a string, with optional hexadecimal base and base prefix, field width and fill character
| val | Integer value | |
| hex | Hexadecimal flag | |
| showbase | Show base prefix flag | |
| width | Field width | |
| padding | Fill character |
| std::string neo::core::toString | ( | int64_t | val, | |
| bool | hex = false, |
|||
| bool | showbase = false, |
|||
| unsigned int | width = 0, |
|||
| char | padding = ' ' | |||
| ) |
Convert an integer to a string, with optional hexadecimal base and base prefix, field width and fill character
| val | Integer value | |
| hex | Hexadecimal flag | |
| showbase | Show base prefix flag | |
| width | Field width | |
| padding | Fill character |
| std::string neo::core::toString | ( | uint64_t | val, | |
| bool | hex = false, |
|||
| bool | showbase = false, |
|||
| unsigned int | width = 0, |
|||
| char | padding = ' ' | |||
| ) |
Convert an integer to a string, with optional hexadecimal base and base prefix, field width and fill character
| val | Integer value | |
| hex | Hexadecimal flag | |
| showbase | Show base prefix flag | |
| width | Field width | |
| padding | Fill character |
| std::string neo::core::toString | ( | float | val, | |
| bool | fixed = false, |
|||
| unsigned int | precision = 0, |
|||
| unsigned int | width = 0, |
|||
| char | padding = ' ' | |||
| ) |
Convert a float to a string, with optional fixed notation, field width, precision and fill character
| val | Float value | |
| fixed | Fixed flag | |
| precision | Precision | |
| width | Field width | |
| padding | Fill character |
| std::string neo::core::timeToString | ( | time_t | time | ) |
Get a formatted string of the given timestamp
| time | Timestamp |
| std::string neo::core::encodeBase64 | ( | const unsigned char * | p_arr, | |
| unsigned int | size | |||
| ) |
| p_arr | Data array | |
| size | Size of data array in bytes |
| void neo::core::decodeBase64 | ( | const std::string & | data, | |
| unsigned char * | p_arr, | |||
| unsigned int * | p_size | |||
| ) |
| data | Data string in base64 format | |
| p_arr | Destination array | |
| p_size | Destination size of data array in bytes |
| ptrdiff_t neo::core::castPointerOffset | ( | ) | [inline] |
Calculate pointer offsets using static cast
| ptrdiff_t neo::core::castPointerOffset | ( | Derived * | p_ptr | ) | [inline] |
Calculate pointer offsets using dynamic cast
| p_ptr | Pointer |
| void neo::core::swap | ( | StringUTF8 & | lval, | |
| StringUTF8 & | rval | |||
| ) | [inline] |
Swap contents of two UTF-8 strings
| lval | First string | |
| rval | Second string |
| void neo::core::swap | ( | StringUTF16 & | lval, | |
| StringUTF16 & | rval | |||
| ) | [inline] |
Swap contents of two UTF-16 strings
| lval | First string | |
| rval | Second string |
| void neo::core::swap | ( | StringUTF32 & | lval, | |
| StringUTF32 & | rval | |||
| ) | [inline] |
Swap contents of two UTF-32 strings
| lval | First string | |
| rval | Second string |
| StringUTF16 neo::core::operator+ | ( | const StringUTF16 & | lhs, | |
| const StringUTF16 & | rhs | |||
| ) | [inline] |
| rhs | First string | |
| lhs | Second string |
| bool neo::core::operator== | ( | const StringUTF8 & | lhs, | |
| const StringUTF8 & | rhs | |||
| ) |
| rhs | First string | |
| lhs | Second string |
| bool neo::core::operator== | ( | const StringUTF16 & | lhs, | |
| const StringUTF16 & | rhs | |||
| ) |
| rhs | First string | |
| lhs | Second string |
1.5.1