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

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

# xml_converter Struct Template Reference

Base conversion class. More...

List of all members.

## Public Member Functions
template<class OStream>
void | save (const Auto &a, OStream &out, const std::string &name="")
| Save automaton to stream.
template<class IStream>
void | load (Auto &a, IStream &in)
| Load automaton from stream.
void | create_document (const Auto &aut, const std::string &name="")
| Create the DOM document for aut, named name.
xercesc::DOMElement * | root_get ()
| The root of the created DOM document.

## Detailed Description

### template<class Auto>
struct vcsn::xml::xml_converter< Auto >

Base conversion class.

- `Auto` Type of the automaton to load / save.

Definition at line 57 of file xml_converter.hh.

## Member Function Documentation

void save | ( | const Auto & | a,
|  | OStream & | out,
|  | const std::string & | name = `""` |
| ) |  |  | `[inline]`

Save automaton to stream.

- `OStream` Type of the output stream.

Parameters:

  | a | Automaton to save.
  | out | Output stream.
  | name | String containing the name of the automaton.

Definition at line 46 of file xml_converter.hxx.

References xml_converter::create_document().

void load | ( | Auto & | aut,
|  | IStream & | in |
| ) |  |  | `[inline]`

Load automaton from stream.

- `IStream` Type of the input stream.

Parameters:

  | a | Automaton to load.
  | in | Input stream.

This method uses the Factory Method design pattern. The factory has to be registered with the macro register_all_factory(f, Auto) (where f is the factory, and Auto the template parameter.

- `Auto` Type of the automaton.
- `IStream` Type of the input stream.

Parameters:

  | a | Automaton to save.
  | in | Input stream.

Definition at line 235 of file xml_converter.hxx.