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

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). More...

#include <NMEStyleCpp.h>

Inheritance diagram for NMEStyle:
NME

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.

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.


Constructor & Destructor Documentation

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

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

Copy constructor.

Parameters:
[in]nmeobject to be copied

Definition at line 78 of file NMEStyleCpp.h.

NMEStyle::~NMEStyle ( ) [inline]

Destructor.

Definition at line 99 of file NMEStyleCpp.h.


Member Function Documentation

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

Definition at line 149 of file NMEStyleCpp.h.

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

Get style table.

Returns:
style table

Definition at line 195 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]offsetclick location as a character offset in output text
[in]handlerobject 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 216 of file NMEStyleCpp.h.

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

Copy operator.

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

Definition at line 109 of file NMEStyleCpp.h.

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

Set style table offset mode.

Parameters:
[in]unicodeStyleOffsetstrue 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 139 of file NMEStyleCpp.h.


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