en fr

nyctergatis.com

NME parser class (objects can be used for multiple conversions, by changing input and/or output format before getting output again). More...

#include <NMECpp.h>

Inheritance diagram for NME:
NMEStyle

Public Member Functions

 NME ()
 Default constructor.
 NME (char const *input, int inputLength=-1)
 Constructor with input.
 NME (NME const &nme)
 Copy constructor.
 ~NME ()
 Destructor.
NME operator= (NME const &nme)
 Copy operator.
void setInput (char const *input, int inputLength=-1)
 Set (or change) input.
void setFormat (NMEOutputFormat const &format)
 Set (or change) output format.
void setFontSize (NMEInt fontSize=0)
 Set (or change) output font size.
NMEErr getOutput (NMEConstText *output, NMEInt *outputLength=NULL)
 Get parser output, generating it if needed.

Protected Attributes

NMEConstText input
 NME text input (belong to caller)
NMEInt inputLength
 length of input in bytes
NMEText buf
 buffer used during conversion (belong to NME object)
NMEInt bufSize
 length of buf
NMEText output
 address of processed output (in buf)
NMEInt outputLength
 length of processed output
NMEOutputFormat format
 NME output format.
NMEInt fontSize
 font size (0 for default value)

Detailed Description

NME parser class (objects can be used for multiple conversions, by changing input and/or output format before getting output again).

In addition to the conversion of text with NME markup to some text output format, it handles memory allocation with C++ operators new and delete, which simplifies its use with respect to the C interface defined in NME.h. Errors are handled via C++ exceptions.


Constructor & Destructor Documentation

NME::NME ( char const *  input,
int  inputLength = -1 
) [inline]

Constructor with input.

Parameters:
[in]inputaddress of input
[in]inputLengthinput length in bytes (if not specified, input is a null-terminated string)

Definition at line 51 of file NMECpp.h.

NME::NME ( NME const &  nme) [inline]

Copy constructor.

Parameters:
[in]nmeobject to be copied

Definition at line 66 of file NMECpp.h.

NME::~NME ( ) [inline]

Destructor.

Definition at line 76 of file NMECpp.h.


Member Function Documentation

NMEErr NME::getOutput ( NMEConstText output,
NMEInt outputLength = NULL 
) [inline]

Get parser output, generating it if needed.

Parameters:
[out]outputaddress of output (null-terminated)
[out]outputLengthlength of output in bytes, excluding null terminator (optional)

Reimplemented in NMEStyle.

Definition at line 139 of file NMECpp.h.

NME NME::operator= ( NME const &  nme) [inline]

Copy operator.

Parameters:
[in]nmeobject to be copied
Returns:
*this

Definition at line 86 of file NMECpp.h.

void NME::setFontSize ( NMEInt  fontSize = 0) [inline]

Set (or change) output font size.

Parameters:
[in]fontSizefont size (default is default output font size)

Definition at line 128 of file NMECpp.h.

void NME::setFormat ( NMEOutputFormat const &  format) [inline]

Set (or change) output format.

Parameters:
[in]formatoutput format

Definition at line 119 of file NMECpp.h.

void NME::setInput ( char const *  input,
int  inputLength = -1 
) [inline]

Set (or change) input.

Parameters:
[in]inputaddress of input
[in]inputLengthinput length in bytes (if not specified, input is a null-terminated string)

Definition at line 106 of file NMECpp.h.


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