# XSAnnotation Class Reference

Inheritance diagram for XSAnnotation:

List of all members.

## Public Types

enum | ANNOTATION_TARGET { W3C_DOM_ELEMENT = 1, W3C_DOM_DOCUMENT = 2 }

## Public Member Functions

| XSAnnotation (MemoryManager *const manager)
Constructors
| XSAnnotation (const XMLCh *const contents, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor.
Destructor
| ~XSAnnotation ()
XSAnnotation methods
void | writeAnnotation (DOMNode *node, ANNOTATION_TARGET targetType)
| Write contents of the annotation to the specified DOM object.
void | writeAnnotation (ContentHandler *handler)
| Write contents of the annotation to the specified object.
const XMLCh * | getAnnotationString () const
| A text representation of annotation.
XMLCh * | getAnnotationString ()
void | setNext (XSAnnotation *const nextAnnotation)
| methods needed by implementation
XSAnnotation * | getNext ()
void | getLineCol (XMLFileLoc &line, XMLFileLoc &col) const
| Getter.
const XMLCh * | getSystemId () const
void | setLineCol (XMLFileLoc line, XMLFileLoc col)
| Setter.
void | setSystemId (const XMLCh *const systemId)

## Protected Attributes

XMLCh * | fContents
XSAnnotation * | fNext

## Member Enumeration Documentation

enum XSAnnotation::ANNOTATION_TARGET

Enumerator:

  W3C_DOM_ELEMENT | The object type is `org.w3c.dom.Element`.
  W3C_DOM_DOCUMENT | The object type is `org.w3c.dom.Document`.

## Constructor & Destructor Documentation

XSAnnotation::XSAnnotation | ( | const XMLCh *const | contents,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager` |
| ) |  |  |

The default constructor.

Parameters:

  | contents | The string that is to be the content of this XSAnnotation
  | manager | The configurable memory manager

XSAnnotation::~XSAnnotation | ( |  | ) |

XSAnnotation::XSAnnotation | ( | MemoryManager *const | manager | ) |

## Member Function Documentation

void XSAnnotation::writeAnnotation | ( | DOMNode * | node,
|  | ANNOTATION_TARGET | targetType |
| ) |  |  |

Write contents of the annotation to the specified DOM object.

In-scope namespace declarations for `annotation` element are added as attribute nodes of the serialized `annotation`.

Parameters:

  | node | A target pointer to the annotation target object, i.e. either `DOMDocument` or `DOMElement` cast as `DOMNode`.
  | targetType | A target type.

void XSAnnotation::writeAnnotation | ( | ContentHandler * | handler | ) |

Write contents of the annotation to the specified object.

The corresponding events for all in-scope namespace declarations are sent via the specified document handler.

Parameters:

  | handler | A target pointer to the annotation target object, i.e. `ContentHandler`.

const XMLCh * XSAnnotation::getAnnotationString | ( |  | ) | const

A text representation of annotation.

XMLCh * XSAnnotation::getAnnotationString | ( |  | ) |

References fContents.

void XSAnnotation::setNext | ( | XSAnnotation *const | nextAnnotation | ) |

methods needed by implementation

XSAnnotation* XSAnnotation::getNext | ( |  | ) |

void XSAnnotation::getLineCol | ( | XMLFileLoc & | line,
|  | XMLFileLoc & | col |
| ) |  |  | const

Getter.

const XMLCh * XSAnnotation::getSystemId | ( |  | ) | const

void XSAnnotation::setLineCol | ( | XMLFileLoc | line,
|  | XMLFileLoc | col |
| ) |  |  |

Setter.

void XSAnnotation::setSystemId | ( | const XMLCh *const | systemId | ) |

## Member Data Documentation

XMLCh* XSAnnotation::fContents`[protected]`

Referenced by getAnnotationString().

XSAnnotation* XSAnnotation::fNext`[protected]`

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

- XSAnnotation.hpp