nyctergatis.com

Contact

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

NMEStyle Class Reference

#include <NMEStyleCpp.h>

Inheritance diagram for NMEStyle:

NME

Detailed Description

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

NMEStyleC is a C++ class wrapper for NME.h, NME.c, NMEStyle.h and NMEStyle.cpp. While class NME converts text with NME markup to some other text format, often with another markup such as HTML or RTF, class NMEStyle usually provides two separate outputs: plain text, and a table of style specifications with the location of the related text span.

Definition at line 51 of file NMEStyleCpp.h.


Public Member Functions

 NMEStyle ()
 Default constructor.
 NMEStyle (char const *input, int inputLength=-1)
 Constructor with input.
 NMEStyle (NMEStyle const &nme)
 Copy constructor.
 ~NMEStyle ()
 Destructor.
NMEStyle operator= (NMEStyle const &nme)
 Copy operator.
void setUnicodeStyleOffsets (bool unicodeStyleOffsets=true)
 Set style table offset mode.
NMEErr getOutput (NMEConstText *output, NMEInt *outputLength=NULL)
 Get parser output, generating it if needed.
NMEStyleTable const * getStyleTable ()
 Get style table.
NMEBoolean handleLinkClick (NMEInt offset, NMELinkHandler *handler)
 Handle a click in text, calling link handler if offset is located in a link.

Constructor & Destructor Documentation

NMEStyle::NMEStyle ( 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 67 of file NMEStyleCpp.h.

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

Copy constructor.

Parameters:
[in] nme object to be copied

Definition at line 75 of file NMEStyleCpp.h.

NMEStyle::~NMEStyle (  )  [inline]

Destructor.

Definition at line 96 of file NMEStyleCpp.h.


Member Function Documentation

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

Copy operator.

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

Definition at line 106 of file NMEStyleCpp.h.

void NMEStyle::setUnicodeStyleOffsets ( bool  unicodeStyleOffsets = true  )  [inline]

Set style table offset mode.

Parameters:
[in] unicodeStyleOffsets true to have offsets in style table in UCS-16 (16-bit unicode), false to have offsets in bytes (UTF-8 or any other ASCII extension)

Definition at line 136 of file NMEStyleCpp.h.

NMEErr NMEStyle::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 from NME.

Definition at line 146 of file NMEStyleCpp.h.

NMEStyleTable const* NMEStyle::getStyleTable (  )  [inline]

Get style table.

Returns:
style table

Definition at line 192 of file NMEStyleCpp.h.

NMEBoolean NMEStyle::handleLinkClick ( NMEInt  offset,
NMELinkHandler handler 
) [inline]

Handle a click in text, calling link handler if offset is located in a link.

Parameters:
[in] offset click location as a character offset in output text
[in] handler object whose click method is called if offset is in a link (can be NULL)
Returns:
TRUE if offset is in a link, else FALSE

Definition at line 213 of file NMEStyleCpp.h.


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