Classes | Public Types | Public Member Functions
zorba::Sequence< T > Class Template Reference

Provides a way for a function to return a sequence of some type T that can be iterated over. More...

#include <zorba/xquery_functions.h>

List of all members.

Classes

struct  iterator

Public Types

typedef T value_type

Public Member Functions

bool next (value_type *result)
 Gets the next element in the sequence.
 Sequence (iterator *i)
 Constructs a new Sequence.
 Sequence (Sequence const &s)
 Copy constructs a Sequence.

Detailed Description

template<typename T>
class zorba::Sequence< T >

Provides a way for a function to return a sequence of some type T that can be iterated over.

Template Parameters:
TThe type of sequence.

Definition at line 35 of file xquery_functions.h.


Member Typedef Documentation

template<typename T >
typedef T zorba::Sequence< T >::value_type

Definition at line 37 of file xquery_functions.h.


Constructor & Destructor Documentation

template<typename T >
zorba::Sequence< T >::Sequence ( iterator i) [inline]

Constructs a new Sequence.

This constructor is intended only for function implementors.

Parameters:
iThe iterator that provides the elements of the sequence. Ownership of the iterator is taken.

Definition at line 51 of file xquery_functions.h.

template<typename T >
zorba::Sequence< T >::Sequence ( Sequence< T > const &  s) [inline]

Copy constructs a Sequence.

Parameters:
sThe Sequence to copy from. Note that it is a destructive copy in that the sequence of s is 'i' moved.

Definition at line 59 of file xquery_functions.h.


Member Function Documentation

template<typename T >
bool zorba::Sequence< T >::next ( value_type result) [inline]

Gets the next element in the sequence.

Parameters:
resultA pointer to the variable to receive the next element.
Returns:
true only if there is a next element.

Definition at line 67 of file xquery_functions.h.


The documentation for this class was generated from the following file:
blog comments powered by Disqus