nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS

NME Class Reference

#include <NMECpp.h>

Inheritance diagram for NME:

NMEStyle

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.

Definition at line 28 of file NMECpp.h.


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)

Constructor & Destructor Documentation

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

Constructor with input.

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

Definition at line 48 of file NMECpp.h.

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

Copy constructor.

Parameters:
[in] nme object to be copied

Definition at line 63 of file NMECpp.h.

NME::~NME (  )  [inline]

Destructor.

Definition at line 73 of file NMECpp.h.


Member Function Documentation

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

Copy operator.

Parameters:
[in] nme object to be copied
Returns:
*this

Definition at line 83 of file NMECpp.h.

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

Set (or change) input.

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

Definition at line 103 of file NMECpp.h.

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

Set (or change) output format.

Parameters:
[in] format output format

Definition at line 116 of file NMECpp.h.

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

Set (or change) output font size.

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

Definition at line 125 of file NMECpp.h.

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

Get parser output, generating it if needed.

Parameters:
[out] output address of output (null-terminated)
[out] outputLength length of output in bytes, excluding null terminator (optional)

Reimplemented in NMEStyle.

Definition at line 136 of file NMECpp.h.


The documentation for this class was generated from the following file:
Generated by Doxygen.
Copyright 2007-2008, Yves Piguet.
All rights reserved.