Tesseract 3.01
|
#include <genericvector.h>
Public Member Functions | |
GenericVector () | |
GenericVector (int size) | |
GenericVector (const GenericVector &other) | |
GenericVector< T > & | operator+= (const GenericVector &other) |
GenericVector< T > & | operator= (const GenericVector &other) |
virtual | ~GenericVector () |
void | reserve (int size) |
void | double_the_size () |
void | init_to_size (int size, T t) |
int | size () const |
int | length () const |
bool | empty () const |
T & | get (int index) const |
T & | operator[] (int index) const |
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_front (T object) |
void | set (T t, int index) |
void | insert (T t, int index) |
virtual void | remove (int index) |
virtual void | truncate (int size) |
void | set_clear_callback (TessCallback1< T > *cb) |
void | set_compare_callback (TessResultCallback2< bool, T const &, T const & > *cb) |
virtual 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) |
virtual bool | Serialize (FILE *fp) const |
virtual bool | DeSerialize (bool swap, FILE *fp) |
bool | SerializeClasses (FILE *fp) const |
bool | DeSerializeClasses (bool swap, FILE *fp) |
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 |
Static Public Member Functions | |
static T * | double_the_size_memcpy (int current_size, T *data) |
Protected Member Functions | |
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 |
GenericVector< T >::GenericVector | ( | ) | [inline] |
GenericVector< T >::GenericVector | ( | int | size | ) | [inline, explicit] |
GenericVector< T >::GenericVector | ( | const GenericVector< T > & | other | ) | [inline] |
GenericVector< T >::~GenericVector | ( | ) | [virtual] |
int GenericVector< T >::binary_search | ( | const T & | target | ) | const [inline] |
bool GenericVector< T >::bool_binary_search | ( | const T & | target | ) | const [inline] |
void GenericVector< T >::clear | ( | ) | [virtual] |
Reimplemented in tesseract::PointerVector< T >, and tesseract::DawgInfoVector.
void GenericVector< T >::compact | ( | TessResultCallback1< bool, int > * | delete_cb | ) | [inline] |
void GenericVector< T >::compact_sorted | ( | ) | [inline] |
bool GenericVector< T >::contains | ( | 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 | ||
) | [virtual] |
Reimplemented in tesseract::PointerVector< T >.
bool GenericVector< T >::DeSerializeClasses | ( | bool | swap, |
FILE * | fp | ||
) |
T GenericVector< T >::dot_product | ( | const GenericVector< T > & | other | ) | const [inline] |
void GenericVector< T >::double_the_size | ( | ) |
static T* GenericVector< T >::double_the_size_memcpy | ( | int | current_size, |
T * | data | ||
) | [inline, static] |
bool GenericVector< T >::empty | ( | ) | const [inline] |
T & GenericVector< T >::get | ( | int | index | ) | const |
int GenericVector< T >::get_index | ( | T | object | ) | const |
void GenericVector< T >::init | ( | int | size | ) | [protected] |
void GenericVector< T >::init_to_size | ( | int | size, |
T | t | ||
) |
void GenericVector< T >::insert | ( | T | t, |
int | index | ||
) |
int GenericVector< T >::length | ( | ) | const [inline] |
void GenericVector< T >::move | ( | GenericVector< T > * | from | ) |
GenericVector< T > & GenericVector< T >::operator+= | ( | const GenericVector< T > & | other | ) |
void GenericVector< T >::operator+= | ( | T | t | ) |
GenericVector< T > & GenericVector< T >::operator= | ( | const GenericVector< T > & | other | ) |
T & GenericVector< T >::operator[] | ( | int | index | ) | const |
int GenericVector< T >::push_back | ( | T | object | ) |
int GenericVector< T >::push_front | ( | T | object | ) |
bool GenericVector< T >::read | ( | FILE * | f, |
TessResultCallback3< bool, FILE *, T *, bool > * | cb, | ||
bool | swap | ||
) |
void GenericVector< T >::remove | ( | int | index | ) | [virtual] |
Reimplemented in tesseract::PointerVector< T >.
void GenericVector< T >::reserve | ( | int | size | ) |
bool GenericVector< T >::Serialize | ( | FILE * | fp | ) | const [virtual] |
Reimplemented in tesseract::PointerVector< T >.
bool GenericVector< T >::SerializeClasses | ( | FILE * | fp | ) | const |
void GenericVector< T >::set | ( | 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 | ) |
int GenericVector< T >::size | ( | ) | const [inline] |
void GenericVector< T >::sort | ( | ) |
Reimplemented in tesseract::PointerVector< T >.
void GenericVector< T >::sort | ( | int(*)(const void *, const void *) | comparator | ) | [inline] |
virtual void GenericVector< T >::truncate | ( | int | size | ) | [inline, virtual] |
Reimplemented in tesseract::PointerVector< T >.
bool GenericVector< T >::write | ( | FILE * | f, |
TessResultCallback2< bool, FILE *, T const & > * | cb | ||
) | const |
TessCallback1<T>* GenericVector< T >::clear_cb_ [protected] |
TessResultCallback2<bool, T const &, T const &>* GenericVector< T >::compare_cb_ [mutable, protected] |
T* GenericVector< T >::data_ [protected] |
const int GenericVector< T >::kDefaultVectorSize = 4 [static, protected] |
inT32 GenericVector< T >::size_reserved_ [protected] |
inT32 GenericVector< T >::size_used_ [protected] |