#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 |
int | length () 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 (TessCallback1< T > *cb) |
void | set_compare_callback (TessResultCallback2< bool, T const &, T const &> *cb) |
void | clear () |
void | delete_data_pointers () |
void | move (GenericVector< T > *from) |
bool | write (FILE *f, TessResultCallback2< bool, FILE *, T const &> *cb) const |
bool | read (tesseract::TFile *f, TessResultCallback2< 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 () |
void | compact (TessResultCallback1< bool, int > *delete_cb) |
T | dot_product (const GenericVector< T > &other) const |
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_ |
TessCallback1< T > * | clear_cb_ |
TessResultCallback2< bool, T const &, T const & > * | compare_cb_ |
Static Protected Attributes | |
static const int | kDefaultVectorSize = 4 |
|
inline |
|
inline |
|
inline |
GenericVector< T >::~GenericVector | ( | ) |
T & GenericVector< T >::back | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
protected |
void GenericVector< T >::clear | ( | ) |
|
inline |
|
inline |
bool GenericVector< T >::contains | ( | const T & | object | ) | const |
T GenericVector< T >::contains_index | ( | int | index | ) | const |
void GenericVector< T >::delete_data_pointers | ( | ) |
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
bool GenericVector< T >::DeSerialize | ( | tesseract::TFile * | fp | ) |
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
bool GenericVector< T >::DeSerializeClasses | ( | tesseract::TFile * | fp | ) |
|
inline |
void GenericVector< T >::double_the_size | ( | ) |
|
inlinestatic |
|
inline |
T & GenericVector< T >::get | ( | int | index | ) | const |
int GenericVector< T >::get_index | ( | const T & | object | ) | const |
|
protected |
void GenericVector< T >::init_to_size | ( | int | size, |
const T & | t | ||
) |
void GenericVector< T >::insert | ( | const T & | t, |
int | index | ||
) |
|
inline |
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
void GenericVector< T >::operator+= | ( | const T & | t | ) |
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
T GenericVector< T >::pop_back | ( | ) |
int GenericVector< T >::push_back | ( | T | object | ) |
int GenericVector< T >::push_back_new | ( | const T & | object | ) |
int GenericVector< T >::push_front | ( | const T & | object | ) |
bool GenericVector< T >::read | ( | tesseract::TFile * | f, |
TessResultCallback2< bool, tesseract::TFile *, T *> * | cb | ||
) |
void GenericVector< T >::remove | ( | int | index | ) |
void GenericVector< T >::reserve | ( | int | size | ) |
|
inline |
|
inline |
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const |
bool GenericVector< T >::Serialize | ( | tesseract::TFile * | fp | ) | const |
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
bool GenericVector< T >::SerializeClasses | ( | tesseract::TFile * | fp | ) | const |
void GenericVector< T >::set | ( | const T & | t, |
int | index | ||
) |
void GenericVector< T >::set_clear_callback | ( | TessCallback1< T > * | cb | ) |
void GenericVector< T >::set_compare_callback | ( | TessResultCallback2< bool, T const &, T const &> * | cb | ) |
|
inline |
|
inline |
|
static |
|
static |
void GenericVector< T >::sort | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const &> * | cb | ||
) | const |
|
protected |
|
mutableprotected |
|
protected |
|
staticprotected |
|
protected |
|
protected |