tesseract
3.05.02
|
#include <baseapi.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size, 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, T t) |
void | resize_no_init (int size) |
int | 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 (T object) const |
bool | contains (T object) const |
T | contains_index (int index) const |
int | push_back (T object) |
void | operator+= (T t) |
int | push_back_new (T object) |
int | push_front (T object) |
void | set (T t, int index) |
void | insert (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 (FILE *f, TessResultCallback3< bool, FILE *, T *, bool > *cb, bool swap) |
bool | Serialize (FILE *fp) const |
bool | Serialize (tesseract::TFile *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
bool | DeSerialize (bool swap, tesseract::TFile *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | SerializeClasses (tesseract::TFile *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
bool | DeSerializeClasses (bool swap, 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 (bool swap, tesseract::TFile *fp) |
static bool | SkipDeSerializeClasses (bool swap, 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 | size_used_ |
inT32 | 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 |
Definition at line 40 of file genericvector.h.
|
inline |
Definition at line 43 of file genericvector.h.
|
inline |
Definition at line 49 of file genericvector.h.
GenericVector< T >::~GenericVector | ( | ) |
Definition at line 644 of file genericvector.h.
T & GenericVector< T >::back | ( | ) | const |
Definition at line 697 of file genericvector.h.
|
inline |
Definition at line 242 of file genericvector.h.
|
inline |
Definition at line 230 of file genericvector.h.
|
inline |
Definition at line 301 of file genericvector.h.
|
protected |
Definition at line 1062 of file genericvector.h.
void GenericVector< T >::clear | ( | ) |
Definition at line 835 of file genericvector.h.
|
inline |
Definition at line 274 of file genericvector.h.
|
inline |
Definition at line 257 of file genericvector.h.
bool GenericVector< T >::contains | ( | T | object | ) | const |
Definition at line 760 of file genericvector.h.
T GenericVector< T >::contains_index | ( | int | index | ) | const |
Definition at line 743 of file genericvector.h.
void GenericVector< T >::delete_data_pointers | ( | ) |
Definition at line 856 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 931 of file genericvector.h.
bool GenericVector< T >::DeSerialize | ( | bool | swap, |
tesseract::TFile * | fp | ||
) |
Definition at line 945 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 992 of file genericvector.h.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
tesseract::TFile * | fp | ||
) |
Definition at line 1004 of file genericvector.h.
|
inline |
Definition at line 290 of file genericvector.h.
void GenericVector< T >::double_the_size | ( | ) |
Definition at line 664 of file genericvector.h.
|
inlinestatic |
Definition at line 199 of file genericvector.h.
|
inline |
Definition at line 84 of file genericvector.h.
T & GenericVector< T >::get | ( | int | index | ) | const |
Definition at line 685 of file genericvector.h.
int GenericVector< T >::get_index | ( | T | object | ) | const |
Definition at line 749 of file genericvector.h.
|
protected |
Definition at line 634 of file genericvector.h.
void GenericVector< T >::init_to_size | ( | int | size, |
T | t | ||
) |
Definition at line 675 of file genericvector.h.
void GenericVector< T >::insert | ( | T | t, |
int | index | ||
) |
Definition at line 719 of file genericvector.h.
|
inline |
Definition at line 79 of file genericvector.h.
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
Definition at line 1029 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
Definition at line 801 of file genericvector.h.
void GenericVector< T >::operator+= | ( | T | t | ) |
Definition at line 796 of file genericvector.h.
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
Definition at line 810 of file genericvector.h.
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
Definition at line 691 of file genericvector.h.
T GenericVector< T >::pop_back | ( | ) |
Definition at line 703 of file genericvector.h.
int GenericVector< T >::push_back | ( | T | object | ) |
Definition at line 766 of file genericvector.h.
int GenericVector< T >::push_back_new | ( | T | object | ) |
Definition at line 776 of file genericvector.h.
int GenericVector< T >::push_front | ( | T | object | ) |
Definition at line 785 of file genericvector.h.
bool GenericVector< T >::read | ( | FILE * | f, |
TessResultCallback3< bool, FILE *, T *, bool > * | cb, | ||
bool | swap | ||
) |
Definition at line 884 of file genericvector.h.
void GenericVector< T >::remove | ( | int | index | ) |
Definition at line 733 of file genericvector.h.
void GenericVector< T >::reserve | ( | int | size | ) |
Definition at line 651 of file genericvector.h.
|
inline |
Definition at line 66 of file genericvector.h.
|
inline |
Definition at line 207 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const |
Definition at line 914 of file genericvector.h.
bool GenericVector< T >::Serialize | ( | tesseract::TFile * | fp | ) | const |
Definition at line 920 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
Definition at line 970 of file genericvector.h.
bool GenericVector< T >::SerializeClasses | ( | tesseract::TFile * | fp | ) | const |
Definition at line 978 of file genericvector.h.
void GenericVector< T >::set | ( | T | t, |
int | index | ||
) |
Definition at line 710 of file genericvector.h.
void GenericVector< T >::set_clear_callback | ( | TessCallback1< T > * | cb | ) |
Definition at line 821 of file genericvector.h.
void GenericVector< T >::set_compare_callback | ( | TessResultCallback2< bool, T const &, T const &> * | cb | ) |
Definition at line 828 of file genericvector.h.
|
inline |
Definition at line 72 of file genericvector.h.
|
inline |
Definition at line 75 of file genericvector.h.
|
static |
Definition at line 959 of file genericvector.h.
|
static |
Definition at line 1016 of file genericvector.h.
void GenericVector< T >::sort | ( | ) |
Definition at line 1044 of file genericvector.h.
|
inline |
Definition at line 223 of file genericvector.h.
|
inline |
Definition at line 312 of file genericvector.h.
|
inline |
Definition at line 130 of file genericvector.h.
|
inline |
Definition at line 321 of file genericvector.h.
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const &> * | cb | ||
) | const |
Definition at line 865 of file genericvector.h.
|
protected |
Definition at line 343 of file genericvector.h.
|
mutableprotected |
Definition at line 345 of file genericvector.h.
|
protected |
Definition at line 342 of file genericvector.h.
|
staticprotected |
Definition at line 339 of file genericvector.h.
|
protected |
Definition at line 341 of file genericvector.h.
|
protected |
Definition at line 340 of file genericvector.h.