Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages

# aka2::serializer Class Reference

Base class of any serializer. More...

`#include <serializer.h>`

Inheritance diagram for aka2::serializer:

[legend]
Collaboration diagram for aka2::serializer:

[legend]
List of all members.

## Public Methods
void | using_prefix (const std::string &prefix)
void | using_uri (const std::string &uri)
void | default_ns_prefix (const std::string &prefix)
void | default_ns_uri (const std::string &uri)
void | serialize (const document &doc, std::ostream &ostm)
template<class R> void | serialize (const R &root, const std::string &name, std::ostream &ostm)
## Protected Attributes
shared_ptr< formatter_base > | formatter_

## Detailed Description

Base class of any serializer.

Definition at line 32 of file serializer.h.

## Member Function Documentation

void aka2::serializer::default_ns_prefix | ( | const std::string & | prefix | ) |

  | Specify default namespace prefix. Parameters:
  prefix | namespace prefix

void aka2::serializer::default_ns_uri | ( | const std::string & | uri | ) |

  | Specify default namespace URI. Parameters:
  uri | namespace URI

template<class R>
void aka2::serializer::serialize | ( | const R & | root,
|  | const std::string & | name,
|  | std::ostream & | ostm
| ) | `[inline]`

  | Serialize given root instance to std::ostream. Parameters:
  root | root instance.
  name | tagname of root element.
  ostm | std::ostream to output serialized XML document.
Definition at line 77 of file serializer.h.

void aka2::serializer::serialize | ( | const document & | doc,
|  | std::ostream & | ostm
| ) |

  | Serialize document instance. Parameters:
  doc | document instance
  ostm | std::ostream

void aka2::serializer::using_prefix | ( | const std::string & | prefix | ) |

  | Declare namespace prefix for namespace declared at the root node. Parameters:
  prefix | namespace prefix declared by aka::xmlns().

void aka2::serializer::using_uri | ( | const std::string & | uri | ) |

  | Declare namespace URI for namespace declared at the root node. Parameters:
  uri | namespace URI declared by aka::xmlns().

## Member Data Documentation

shared_ptr<formatter_base> aka2::serializer::formatter_`[protected]`

| Text formatting object for encoding-translation. Definition at line 114 of file serializer.h.

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

- serializer.h