tesseract
5.0.0-alpha-619-ge9db
|
#include <baseapi.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size, const T &init_val) | |
GenericVector (const GenericVector &other) | |
GenericVector< T > & | operator+= (const GenericVector &other) |
GenericVector< T > & | operator= (const GenericVector &other) |
~GenericVector () | |
void | reserve (int size) |
void | double_the_size () |
void | init_to_size (int size, const T &t) |
void | resize_no_init (int size) |
int | size () const |
size_t | unsigned_size () const |
int | size_reserved () const |
bool | empty () const |
T & | get (int index) const |
T & | back () const |
T & | operator[] (int index) const |
T | pop_back () |
int | get_index (const T &object) const |
bool | contains (const T &object) const |
T | contains_index (int index) const |
int | push_back (T object) |
void | operator+= (const T &t) |
int | push_back_new (const T &object) |
int | push_front (const T &object) |
void | set (const T &t, int index) |
void | insert (const T &t, int index) |
void | remove (int index) |
void | truncate (int size) |
void | set_clear_callback (std::function< void(T)> cb) |
void | set_compare_callback (std::function< bool(const T &, const T &)> cb) |
void | clear () |
void | delete_data_pointers () |
void | move (GenericVector< T > *from) |
bool | write (FILE *f, std::function< bool(FILE *, const T &)> cb) const |
bool | read (tesseract::TFile *f, std::function< bool(tesseract::TFile *, T *)> cb) |
bool | Serialize (FILE *fp) const |
bool | Serialize (tesseract::TFile *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
bool | DeSerialize (tesseract::TFile *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | SerializeClasses (tesseract::TFile *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
bool | DeSerializeClasses (tesseract::TFile *fp) |
void | reverse () |
void | sort () |
void | sort (int(*comparator)(const void *, const void *)) |
bool | bool_binary_search (const T &target) const |
int | binary_search (const T &target) const |
void | compact_sorted () |
int | choose_nth_item (int target_index) |
void | swap (int index1, int index2) |
bool | WithinBounds (const T &rangemin, const T &rangemax) const |
Static Public Member Functions | |
static bool | SkipDeSerialize (tesseract::TFile *fp) |
static bool | SkipDeSerializeClasses (tesseract::TFile *fp) |
static T * | double_the_size_memcpy (int current_size, T *data) |
Protected Member Functions | |
int | choose_nth_item (int target_index, int start, int end, unsigned int *seed) |
void | init (int size) |
Protected Attributes | |
int32_t | size_used_ {} |
int32_t | size_reserved_ {} |
T * | data_ |
std::function< void(T)> | clear_cb_ |
std::function< bool(const T &, const T &)> | compare_cb_ |
Static Protected Attributes | |
static const int | kDefaultVectorSize = 4 |
|
inline |
Definition at line 39 of file genericvector.h.
|
inline |
Definition at line 42 of file genericvector.h.
|
inline |
Definition at line 48 of file genericvector.h.
GenericVector< T >::~GenericVector | ( | ) |
Definition at line 672 of file genericvector.h.
T & GenericVector< T >::back | ( | ) | const |
Definition at line 728 of file genericvector.h.
|
inline |
Definition at line 252 of file genericvector.h.
|
inline |
Definition at line 239 of file genericvector.h.
|
inline |
Definition at line 289 of file genericvector.h.
|
protected |
Definition at line 1120 of file genericvector.h.
void GenericVector< T >::clear | ( | ) |
Definition at line 857 of file genericvector.h.
|
inline |
Definition at line 268 of file genericvector.h.
bool GenericVector< T >::contains | ( | const T & | object | ) | const |
Definition at line 793 of file genericvector.h.
T GenericVector< T >::contains_index | ( | int | index | ) | const |
Definition at line 775 of file genericvector.h.
void GenericVector< T >::delete_data_pointers | ( | ) |
Definition at line 872 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 954 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | tesseract::TFile * | fp | ) |
Definition at line 980 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 1038 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | tesseract::TFile * | fp | ) |
Definition at line 1056 of file genericvector.h.
void GenericVector< T >::double_the_size | ( | ) |
Definition at line 696 of file genericvector.h.
|
inlinestatic |
Definition at line 207 of file genericvector.h.
|
inline |
Definition at line 86 of file genericvector.h.
T & GenericVector< T >::get | ( | int | index | ) | const |
Definition at line 716 of file genericvector.h.
int GenericVector< T >::get_index | ( | const T & | object | ) | const |
Definition at line 781 of file genericvector.h.
|
protected |
Definition at line 655 of file genericvector.h.
void GenericVector< T >::init_to_size | ( | int | size, |
const T & | t | ||
) |
Definition at line 706 of file genericvector.h.
void GenericVector< T >::insert | ( | const T & | t, |
int | index | ||
) |
Definition at line 750 of file genericvector.h.
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
Definition at line 1087 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
Definition at line 838 of file genericvector.h.
void GenericVector< T >::operator+= | ( | const T & | t | ) |
Definition at line 833 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
Definition at line 847 of file genericvector.h.
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
Definition at line 722 of file genericvector.h.
T GenericVector< T >::pop_back | ( | ) |
Definition at line 734 of file genericvector.h.
int GenericVector< T >::push_back | ( | T | object | ) |
Definition at line 799 of file genericvector.h.
int GenericVector< T >::push_back_new | ( | const T & | object | ) |
Definition at line 810 of file genericvector.h.
int GenericVector< T >::push_front | ( | const T & | object | ) |
Definition at line 820 of file genericvector.h.
bool GenericVector< T >::read | ( | tesseract::TFile * | f, |
std::function< bool(tesseract::TFile *, T *)> | cb | ||
) |
Definition at line 902 of file genericvector.h.
void GenericVector< T >::remove | ( | int | index | ) |
Definition at line 765 of file genericvector.h.
void GenericVector< T >::reserve | ( | int | size | ) |
Definition at line 679 of file genericvector.h.
|
inline |
Definition at line 65 of file genericvector.h.
|
inline |
Definition at line 215 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const |
Definition at line 929 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | tesseract::TFile * | fp | ) | const |
Definition at line 939 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
Definition at line 1008 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | tesseract::TFile * | fp | ) | const |
Definition at line 1020 of file genericvector.h.
void GenericVector< T >::set | ( | const T & | t, |
int | index | ||
) |
Definition at line 741 of file genericvector.h.
|
inline |
Definition at line 140 of file genericvector.h.
|
inline |
Definition at line 146 of file genericvector.h.
|
inline |
Definition at line 71 of file genericvector.h.
|
inline |
Definition at line 81 of file genericvector.h.
|
static |
Definition at line 996 of file genericvector.h.
|
static |
Definition at line 1071 of file genericvector.h.
void GenericVector< T >::sort | ( | ) |
Definition at line 1102 of file genericvector.h.
|
inline |
Definition at line 232 of file genericvector.h.
|
inline |
|
inline |
Definition at line 132 of file genericvector.h.
|
inline |
Definition at line 75 of file genericvector.h.
|
inline |
Definition at line 310 of file genericvector.h.
bool GenericVector< T >::write | ( | FILE * | f, |
std::function< bool(FILE *, const T &)> | cb | ||
) | const |
Definition at line 879 of file genericvector.h.
|
protected |
Definition at line 333 of file genericvector.h.
|
protected |
Definition at line 334 of file genericvector.h.
|
protected |
Definition at line 332 of file genericvector.h.
|
staticprotected |
Definition at line 329 of file genericvector.h.
|
protected |
Definition at line 331 of file genericvector.h.
|
protected |
Definition at line 330 of file genericvector.h.