XSAnnotation Class Reference
Inheritance diagram for XSAnnotation:

## Public Types

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

## Public Member Functions

Constructors
| XSAnnotation (const XMLCh *const contents, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor. More...
Destructor
| ~XSAnnotation ()
Public Member Functions inherited from XSObject
| XSObject (XSConstants::COMPONENT_TYPE compType, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor. More...
virtual | ~XSObject ()
XSConstants::COMPONENT_TYPE | getType () const
| The `type` of this object, i.e. More...
virtual const XMLCh * | getName () const
| The name of type `NCName` of this declaration as defined in XML Namespaces. More...
virtual const XMLCh * | getNamespace () const
| The [target namespace] of this object, or `null` if it is unspecified. More...
virtual XSNamespaceItem * | getNamespaceItem ()
| A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise. More...
virtual XMLSize_t | getId () const
| Optional. More...
void | setId (XMLSize_t id)
| methods needed by implementation More...
Public Member Functions inherited from XMemory
void * | operator new (size_t size)
| This method overrides operator new. More...
void * | operator new (size_t size, MemoryManager *memMgr)
| This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
void * | operator new (size_t size, void *ptr)
| This method overrides placement operator new. More...
void | operator delete (void *p)
| This method overrides operator delete. More...
void | operator delete (void *p, MemoryManager *memMgr)
| This method provides a matching delete for the custom operator new. More...
void | operator delete (void *p, void *ptr)
| This method provides a matching delete for the placement new. More...

## XSAnnotation methods

XMLCh * | fContents
XSAnnotation * | fNext
void | writeAnnotation (DOMNode *node, ANNOTATION_TARGET targetType)
| Write contents of the annotation to the specified DOM object. More...
void | writeAnnotation (ContentHandler *handler)
| Write contents of the annotation to the specified object. More...
const XMLCh * | getAnnotationString () const
| A text representation of annotation. More...
XMLCh * | getAnnotationString ()
void | setNext (XSAnnotation *const nextAnnotation)
| methods needed by implementation More...
XSAnnotation * | getNext ()
void | getLineCol (XMLFileLoc &line, XMLFileLoc &col) const
| Getter. More...
const XMLCh * | getSystemId () const
void | setLineCol (XMLFileLoc line, XMLFileLoc col)
| Setter. More...
void | setSystemId (const XMLCh *const systemId)
| XSAnnotation (MemoryManager *const manager)

## Additional Inherited Members

Protected Member Functions inherited from XMemory
| XMemory ()
| Protected default constructor. More...
Protected Attributes inherited from XSObject
XSConstants::COMPONENT_TYPE | fComponentType
XSModel * | fXSModel
MemoryManager * | fMemoryManager
XMLSize_t | fId

## Member Enumeration Documentation

## ANNOTATION_TARGET

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() [1/2]

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() [2/2]

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

## Member Function Documentation

## getAnnotationString() [1/2]

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

## getAnnotationString() [2/2]

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

A text representation of annotation.

References fContents.

## getLineCol()

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

Getter.

## getNext()

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

## getSystemId()

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

## setLineCol()

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

Setter.

## setNext()

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

methods needed by implementation

## setSystemId()

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

## writeAnnotation() [1/2]

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`.

## writeAnnotation() [2/2]

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.

## Member Data Documentation

## fContents

XMLCh* XSAnnotation::fContents

protected

Referenced by getAnnotationString().

## fNext

XSAnnotation* XSAnnotation::fNext

protected

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

- XSAnnotation.hpp