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

# aka2 Namespace Reference

Namespace for akaxiso framework. More...

## Compounds
struct | any_array
| array of aka2::any. More...
struct | any_attributes
| array of any attributes. More...
struct | _attribute
| Helper class to define attribute. More...
class | all
| template to define aka:all leaf class. More...
class | array
| template to define leaf classes for array. More...
class | associative_array
| array leaf class of unique associative container. More...
class | associative_choice
| aka2::choice<> template speialized for unique associative container. More...
struct | associative_choice_binder
| Helper class to operate aka:choice for associative container. More...
class | attributes
| template to define attributes for aka:sequence, aka:all and simpleContent. More...
class | choice
| template to define aka:choice leaf class. More...
struct | complement_operator
| complement operator Base class for operator of entity_complement. More...
class | deep_ptr
| smart pointer with deep copy. More...
struct | entity_complement
| base class for user-defined complement. entity_complement is the base class to give additional information for deserialization of Simple Types. More...
class | entity_complements
| entity_complements to read/write simpletype values. More...
struct | fixed_attribute
| define fixed attribute. More...
class | isstream
| Input stream of std::string. More...
struct | fixed_value
| define fixed value as simplecontent value. More...
struct | _accessor
| define a child element by using accessor. More...
struct | _fixed_array
| define an array member of fixed-values. More...
struct | fixed_member
| Helper class to define serializable fixed-value member. More...
struct | _ptrmember
| Utility class to define a pointer-type member. More...
struct | _member
| Helper class to define a serializable member in aka2::sequence<>, aka2::all<>. More...
class | babel_formatter
| Formatter with babel encoding translator. More...
class | babel_serializer
| XML serializer with babel encoding translator. More...
class | default_formatter
| transparent-formatter. More...
class | default_serializer
| XML serializer without encoding translation. More...
class | deserializer
| XML deserializer interface. More...
struct | document
| stores a pair of a document tag name and a pointer to the root instance. More...
struct | error
| Base class of any exception in akaxiso. More...
class | expat_deserializer
| XML deserializer by using expat SAX parser. More...
class | formatter_base
| Base class of formatter. More...
class | item
| element of aka:choice containters. More...
struct | memberdef
| template to define member for aka:sequence and aka:all . More...
struct | nill
| nill value class More...
class | prefix_map
| associative map for namespace prefix and URI. More...
class | qname
| qualified name More...
class | sequence
| template to define aka:sequence leaf class. More...
class | sequential_array
| array leaf class of sequence container. More...
class | sequential_choice
| aka2::choice<> template speialized for sequence container. More...
struct | sequential_choice_binder
| Helper class to operate aka2::choice for sequence container. More...
class | serializer
| Base class of any serializer. More...
class | simplecontent
| template to define simpleContent leaf class. More...
class | simpletype
| template to define Simple Types leaf class. More...
struct | T_complement_operator
| template for More...
struct | wc_attribute
| akaxiso builtin type to represent xs:anyAttribute contents. More...
struct | wildcard
| akaxiso builtin type to represent xs:anyType in XML Schema. More...
class | xerces_deserializer
| XML deserializer class by using Xerces-C++ SAX2 parser. More...
class | xerces_formatter
| Formatter with Xerces-C++ transcoder class. More...
class | xerces_serializer
| XML serializer with Xerces-C++ transcoder class. More...
class | xml_deserializer
| The default XML deserializer class of akaxiso library. More...
class | xml_serializer
| The default XML serializer class of akaxiso library,. More...
class | xml_serializer_base
| Base class of XML serializer. More...
struct | xmltype_statics
| XML type name for serializable classes. More...
## Typedefs
typedef std::vector< nill > | nill_array
## Functions
void | initialize ()
void | uninitialize ()
template<class L> void | doctype (const std::string &name, const L &l)
void | doctype (const std::string &name)
template<class L> void | doctype (const std::string &name, const L &l, const std::string &fixed_val)
template<class T, class L> bool | equals (const T &lhs, const T &rhs, const L &l)
template<class T> bool | equals (const T &lhs, const T &rhs)
template<class T, class L> void | construct_element (T &e, const L &l)
template<class T> void | construct_element (T &e)
template<class T, class L> void | copy_element (T &dest, const T &src, const L &l)
template<class T> void | copy_element (T &dest, const T &src)
template<class T, class L> T * | replicate_element (const T &src, const L &l)
template<class T> T * | replicate_element (const T &src)
void | serialize (const document &doc, std::ostream &ostm)
document | deserialize (std::istream &istm)
document | deserialize (const char *doc)
document | deserialize (const std::string &doc)
document | deserialize_stdin ()
document | deserialize_file (const std::string &filename)
template<class T> T * | root_cast (aka2::document &doc)
template<class T> const T * | root_cast (const aka2::document &doc)
template<class T> T * | adopt_root (aka2::document &doc)
bool | document_of (const aka2::document &doc, const std::string &tagname)
bool | item_of (const aka2::item &i, const std::string &tagname)
template<class T> T & | item_cast (aka2::item &i)
template<class T> const T & | item_cast (const aka2::item &i)
void | xmlns (const std::string &prefix, const std::string &uri)
const std::string & | get_namespace_uri (const std::string &prefix)
const std::string & | get_prefix (const std::string &uri)
template<class T> T & | get_complement (entity_complements &ecomps, const std::string &name)
template<class T> const T & | get_complement (const entity_complements &ecomps, const std::string &name)

## Detailed Description

Namespace for akaxiso framework.

        Here's the akaxiso's builtin types.
        ------------------------------------------------------------
        Numeric types          min           max   XML-Schema type
        char                  -128           128   xs:byte
        unsigned char            0           255   xs:unsignedByte
        short               -32768         32767   xs:short
        unsigned short           0         65535   xs:unsignedShort
        long           -2147483648    2147483647   xs:int, xs:integer
        unsigned long            0        2^32-1   xs:unsignedInt,
        LONGLONG             -2^63        2^63-1   xs:long,
        ULONGLONG                0        2^64-1   xs:unsignedLong,
        int                  compiler-dependent.   (Not mapped.)
        unsigned int         compiler-dependent.   (Not mapped.)
        ------------------------------------------------------------
        boolean type
        bool     true/false (0/1)     xs:boolean
        ------------------------------------------------------------
        floating-point number
        float
        double
        ------------------------------------------------------------
        string type.
        std::string
        ------------------------------------------------------------
        aka::nill  empty type.
        ------------------------------------------------------------

## Typedef Documentation

typedef std::vector<nill> aka2::nill_array

| array of nill values. Definition at line 66 of file builtin.h.

## Function Documentation

template<class T>
T* adopt_root | ( | aka2::document & | doc | ) |

  | Adopt root node instance as class T. Obtained instance is owned by user. User is responsible for deleting root instance. Parameters:
  doc | document instance.
Returns: pointer to root node instance. Definition at line 75 of file document.h. References aka2::document::adopt().

template<class T>
void construct_element | ( | T & | e | ) | `[inline]`

  | Construct serializable instance. Some serializable member(s) can have default value(s), which is specified in model() method of a leaf class. This function will initialize members with default value(s) if given. The leaf class of xiso::leaf<T> is used. Parameters:
  e | instance to construct.
Definition at line 122 of file content_model.h.

template<class T, class L>
void construct_element | ( | T & | e,
|  | const L & | l
| ) | `[inline]`

  | Construct instance. Some serializable member(s) can have default value(s), which is specified in model() method of a leaf class. This function will initialize members with default value(s) if specified. Parameters:
  e | instance to construct.
  l | leaf class for class T.
Definition at line 110 of file content_model.h.

template<class T>
void copy_element | ( | T & | dest,
|  | const T & | src
| ) | `[inline]`

  | Copy serializable instance. The leaf class of xiso::leaf<T> is used. Parameters:
  dest | instance of T to be copied.
  src | instance of T to copy.
Definition at line 145 of file content_model.h.

template<class T, class L>
void copy_element | ( | T & | dest,
|  | const T & | src,
|  | const L & | l
| ) | `[inline]`

  | Copy serializable instance. Parameters:
  dest | to be copied.
  src | to copy.
  l | leaf class of T.
Definition at line 133 of file content_model.h.

document deserialize | ( | const std::string & | doc | ) |

  | Deserialize XML document by using the default XML deserializer (aka2::xml_deserializer). Parameters:
  doc | input source as std::string.
  Returns: parsed document. Exceptions:
  aka2::error | any deserialization exception.

document deserialize | ( | const char * | doc | ) |

  | Deserialize XML document by using the default XML deserializer (aka2::xml_deserializer). Parameters:
  doc | input source of character buffer.
  Returns: parsed document. Exceptions:
  aka2::error | any deserialization exception.

document deserialize | ( | std::istream & | istm | ) |

  | Deserialize XML document by using the default XML deserializer (aka2::xml_deserializer). Parameters:
  istm | input source.
  Returns: parsed document. Exceptions:
  aka2::error | any deserialization exception.

document deserialize_file | ( | const std::string & | filename | ) |

  | Deserialize XML document by using the default XML deserializer (aka2::xml_deserializer). Parameters:
  filename | file name of input XML document.
  Returns: parsed document. Exceptions:
  aka2::error | any deserialization exception.

document deserialize_stdin | ( |  | ) |

  | Deserialize XML document by using the default XML deserializer (aka2::xml_deserializer). Returns: parsed document. Exceptions:
  aka2::error | any deserialization exception.

template<class L>
void doctype | ( | const std::string & | name,
|  | const L & | l,
|  | const std::string & | fixed_val
| ) | `[inline]`

  | Declare fixed value document type. The document type is fixed simpleType. Parameters:
  name | tag name of the root element.
  l | leaf class instance.
  fixed_val | fixed value of the root simpleType.
See also: Document declaration Definition at line 68 of file content_model.h.

void doctype | ( | const std::string & | name | ) | `[inline]`

  | Declare a xs:anyType document type. The document type is aka2::any (xs:anyType). Parameters:
  name | tag name of the document.
See also: Document declaration Definition at line 53 of file content_model.h.

template<class L>
void doctype | ( | const std::string & | name,
|  | const L & | l
| ) | `[inline]`

  | Declare document type. The root class of the document type is specified by the leaf class, L. Parameters:
  name | tag name of the document.
  l | leaf class instance.
See also: Document declaration Definition at line 39 of file content_model.h.

bool document_of | ( | const aka2::document & | doc,
|  | const std::string & | tagname
| ) |

  | Check document tagname. Parameters:
  doc | document instance returned by deserializer.
  tagname | tag name of document.
Returns: true if the tag name of deserialized document is the same as the specified tagname.

template<class T>
bool equals | ( | const T & | lhs,
|  | const T & | rhs
| ) | `[inline]`

  | Compare serializable class instances. Parameters:
  lhs | Instance of T to be compared.
  rhs | instance of T to be compared.
Returns: true if serializable members/contents defined in the given leaf class are the same, otherwise false. Definition at line 98 of file content_model.h.

template<class T, class L>
bool equals | ( | const T & | lhs,
|  | const T & | rhs,
|  | const L & | l
| ) | `[inline]`

  | Compare serializable class instances. Parameters:
  lhs | to compare.
  rhs | to compare.
  l | leaf class for class T.
Returns: true if serializable members/contents defined in the given leaf class are the same, otherwise false. Definition at line 87 of file content_model.h.

template<class T>
const T& get_complement | ( | const entity_complements & | ecomps,
|  | const std::string & | name
| ) | `[inline]`

  | const version of get_complement(). Parameters:
  ecomps | entity_complements to get complement from.
  name | name of complement.
Returns: reference to complement. Definition at line 163 of file entity_complements.h. References aka2::entity_complements::const_get_complement_ptr().

template<class T>
T& get_complement | ( | entity_complements & | ecomps,
|  | const std::string & | name
| ) | `[inline]`

  | get complement from entity_complements. Parameters:
  ecomps | entity_complements to get complement from.
  name | name of complement.
Returns: reference to complement. Definition at line 152 of file entity_complements.h. References aka2::entity_complements::get_complement_ptr().

const std::string& get_namespace_uri | ( | const std::string & | prefix | ) |

  | Get namespace URI by its prefix. Parameters:
  prefix | namespace prefix.
Returns: namespace URI.

const std::string& get_prefix | ( | const std::string & | uri | ) |

  | Get namespace prefix by its URI. Parameters:
  uri | Namespace URI
Returns: Namespace URI.

void initialize | ( |  | ) |

| Initializer of akaxiso library. Initialize akaxiso library. xercesc::XMLPlatformUtils::Initialize() is called if you enable Xerces-C++.

template<class T>
const T& item_cast | ( | const aka2::item & | i | ) |

  | const version of tag name check function for aka2::item. Parameters:
  i | item instance to be checked.
Returns: reference of T instance in aka2::item. Definition at line 79 of file item.h. References aka2::item::get_node().

template<class T>
T& item_cast | ( | aka2::item & | i | ) |

  | Check tag name of aka2::item. Parameters:
  i | item instance to be checked.
Returns: reference of T instance in aka2::item. Definition at line 68 of file item.h. References aka2::item::get_node().

bool item_of | ( | const aka2::item & | i,
|  | const std::string & | tagname
| ) |

  | Check tag name of aka2::item. Parameters:
  i | item instance to be checked.
  tagname | tag name.
Returns: true if item's tag name is same as tag name parameter, otherwise false.

template<class T>
T* replicate_element | ( | const T & | src | ) | `[inline]`

  | Replicate serializable instance. A new instance of T is created on heap, and contents of src are copied by using the leaf class of xiso::leaf<L>. Parameters:
  src | instance to be replicated
Returns: replicated instance Definition at line 171 of file content_model.h.

template<class T, class L>
T* replicate_element | ( | const T & | src,
|  | const L & | l
| ) | `[inline]`

  | Replicate serializable instance. A new instance of T is created on heap, and contents of src are copied with leaf class, L. Parameters:
  src | instance to be replicated.
  l | leaf class of T.
Returns: replicated instance. Definition at line 158 of file content_model.h.

template<class T>
const T* root_cast | ( | const aka2::document & | doc | ) |

  | Const version of function to get root node instance as class T. Obtained instance is owned and deleted by document instance. Parameters:
  doc | document instance.
Returns: pointer to root node instance. Definition at line 63 of file document.h. References aka2::document::get_root().

template<class T>
T* root_cast | ( | aka2::document & | doc | ) |

  | Get root node instance as class T. Obtained instance is owned and deleted by document instance. Parameters:
  doc | document instance.
Returns: pointer to root node instance. Definition at line 51 of file document.h. References aka2::document::get_root().

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

  | serialization function. Internally aka2::xml_serializer is used. Parameters:
  doc | document to be serialized.
  ostm | std::ostream to output serialized XML document.

void uninitialize | ( |  | ) |

| Uninitializer of akaxiso library. Release system resources. xercesc::XMLPlatformUtils::Terminate() will be called if you enable Xerces-C++.

void xmlns | ( | const std::string & | prefix,
|  | const std::string & | uri
| ) |

  | Register and associate namespace URI with its prefix. Register and associate namespace URI and its prefix. Akaxiso's namespace database is a global-static object. Association of URI and prefix is used in the library-scope. See also: Namespace Parameters:
  prefix | prefix of namespace.
  uri | of namespace.