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

aka2::memberdef< L, T >::_accessor Struct Reference

define a child element by using accessor. More...

#include <memberdef.h>

List of all members.

Public Methods

template<class G, class S, class VL>  _accessor (const std::string &tagname, const G &g, const S &s, const VL &vl)
template<class G, class S, class VL>  _accessor (const std::string &tagname, const G &g, const S &s, const VL &vl, int minOccurs, int maxOccurs, bool emptiable=false)


Detailed Description

template<class L, class T>
struct aka2::memberdef< L, T >::_accessor

define a child element by using accessor.

Accessor is defined with getter(G)/setter(S) classes.
Getter class (G) should have G::operator() to get pointer to the value.

 template <class P, class V>
 struct G {
   typedef V value_type;
   const V* operator()(const P& p) const;
 };

Setter class (S) should have S::operator() to set value.

 template<class P, class V>
 struct S {
   typedef V value_type;
   void operator()(P &p, const V &value) const;
 };

class P is the type of value class, and V if for value type of an accessor.

See also:
aka2::memberdef::accessor

Definition at line 404 of file memberdef.h.


Constructor & Destructor Documentation

template<class L, class T>
template<class G, class S, class VL>
aka2::memberdef< L, T >::_accessor::_accessor const std::string &    tagname,
const G &    g,
const S &    s,
const VL &    vl
[inline]
 

define a member by using accessor.

Parameters:
tagname  tagname.
g  getter class.
s  setter class.
vl  leaf class of value.

Definition at line 414 of file memberdef.h.

template<class L, class T>
template<class G, class S, class VL>
aka2::memberdef< L, T >::_accessor::_accessor const std::string &    tagname,
const G &    g,
const S &    s,
const VL &    vl,
int    minOccurs,
int    maxOccurs,
bool    emptiable = false
[inline]
 

define an array member by using accessor.

Parameters:
tagname  tagname.
g  getter class.
s  setter class.
vl  leaf class of value.
minOccurs  minOccurs
maxOccurs  maxOccurs
emptiable  true if array could be empty even minOccurs is not zero.

Definition at line 430 of file memberdef.h.


The documentation for this struct was generated from the following file:
Generated on Sun Dec 19 22:59:00 2004 for akaxiso2 by doxygen1.2.18