Public Attributes | List of all members
moot::mootRecoder Class Reference

Interface to librecode character-conversion routines.

Public Member Functions

Constructors etc.
 mootRecoder (const std::string &requestString="", bool diacritics_only=false)
 
 mootRecoder (const std::string &src, const std::string &dst, bool diacritics_only=false)
 
 ~mootRecoder (void)
 
void ensure_outer (void)
 
Requests
void scan_request (const std::string &reqstr, bool diacritics_only=false)
 
void scan_request (const std::string &src, const std::string &dst, bool diacritics_only=false)
 
Recoding: *2file
bool string2file (const char *in, FILE *out)
 
bool buffer2file (const char *buf, size_t buflen, FILE *out)
 
bool string2file (const std::string &in, FILE *out)
 
Recoding: *2buffer
bool buffer2buffer (const char *in, size_t in_size, char **out, size_t *out_used, size_t *out_alloc)
 
bool string2buffer (const char *s, char **out, size_t *out_used, size_t *out_alloc)
 
bool string2buffer (const std::string &in, char **out, size_t *out_used, size_t *out_alloc)
 
Recoding: *2string
bool buffer2string (const char *in, size_t in_size, std::string &out)
 
bool string2string (const char *s, std::string &out)
 
bool string2string (const std::string &in, std::string &out)
 
Recoding: *2mstream
bool string2mstream (const char *in, mootio::mostream *out)
 
bool buffer2mstream (const char *buf, size_t buflen, mootio::mostream *out)
 
bool string2mstream (const std::string &in, mootio::mostream *out)
 

Public Attributes

RECODE_OUTER rc_outer
 outer context for librecode More...
 
RECODE_REQUEST rc_request
 actual recode request More...
 
std::string rc_reqstr
 request string More...
 

Constructor & Destructor Documentation

◆ mootRecoder() [1/2]

moot::mootRecoder::mootRecoder ( const std::string &  requestString = "",
bool  diacritics_only = false 
)
inline

Default constructor, given optional request string

◆ mootRecoder() [2/2]

moot::mootRecoder::mootRecoder ( const std::string &  src,
const std::string &  dst,
bool  diacritics_only = false 
)
inline

Default constructor, given source and destination encodings

◆ ~mootRecoder()

moot::mootRecoder::~mootRecoder ( void  )
inline

Default destructor

Member Function Documentation

◆ ensure_outer()

void moot::mootRecoder::ensure_outer ( void  )
inline

ensure outer context is valid

Referenced by moot::mootXMLRecoder::mootXMLRecoder().

◆ scan_request() [1/2]

void moot::mootRecoder::scan_request ( const std::string &  reqstr,
bool  diacritics_only = false 
)
inline

Scan a recode request string (i.e. one of the form "SRC..DST")

Referenced by moot::mootXMLRecoder::scan_request().

◆ scan_request() [2/2]

void moot::mootRecoder::scan_request ( const std::string &  src,
const std::string &  dst,
bool  diacritics_only = false 
)
inline

Generate and scan a simple request

◆ string2file() [1/2]

bool moot::mootRecoder::string2file ( const char *  in,
FILE *  out 
)
inline

Recode a C string to a C stream

◆ buffer2file()

bool moot::mootRecoder::buffer2file ( const char *  buf,
size_t  buflen,
FILE *  out 
)
inline

Recode a C buffer to a C stream

Referenced by moot::mootXMLRecoder::buffer2file().

◆ string2file() [2/2]

bool moot::mootRecoder::string2file ( const std::string &  in,
FILE *  out 
)
inline

Recode an STL string to a C stream

◆ buffer2buffer()

bool moot::mootRecoder::buffer2buffer ( const char *  in,
size_t  in_size,
char **  out,
size_t *  out_used,
size_t *  out_alloc 
)
inline

◆ string2buffer() [1/2]

bool moot::mootRecoder::string2buffer ( const char *  s,
char **  out,
size_t *  out_used,
size_t *  out_alloc 
)
inline

Recode a C string to a C buffer

◆ string2buffer() [2/2]

bool moot::mootRecoder::string2buffer ( const std::string &  in,
char **  out,
size_t *  out_used,
size_t *  out_alloc 
)
inline

Recode an STL string to a C buffer

◆ buffer2string()

bool moot::mootRecoder::buffer2string ( const char *  in,
size_t  in_size,
std::string &  out 
)
inline

Recode a C buffer to an STL string (append)

Referenced by moot::mootXMLRecoder::buffer2string().

◆ string2string() [1/2]

bool moot::mootRecoder::string2string ( const char *  s,
std::string &  out 
)
inline

Recode a C buffer to an STL string

◆ string2string() [2/2]

bool moot::mootRecoder::string2string ( const std::string &  in,
std::string &  out 
)
inline

Recode an STL string to an STL string

◆ string2mstream() [1/2]

bool moot::mootRecoder::string2mstream ( const char *  in,
mootio::mostream out 
)
inline

Recode a C string to a C stream

References mootio::mostream::puts().

◆ buffer2mstream()

bool moot::mootRecoder::buffer2mstream ( const char *  buf,
size_t  buflen,
mootio::mostream out 
)
inline

Recode a C buffer to a C stream

References mootio::mostream::puts().

◆ string2mstream() [2/2]

bool moot::mootRecoder::string2mstream ( const std::string &  in,
mootio::mostream out 
)
inline

Recode an STL string to a C stream

References mootio::mostream::puts().

Member Data Documentation

◆ rc_outer

RECODE_OUTER moot::mootRecoder::rc_outer

◆ rc_request

RECODE_REQUEST moot::mootRecoder::rc_request

◆ rc_reqstr

std::string moot::mootRecoder::rc_reqstr

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