Open Chinese Convert  1.0.4
A project for conversion between Traditional and Simplified Chinese
 All Classes Functions Typedefs Modules
Public Member Functions | List of all members
opencc::SimpleConverter Class Reference

A high level converter This interface does not require C++11 to compile. More...

#include <SimpleConverter.hpp>

Public Member Functions

 SimpleConverter (const std::string &configFileName)
 Constructor of SimpleConverter. More...
 
std::string Convert (const std::string &input) const
 Converts a text. More...
 
std::string Convert (const char *input) const
 Converts a text. More...
 
std::string Convert (const char *input, size_t length) const
 Converts a text. More...
 
size_t Convert (const char *input, char *output) const
 Converts a text and writes to an allocated buffer Please make sure the buffer has sufficent space. More...
 
size_t Convert (const char *input, size_t length, char *output) const
 Converts a text and writes to an allocated buffer Please make sure the buffer has sufficent space. More...
 

Detailed Description

A high level converter This interface does not require C++11 to compile.

Constructor & Destructor Documentation

SimpleConverter::SimpleConverter ( const std::string &  configFileName)

Constructor of SimpleConverter.

Parameters
configFileNameFile name of configuration.

Member Function Documentation

std::string SimpleConverter::Convert ( const std::string &  input) const

Converts a text.

Parameters
inputText to be converted.
std::string SimpleConverter::Convert ( const char *  input) const

Converts a text.

Parameters
inputA C-Style string (terminated by '\0') to be converted.
std::string SimpleConverter::Convert ( const char *  input,
size_t  length 
) const

Converts a text.

Parameters
inputA C-Style string limited by a given length to be converted.
lengthMaximal length in byte of the input string.
size_t SimpleConverter::Convert ( const char *  input,
char *  output 
) const

Converts a text and writes to an allocated buffer Please make sure the buffer has sufficent space.

Parameters
inputA C-Style string (terminated by '\0') to be converted.
outputBuffer to write the converted text.
Returns
Length of converted text.
size_t SimpleConverter::Convert ( const char *  input,
size_t  length,
char *  output 
) const

Converts a text and writes to an allocated buffer Please make sure the buffer has sufficent space.

Parameters
inputA C-Style string limited by a given length to be converted.
lengthMaximal length in byte of the input string.
outputBuffer to write the converted text.
Returns
Length of converted text.

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