tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::PointerVector< T > Class Template Reference

#include <genericvector.h>

Inheritance diagram for tesseract::PointerVector< T >:
Collaboration diagram for tesseract::PointerVector< T >:

Public Member Functions

 PointerVector ()
 
 PointerVector (int size)
 
 ~PointerVector ()
 
 PointerVector (const PointerVector &other)
 
PointerVector< T > & operator+= (const PointerVector &other)
 
PointerVector< T > & operator= (const PointerVector &other)
 
void remove (int index)
 
void truncate (int size)
 
void compact (TessResultCallback1< bool, const T *> *delete_cb)
 
void clear ()
 
bool Serialize (FILE *fp) const
 
bool Serialize (TFile *fp) const
 
bool DeSerialize (bool swap, FILE *fp)
 
bool DeSerialize (TFile *fp)
 
bool DeSerializeElement (TFile *fp)
 
void sort ()
 
- Public Member Functions inherited from GenericVector< T *>
 GenericVector ()
 
 GenericVector (int size, const T * &init_val)
 
 GenericVector (const GenericVector &other)
 
GenericVector< T * > & operator+= (const GenericVector &other)
 
void operator+= (const T * &t)
 
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)
 
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 DeSerializeSize (TFile *fp, int32_t *size)
 
static bool DeSerializeSkip (TFile *fp)
 
- Static Public Member Functions inherited from GenericVector< T *>
static bool SkipDeSerialize (tesseract::TFile *fp)
 
static bool SkipDeSerializeClasses (tesseract::TFile *fp)
 
static T * * double_the_size_memcpy (int current_size, T * *data)
 

Additional Inherited Members

- Protected Member Functions inherited from GenericVector< T *>
int choose_nth_item (int target_index, int start, int end, unsigned int *seed)
 
void init (int size)
 
- Protected Attributes inherited from GenericVector< T *>
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 inherited from GenericVector< T *>
static const int kDefaultVectorSize
 

Constructor & Destructor Documentation

◆ PointerVector() [1/3]

template<typename T>
tesseract::PointerVector< T >::PointerVector ( )
inline

◆ PointerVector() [2/3]

template<typename T>
tesseract::PointerVector< T >::PointerVector ( int  size)
inlineexplicit

◆ ~PointerVector()

template<typename T>
tesseract::PointerVector< T >::~PointerVector ( )
inline

◆ PointerVector() [3/3]

template<typename T>
tesseract::PointerVector< T >::PointerVector ( const PointerVector< T > &  other)
inline

Member Function Documentation

◆ clear()

template<typename T>
void tesseract::PointerVector< T >::clear ( )
inline

◆ compact()

template<typename T>
void tesseract::PointerVector< T >::compact ( TessResultCallback1< bool, const T *> *  delete_cb)
inline

◆ DeSerialize() [1/2]

template<typename T>
bool tesseract::PointerVector< T >::DeSerialize ( bool  swap,
FILE *  fp 
)
inline

◆ DeSerialize() [2/2]

template<typename T>
bool tesseract::PointerVector< T >::DeSerialize ( TFile fp)
inline

◆ DeSerializeElement()

template<typename T>
bool tesseract::PointerVector< T >::DeSerializeElement ( TFile fp)
inline

◆ DeSerializeSize()

template<typename T>
static bool tesseract::PointerVector< T >::DeSerializeSize ( TFile fp,
int32_t *  size 
)
inlinestatic

◆ DeSerializeSkip()

template<typename T>
static bool tesseract::PointerVector< T >::DeSerializeSkip ( TFile fp)
inlinestatic

◆ operator+=()

template<typename T>
PointerVector<T>& tesseract::PointerVector< T >::operator+= ( const PointerVector< T > &  other)
inline

◆ operator=()

template<typename T>
PointerVector<T>& tesseract::PointerVector< T >::operator= ( const PointerVector< T > &  other)
inline

◆ remove()

template<typename T>
void tesseract::PointerVector< T >::remove ( int  index)
inline

◆ Serialize() [1/2]

template<typename T>
bool tesseract::PointerVector< T >::Serialize ( FILE *  fp) const
inline

◆ Serialize() [2/2]

template<typename T>
bool tesseract::PointerVector< T >::Serialize ( TFile fp) const
inline

◆ sort()

template<typename T>
void tesseract::PointerVector< T >::sort ( )
inline

◆ truncate()

template<typename T>
void tesseract::PointerVector< T >::truncate ( int  size)
inline

The documentation for this class was generated from the following file: