|
cppcore
A small, portable C++ core library
|
Namespaces | |
| namespace | Details |
Classes | |
| class | DateTime |
| This class is used to get the current date and time. More... | |
| class | THash |
| This class is used to calculate the hash value for a given integer or character buffer. More... | |
| class | AbstractLogStream |
| This pure abstract interface class declares the protocol for log-stream implementation. More... | |
| class | Logger |
| This class implements a simple logger. More... | |
| class | TBitField |
| Container to handle specific bitfields. More... | |
| class | TOptional |
| This class is used to describe a value which is not valid until it will ge inited. More... | |
| class | TSpan |
| This class implements a view onto array data. More... | |
| class | TStringBase |
| This class is used to describe the inner data of a string. More... | |
| class | TStringView |
| class | Variant |
| This class can be used to store integer or float data with a dynamical binding. More... | |
| class | TArray |
| This template class implements a simple array with dynamic boundaries. More... | |
| class | THashMap |
| This class implements a hash map. More... | |
| class | TList |
| This template class implements a simple double linked list container. More... | |
| class | TQueue |
| This template class implements a simple queue ( works FIFO ). More... | |
| class | TStaticArray |
| class | CsvReader |
| This class implements a robust CSV reader that handles quoted fields and commas within quotes. More... | |
| struct | FSSpace |
| The file-system space info. More... | |
| class | FileSystem |
| This class provides some common OS-specific file operations. More... | |
| class | TAsyncLoader |
| This template class implements a simple loader which runs load requests asynchronously. More... | |
| class | MemUtils |
| class | TDefaultAllocator |
| This class implements the default allocator used by all container classes of the cppcore library. More... | |
| class | TPoolAllocator |
| This class implements a simple pool-based allocation scheme. More... | |
| class | TScratchAllocator |
| A simple scratch allocator. More... | |
| class | TStackAllocator |
| This class implements a simple stack-based allocation scheme. Initially you have to define its size. Each allocation will be done from this initially created pool and must be deallocated in LIFO order. All data will be released when the allocator will be released. This allocation scheme is fast and does no call any new-calls during the lifetime of the allocator pool. More... | |
| class | RandomGenerator |
| This class is used to wrap different random number generators. More... | |
Typedefs | |
| using | String = TStringBase<char> |
| typedef int32_t(* | ComparisonFn) (const void *_lhs, const void *_rhs) |
| The comparison function type. | |
| using | HashId = uint64_t |
| using | ScratchAllocator = TScratchAllocator<char> |
Functions | |
| void | tracePrint (const String &domain, const String &file, int line, const String &msg) |
| void | debugPrint (const String &domain, const String &file, int line, const String &msg) |
| void | infoPrint (const String &domain, const String &file, int line, const String &msg) |
| void | warnPrint (const String &domain, const String &file, int line, const String &msg) |
| void | errorPrint (const String &domain, const String &file, int line, const String &msg) |
| void | fatalPrint (const String &domain, const String &file, int line, const String &msg) |
| template<class T> | |
| int32_t | compAscending (const void *lhs, const void *rhs) |
| Compare two values in ascending order. | |
| template<typename Ty> | |
| int32_t | compDescending (const void *_lhs, const void *_rhs) |
| Compare two values in descending order. | |
| template<class T> | |
| void | swap (T &v1, T &v2) |
| Swaps two POD values. | |
| void | swap (uint8_t &lhs, uint8_t &rhs) |
| Swaps two uint8 values. | |
| void | swap (void *v1, void *v2, size_t stride) |
| Swaps two POD values bitwise. | |
| void | quicksortImpl (void *pivot, void *_data, size_t num, size_t stride, ComparisonFn func) |
| Implements the quicksort algorithm. | |
| void | quicksort (void *_data, size_t num, size_t stride, ComparisonFn func) |
| Implements the quicksort algorithm. | |
| bool | isSorted (const void *data, size_t num, size_t stride, ComparisonFn func) |
| Checks if the data is sorted. | |
| int32_t | binSearchImpl (const void *key, const void *data, size_t num, size_t stride, ComparisonFn func) |
| Implements a binary search algorithm. | |
| template<class T> | |
| int32_t | binSearch (const T &key, const void *array, size_t num, ComparisonFn func) |
| Implements a binary search algorithm. | |
| template<class TIt> | |
| size_t | distance (TIt begin, TIt end) |
| Function to calulate the distance between two iterators. | |
| template<class T> | |
| void | ContainerClear (T &ctr, void(*DeleterFunc)(T &)=nullptr) |
| template<class T> | |
| size_t | align (size_t n) |
| Will calculate the alignment for the given size. | |
| static bool | mersenne_twister_vector_init (unsigned int *seedPoints, size_t len) |
| static bool | mersenne_twister_vector_update (unsigned int *const p) |
| unsigned int | mersenne_twister () |
Variables | |
| static constexpr unsigned int | N = 624 |
| static constexpr unsigned int | M = 397 |
| typedef int32_t(* cppcore::ComparisonFn) (const void *_lhs, const void *_rhs) |
| using cppcore::HashId = uint64_t |
Definition at line 110 of file CPPCoreCommon.h.
| using cppcore::ScratchAllocator = TScratchAllocator<char> |
Definition at line 152 of file TScratchAllocator.h.
| using cppcore::String = TStringBase<char> |
|
inline |
Will calculate the alignment for the given size.
| [in] | size | he requested size. |
Definition at line 36 of file MemUtils.h.
Referenced by cppcore::MemUtils::alignPtr(), and cppcore::MemUtils::isAligned().
|
inline |
Implements a binary search algorithm.
| T | The type of the value |
| key | The key to search for |
| array | The data to search in |
| num | The number of elements to search |
| func | The comparison function |
Definition at line 187 of file Sort.h.
References binSearchImpl().
|
inline |
Implements a binary search algorithm.
| key | The key to search for |
| data | The data to search in |
| num | The number of elements to search |
| stride | The stride of the data, i.e. the size of each element |
| func | The comparison function |
Definition at line 162 of file Sort.h.
Referenced by binSearch().
|
inline |
Compare two values in ascending order.
| T | The type of the value |
| lhs | The left hand side value |
| rhs | The right hand side value |
Definition at line 38 of file Sort.h.
Referenced by compDescending().
|
inline |
Compare two values in descending order.
| T | The type of the value |
| lhs | The left hand side value |
| rhs | The right hand side value |
Definition at line 50 of file Sort.h.
References compAscending().
| void cppcore::ContainerClear | ( | T & | ctr, |
| void(* | DeleterFunc )(T &) = nullptr ) |
Definition at line 70 of file CPPCoreCommon.h.
| void cppcore::debugPrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 283 of file Logger.cpp.
References cppcore::Logger::debug(), and cppcore::Logger::getInstance().
|
inline |
Function to calulate the distance between two iterators.
| TIt | The container iterator |
| begin | The first container iterator |
| end | The second container iterator |
Definition at line 36 of file TAlgorithm.h.
References distance().
Referenced by distance().
| void cppcore::errorPrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 304 of file Logger.cpp.
References cppcore::Logger::error(), and cppcore::Logger::getInstance().
| void cppcore::fatalPrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 311 of file Logger.cpp.
References cppcore::Logger::fatal(), and cppcore::Logger::getInstance().
| void cppcore::infoPrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 290 of file Logger.cpp.
References cppcore::Logger::getInstance(), and cppcore::Logger::info().
| bool cppcore::isSorted | ( | const void * | data, |
| size_t | num, | ||
| size_t | stride, | ||
| ComparisonFn | func ) |
| unsigned int cppcore::mersenne_twister | ( | ) |
Definition at line 67 of file RandomGenerator.cpp.
References mersenne_twister_vector_init(), mersenne_twister_vector_update(), and N.
Referenced by cppcore::RandomGenerator::get().
|
static |
Definition at line 34 of file RandomGenerator.cpp.
Referenced by mersenne_twister().
|
static |
Definition at line 49 of file RandomGenerator.cpp.
Referenced by mersenne_twister().
|
inline |
Implements the quicksort algorithm.
| _data | The data to sort |
| num | The number of elements to sort |
| stride | The stride of the data, i.e. the size of each element |
| func | The comparison function |
Definition at line 129 of file Sort.h.
References CPPCORE_STACK_ALLOC, and quicksortImpl().
|
inline |
Implements the quicksort algorithm.
| pivot | The pivot value to start |
| _data | The data to sort |
| num | The number of elements to sort |
| stride | The stride of the data, i.e. the size of each element |
| func | The comparison function |
Definition at line 92 of file Sort.h.
References quicksortImpl(), and swap().
Referenced by quicksort(), and quicksortImpl().
|
inline |
Swaps two POD values.
| T | The type of the value. |
| v1 | The first value |
| v2 | The second value |
Definition at line 59 of file Sort.h.
Referenced by quicksortImpl(), and swap().
|
inline |
|
inline |
| void cppcore::tracePrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 276 of file Logger.cpp.
References cppcore::Logger::getInstance(), and cppcore::Logger::trace().
| void cppcore::warnPrint | ( | const String & | domain, |
| const String & | file, | ||
| int | line, | ||
| const String & | msg ) |
Definition at line 297 of file Logger.cpp.
References cppcore::Logger::getInstance(), and cppcore::Logger::warn().
|
staticconstexpr |
Definition at line 32 of file RandomGenerator.cpp.
Referenced by mersenne_twister_vector_update().
|
staticconstexpr |
Definition at line 31 of file RandomGenerator.cpp.
Referenced by mersenne_twister(), and mersenne_twister_vector_update().