tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
STRING Class Reference

#include <strngs.h>

Collaboration diagram for STRING:

Classes

struct  STRING_HEADER
 

Public Member Functions

 STRING ()
 
 STRING (const STRING &string)
 
 STRING (const char *string)
 
 STRING (const char *data, int length)
 
 ~STRING ()
 
bool Serialize (FILE *fp) const
 
bool DeSerialize (bool swap, FILE *fp)
 
bool Serialize (tesseract::TFile *fp) const
 
bool DeSerialize (tesseract::TFile *fp)
 
bool contains (const char c) const
 
int32_t length () const
 
int32_t size () const
 
uint32_t unsigned_size () const
 
const char * string () const
 
const char * c_str () const
 
char * strdup () const
 
char & operator[] (int32_t index) const
 
void split (const char c, GenericVector< STRING > *splited)
 
void truncate_at (int32_t index)
 
bool operator== (const STRING &string) const
 
bool operator!= (const STRING &string) const
 
bool operator!= (const char *string) const
 
STRINGoperator= (const char *string)
 
STRINGoperator= (const STRING &string)
 
STRING operator+ (const STRING &string) const
 
STRING operator+ (const char ch) const
 
STRINGoperator+= (const char *string)
 
STRINGoperator+= (const STRING &string)
 
STRINGoperator+= (const char ch)
 
void assign (const char *cstr, int len)
 
void add_str_int (const char *str, int number)
 
void add_str_double (const char *str, double number)
 
void ensure (int32_t min_capacity)
 

Static Public Member Functions

static bool SkipDeSerialize (tesseract::TFile *fp)
 

Private Types

typedef struct STRING::STRING_HEADER STRING_HEADER
 

Private Member Functions

STRING_HEADERGetHeader ()
 
const STRING_HEADERGetHeader () const
 
char * GetCStr ()
 
const char * GetCStr () const
 
bool InvariantOk () const
 
char * ensure_cstr (int32_t min_capacity)
 
void FixHeader () const
 
char * AllocData (int used, int capacity)
 
void DiscardData ()
 

Private Attributes

STRING_HEADERdata_
 

Member Typedef Documentation

◆ STRING_HEADER

Constructor & Destructor Documentation

◆ STRING() [1/4]

STRING::STRING ( )

◆ STRING() [2/4]

STRING::STRING ( const STRING string)

◆ STRING() [3/4]

STRING::STRING ( const char *  string)

◆ STRING() [4/4]

STRING::STRING ( const char *  data,
int  length 
)

◆ ~STRING()

STRING::~STRING ( )

Member Function Documentation

◆ add_str_double()

void STRING::add_str_double ( const char *  str,
double  number 
)

◆ add_str_int()

void STRING::add_str_int ( const char *  str,
int  number 
)

◆ AllocData()

char * STRING::AllocData ( int  used,
int  capacity 
)
private

◆ assign()

void STRING::assign ( const char *  cstr,
int  len 
)

◆ c_str()

const char * STRING::c_str ( ) const

◆ contains()

bool STRING::contains ( const char  c) const

◆ DeSerialize() [1/2]

bool STRING::DeSerialize ( bool  swap,
FILE *  fp 
)

◆ DeSerialize() [2/2]

bool STRING::DeSerialize ( tesseract::TFile fp)

◆ DiscardData()

void STRING::DiscardData ( )
private

◆ ensure()

void STRING::ensure ( int32_t  min_capacity)
inline

◆ ensure_cstr()

char * STRING::ensure_cstr ( int32_t  min_capacity)
private

◆ FixHeader()

void STRING::FixHeader ( ) const
private

◆ GetCStr() [1/2]

char* STRING::GetCStr ( )
inlineprivate

◆ GetCStr() [2/2]

const char* STRING::GetCStr ( ) const
inlineprivate

◆ GetHeader() [1/2]

STRING_HEADER* STRING::GetHeader ( )
inlineprivate

◆ GetHeader() [2/2]

const STRING_HEADER* STRING::GetHeader ( ) const
inlineprivate

◆ InvariantOk()

bool STRING::InvariantOk ( ) const
inlineprivate

◆ length()

int32_t STRING::length ( ) const

◆ operator!=() [1/2]

bool STRING::operator!= ( const STRING string) const

◆ operator!=() [2/2]

bool STRING::operator!= ( const char *  string) const

◆ operator+() [1/2]

STRING STRING::operator+ ( const STRING string) const

◆ operator+() [2/2]

STRING STRING::operator+ ( const char  ch) const

◆ operator+=() [1/3]

STRING & STRING::operator+= ( const char *  string)

◆ operator+=() [2/3]

STRING & STRING::operator+= ( const STRING string)

◆ operator+=() [3/3]

STRING & STRING::operator+= ( const char  ch)

◆ operator=() [1/2]

STRING & STRING::operator= ( const char *  string)

◆ operator=() [2/2]

STRING & STRING::operator= ( const STRING string)

◆ operator==()

bool STRING::operator== ( const STRING string) const

◆ operator[]()

char & STRING::operator[] ( int32_t  index) const

◆ Serialize() [1/2]

bool STRING::Serialize ( FILE *  fp) const

◆ Serialize() [2/2]

bool STRING::Serialize ( tesseract::TFile fp) const

◆ size()

int32_t STRING::size ( ) const
inline

◆ SkipDeSerialize()

bool STRING::SkipDeSerialize ( tesseract::TFile fp)
static

◆ split()

void STRING::split ( const char  c,
GenericVector< STRING > *  splited 
)

◆ strdup()

char* STRING::strdup ( ) const
inline

◆ string()

const char * STRING::string ( ) const

◆ truncate_at()

void STRING::truncate_at ( int32_t  index)

◆ unsigned_size()

uint32_t STRING::unsigned_size ( ) const
inline

Member Data Documentation

◆ data_

STRING_HEADER* STRING::data_
private

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