Pyrogenesis trunk
Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
tinygettext::POParser Class Reference

#include <po_parser.hpp>

Collaboration diagram for tinygettext::POParser:
Collaboration graph
[legend]

Static Public Member Functions

static void parse (const std::string &filename, std::istream &in, Dictionary &dict)
 

Static Public Attributes

static bool pedantic = true
 

Private Member Functions

 POParser (const std::string &filename, std::istream &in_, Dictionary &dict_, bool use_fuzzy=true)
 
 ~POParser ()
 
void parse_header (const std::string &header)
 
void parse ()
 
void next_line ()
 
std::string get_string (unsigned int skip)
 
void get_string_line (std::ostringstream &str, size_t skip)
 
bool is_empty_line ()
 
bool prefix (const char *)
 
void error (const std::string &msg) __attribute__((__noreturn__))
 
void warning (const std::string &msg)
 
 POParser (const POParser &)
 
POParseroperator= (const POParser &)
 

Private Attributes

std::string filename
 
std::istream & in
 
Dictionarydict
 
bool use_fuzzy
 
bool running
 
bool eof
 
bool big5
 
int line_number
 
std::string current_line
 
IConv conv
 

Constructor & Destructor Documentation

◆ POParser() [1/2]

tinygettext::POParser::POParser ( const std::string &  filename,
std::istream &  in_,
Dictionary dict_,
bool  use_fuzzy = true 
)
private

◆ ~POParser()

tinygettext::POParser::~POParser ( )
private

◆ POParser() [2/2]

tinygettext::POParser::POParser ( const POParser )
private

Member Function Documentation

◆ error()

void tinygettext::POParser::error ( const std::string &  msg)
private

◆ get_string()

std::string tinygettext::POParser::get_string ( unsigned int  skip)
private

◆ get_string_line()

void tinygettext::POParser::get_string_line ( std::ostringstream &  str,
size_t  skip 
)
private

◆ is_empty_line()

bool tinygettext::POParser::is_empty_line ( )
private

◆ next_line()

void tinygettext::POParser::next_line ( )
private

◆ operator=()

POParser & tinygettext::POParser::operator= ( const POParser )
private

◆ parse() [1/2]

void tinygettext::POParser::parse ( )
private

◆ parse() [2/2]

void tinygettext::POParser::parse ( const std::string &  filename,
std::istream &  in,
Dictionary dict 
)
static
Parameters
filenamename of the istream, only used in error messages
instream from which the PO file is read.
dictdictionary to which the strings are written

◆ parse_header()

void tinygettext::POParser::parse_header ( const std::string &  header)
private

◆ prefix()

bool tinygettext::POParser::prefix ( const char *  prefix_str)
private

◆ warning()

void tinygettext::POParser::warning ( const std::string &  msg)
private

Member Data Documentation

◆ big5

bool tinygettext::POParser::big5
private

◆ conv

IConv tinygettext::POParser::conv
private

◆ current_line

std::string tinygettext::POParser::current_line
private

◆ dict

Dictionary& tinygettext::POParser::dict
private

◆ eof

bool tinygettext::POParser::eof
private

◆ filename

std::string tinygettext::POParser::filename
private

◆ in

std::istream& tinygettext::POParser::in
private

◆ line_number

int tinygettext::POParser::line_number
private

◆ pedantic

bool tinygettext::POParser::pedantic = true
static

◆ running

bool tinygettext::POParser::running
private

◆ use_fuzzy

bool tinygettext::POParser::use_fuzzy
private

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