acedia::AnyArray Class Reference

Describes an immutable, fixed-length array. More...

#include <anyarray.hpp>

Inheritance diagram for acedia::AnyArray:
acedia::Message acedia::Tuple

List of all members.

Public Member Functions

bool isEmpty () const
virtual bool isTuple () const
virtual bool isMessage () const
virtual boost::uint32_t length () const =0
virtual const Anyat (boost::uint32_t pos) const =0
MetaClassmetaClassAt (boost::uint32_t pos) const
 Get the meta class of element pos.
const Anyoperator[] (boost::uint32_t pos) const
template<typename T >
const T & valueAt (boost::uint32_t pos) const
 Get the value at position pos as instance of T.
template<typename A >
bool match () const
template<typename A , class Cond1 >
bool match (const Cond1 &c1) const
template<typename A , typename B >
bool match () const
template<typename A , typename B , class Cond1 , class Cond2 >
bool match (const Cond1 &c1, const Cond2 &c2) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C >
bool match () const
template<typename A , typename B , typename C , class Cond1 , class Cond2 , class Cond3 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , class Cond1 , class Cond2 , class Cond3 , class Cond4 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D , typename E >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , typename E , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4, const Cond5 &c5) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D , typename E , typename F >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , typename E , typename F , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4, const Cond5 &c5, const Cond6 &c6) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4, const Cond5 &c5, const Cond6 &c6, const Cond7 &c7) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 , class Cond8 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4, const Cond5 &c5, const Cond6 &c6, const Cond7 &c7, const Cond8 &c8) const
 Try to match the message with all given types and conditions.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
bool match () const
 Try to match the message with all given types.
template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 , class Cond8 , class Cond9 >
bool match (const Cond1 &c1, const Cond2 &c2, const Cond3 &c3, const Cond4 &c4, const Cond5 &c5, const Cond6 &c6, const Cond7 &c7, const Cond8 &c8, const Cond9 &c9) const
 Try to match the message with all given types and conditions.

Detailed Description

Describes an immutable, fixed-length array.

All elements are stored in instances of Any.

Definition at line 47 of file anyarray.hpp.


Member Function Documentation

virtual const Any& acedia::AnyArray::at ( boost::uint32_t  pos  )  const [pure virtual]
Returns:
element on index pos
Exceptions:
IndexOutOfBoundsException if pos >= length()

Implemented in acedia::Message, and acedia::Tuple.

bool acedia::AnyArray::isEmpty (  )  const [inline]
Returns:
true if the message contains no elements; otherwise false

Definition at line 63 of file anyarray.hpp.

bool acedia::AnyArray::isMessage (  )  const [virtual]
Returns:
true if this array is a message

Reimplemented in acedia::Message.

Definition at line 40 of file anyarray.cpp.

bool acedia::AnyArray::isTuple (  )  const [virtual]
Returns:
true if this array is a tuple

Reimplemented in acedia::Tuple.

Definition at line 38 of file anyarray.cpp.

virtual boost::uint32_t acedia::AnyArray::length (  )  const [pure virtual]
Returns:
The number of elements in the array

Implemented in acedia::Message, and acedia::Tuple.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 , class Cond8 , class Cond9 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4,
const Cond5 &  c5,
const Cond6 &  c6,
const Cond7 &  c7,
const Cond8 &  c8,
const Cond9 &  c9 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 315 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 304 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 , class Cond8 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4,
const Cond5 &  c5,
const Cond6 &  c6,
const Cond7 &  c7,
const Cond8 &  c8 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 294 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 283 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 , class Cond7 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4,
const Cond5 &  c5,
const Cond6 &  c6,
const Cond7 &  c7 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 273 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , typename G >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 262 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 , class Cond6 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4,
const Cond5 &  c5,
const Cond6 &  c6 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 252 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , typename F >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 241 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E , class Cond1 , class Cond2 , class Cond3 , class Cond4 , class Cond5 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4,
const Cond5 &  c5 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 231 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , typename E >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 220 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D , class Cond1 , class Cond2 , class Cond3 , class Cond4 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3,
const Cond4 &  c4 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 210 of file anyarray.hpp.

template<typename A , typename B , typename C , typename D >
bool acedia::AnyArray::match (  )  const [inline]

Try to match the message with all given types.

Returns:
true if the message consist of the given types

Definition at line 199 of file anyarray.hpp.

template<typename A , typename B , typename C , class Cond1 , class Cond2 , class Cond3 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2,
const Cond3 &  c3 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 189 of file anyarray.hpp.

template<typename A , typename B , typename C >
bool acedia::AnyArray::match (  )  const [inline]
Returns:
true if the message contains three elements and this elements are of the given types; otherwise false

Definition at line 178 of file anyarray.hpp.

template<typename A , typename B , class Cond1 , class Cond2 >
bool acedia::AnyArray::match ( const Cond1 &  c1,
const Cond2 &  c2 
) const [inline]

Try to match the message with all given types and conditions.

Returns:
true if the message consist of the given types and all conditions evaluates to true; otherwise false

Definition at line 168 of file anyarray.hpp.

template<typename A , typename B >
bool acedia::AnyArray::match (  )  const [inline]
Returns:
true if the message contains two elements and this elements are of the given types; otherwise false

Definition at line 157 of file anyarray.hpp.

template<typename A , class Cond1 >
bool acedia::AnyArray::match ( const Cond1 &  c1  )  const [inline]
Returns:
true if the message contains one element of the type A and the condition c1 evaluates to true

Definition at line 147 of file anyarray.hpp.

template<typename A >
bool acedia::AnyArray::match (  )  const [inline]
Returns:
true if the message contains one element and this element is of the given type; otherwise false

Definition at line 137 of file anyarray.hpp.

MetaClass* acedia::AnyArray::metaClassAt ( boost::uint32_t  pos  )  const [inline]

Get the meta class of element pos.

This is a convenient method. It's equal to at(pos).metaClass().

Returns:
meta class from element pos
Exceptions:
IndexOutOfBoundsException if pos >= length()

Definition at line 95 of file anyarray.hpp.

const Any& acedia::AnyArray::operator[] ( boost::uint32_t  pos  )  const [inline]
Returns:
element on index pos
Exceptions:
IndexOutOfBoundsException if pos >= length()

Definition at line 104 of file anyarray.hpp.

template<typename T >
const T& acedia::AnyArray::valueAt ( boost::uint32_t  pos  )  const [inline]

Get the value at position pos as instance of T.

Returns:
value on position pos
Exceptions:
IndexOutOfBoundsException if pos >= length()
ClassCastException if the value at is not of type T.

Definition at line 116 of file anyarray.hpp.


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

Generated by  doxygen 1.6.2