- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data > Class Template Reference

`#include <ContentLauncher.h>`

Inheritance diagram for Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >:

[legend]
Collaboration diagram for Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >:

[legend]
List of all members.

## Public Member Functions
| ContentLauncher (XERCES_CPP_NAMESPACE::SAX2XMLReader *reader, Data data, Callback *callback)
virtual void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
virtual void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES_CPP_NAMESPACE::Attributes &attrs)
## Protected Attributes
Callback * | m_Callback

## Detailed Description

### template<class Content, class Callback, typename Data>
class Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >

This class is able to load some type of content Content and return the content to a callback object of type Callback, given some context Data.

Definition at line 29 of file ContentLauncher.h.

## Constructor & Destructor Documentation

template<class Content, class Callback, typename Data>

Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >::ContentLauncher | ( | XERCES_CPP_NAMESPACE::SAX2XMLReader * | reader,
|  | Data | data,
|  | Callback * | callback |
| ) |  |  | `[inline]`

Constructs a new launcher. The launcher is designed to lauch the new Content handler when the next entity starts.

Parameters:

  | reader | The reader that is reading the data. This is used to change the content handler on the fly.
  | model | The model to use for translation.

Definition at line 41 of file ContentLauncher.h.

## Member Function Documentation

template<class Content, class Callback, typename Data>

virtual void Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >::endElement | ( | const XMLCh *const | uri,
|  | const XMLCh *const | localname,
|  | const XMLCh *const | qname |
| ) |  |  | `[inline, virtual]`

Receive notification of the end of an element.

The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

Parameters:

  | uri | The URI of the asscioated namespace for this element
  | localname | The local part of the element name
  | qname | The QName of this element

Exceptions:

  | SAXException | Any SAX exception, possibly wrapping another exception.

Reimplemented from Mers::Utils::Io::Xml::Sax::ContentHandler.

Definition at line 65 of file ContentLauncher.h.

References Mers::Utils::Io::Xml::Sax::ContentHandler::m_Logger.

template<class Content, class Callback, typename Data>

virtual void Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >::startElement | ( | const XMLCh *const | uri,
|  | const XMLCh *const | localname,
|  | const XMLCh *const | qname,
|  | const XERCES_CPP_NAMESPACE::Attributes & | attrs |
| ) |  |  | `[inline, virtual]`

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): IMPLIED attributes will be omitted.

Parameters:

  | uri | The URI of the asscioated namespace for this element
  | localname | The local part of the element name
  | qname | The QName of this element
  | attrs | The attributes attached to the element, if any.

Exceptions:

  | SAXException | Any SAX exception, possibly wrapping another exception.

See also:
  endElement

  Attributes::Attributes

Todo:
  Maybe we should verify that localname matches the content we're supposed to launch.

Todo:
  We may want to allow attrs (if you can) and pass them to the content handler's constructor.

Reimplemented from Mers::Utils::Io::Xml::Sax::ContentHandler.

Definition at line 116 of file ContentLauncher.h.

References Mers::Utils::Io::Xml::Sax::ContentLauncher< Content, Callback, Data >::m_Callback, and Mers::Utils::Io::Xml::Sax::ContentHandler::m_Logger.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Io/Xml/Sax/ContentLauncher.h