xmlwrapp
Classes | Public Types | Public Member Functions | List of all members
xml::nodes_view Class Reference

This class implements a view of XML nodes. More...

#include <nodes_view.h>

Classes

class  const_iterator
 The const_iterator provides a way to access nodes in the view similar to a standard C++ container. More...
 
class  iterator
 The iterator provides a way to access nodes in the view similar to a standard C++ container. More...
 

Public Types

typedef std::size_t size_type
 Size type. More...
 

Public Member Functions

iterator begin ()
 Get an iterator that points to the beginning of this view's nodes. More...
 
const_iterator begin () const
 Get an iterator that points to the beginning of this view's nodes. More...
 
iterator end ()
 Get an iterator that points one past the last child for this view. More...
 
const_iterator end () const
 Get an iterator that points one past the last child for this view. More...
 
size_type size () const
 Returns the number of nodes in this view. More...
 
bool empty () const
 Is the view empty? More...
 

Detailed Description

This class implements a view of XML nodes.

A view is a container-like class that only allows access to a subset of xml::node's child nodes. The exact content depends on how the view was obtained; typical uses are e.g. a view of all element children or all elements with a given name.

The nodes_view class implements the same container interface that xml::node does: it has begin() and end() methods.

Since
0.6.0
See Also
xml::node::elements(), xml::node::elements(const char *)

Member Typedef Documentation

typedef std::size_t xml::nodes_view::size_type

Size type.

Member Function Documentation

iterator xml::nodes_view::begin ( )
inline

Get an iterator that points to the beginning of this view's nodes.

const_iterator xml::nodes_view::begin ( ) const
inline

Get an iterator that points to the beginning of this view's nodes.

bool xml::nodes_view::empty ( ) const
inline

Is the view empty?

iterator xml::nodes_view::end ( )
inline

Get an iterator that points one past the last child for this view.

const_iterator xml::nodes_view::end ( ) const
inline

Get an iterator that points one past the last child for this view.

size_type xml::nodes_view::size ( ) const

Returns the number of nodes in this view.


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