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

# Arrays and pointers

Akaxiso datamodel represents XMLSchema's occurence by using arrays and pointers.

## Array

Akaxiso's arrays are defined by using STL or STL-compatible containers. The following interface(concept) is supported.

- Sequence
- Sorted associative container

To define leaf classes for arrays, use aka2::sequential_array<> template or aka2::associative_array<> template.

    typedef std::vector<long> long_array;
    typedef aka2::sequential_array<long_array, xiso::leaf<long> > long_array_leaf;

## Pointer

Akaxiso can use pointers as a serializable member for aka:sequence and aka:all. Pointer members should be declared by using aka2::deep_ptr<> template.

    struct sequence {
      aka2::deep_ptr<long> longptr_;
    };

    struct sequence_leaf : aka2::sequence<sequence, sequence_leaf> {
      void model() {
        // The part surrounded by brackets, [], is optional.
        ptrmember("pointer_to_long_value", &sequence::longptr_[, xiso::leaf<long>()]);
      }
    };