oos::object_view< T > Class Template Reference

Create a view for a concrete object type. More...

#include <object_view.hpp>

Public Types

typedef object_view_iterator< T > iterator
 
typedef
const_object_view_iterator< T > 
const_iterator
 
typedef object_ptr< T > object_pointer
 

Public Member Functions

 object_view (const object_store &ostore, bool skip_siblings=false)
 Creates an object_view. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
object_pointer front () const
 
object_pointer back () const
 
bool empty () const
 
size_t size () const
 
void skip_siblings (bool skip)
 Sets the skip siblings flag. More...
 
template<class Predicate >
const_iterator find_if (Predicate pred) const
 
template<class Predicate >
iterator find_if (Predicate pred)
 
const prototype_nodenode () const
 

Detailed Description

template<class T>
class oos::object_view< T >

Create a view for a concrete object type.

Template Parameters
TThe type of the object_view.

The object_view class creates a view over an object type. When creating it is possible to have the view only over the given type or over the complete subset of objects including child objects.

Member Typedef Documentation

template<class T >
typedef const_object_view_iterator<T> oos::object_view< T >::const_iterator

Shortcut to the const_iterator type

template<class T >
typedef object_view_iterator<T> oos::object_view< T >::iterator

Shortcut to the iterator type

template<class T >
typedef object_ptr<T> oos::object_view< T >::object_pointer

Shortcut to object pointer

Constructor & Destructor Documentation

template<class T >
oos::object_view< T >::object_view ( const object_store ostore,
bool  skip_siblings = false 
)
inline

Creates an object_view.

Creates an object_view over the given template type T within the given object_store. When the skip_siblings flag is true, the view only has object of type T.

Parameters
ostoreThe object_store containing the objects.
skip_siblingsIf true only objects of concrete type T are part of the view.

Member Function Documentation

template<class T >
object_pointer oos::object_view< T >::back ( ) const
inline

Return the very last object_ptr of the object_view.

Returns
The last object_ptr of the view.
template<class T >
iterator oos::object_view< T >::begin ( )
inline

Return the begin of the object_view.

Returns
The begin iterator.
template<class T >
const_iterator oos::object_view< T >::begin ( ) const
inline

Return the begin of the object_view.

Returns
The begin iterator.
template<class T >
bool oos::object_view< T >::empty ( ) const
inline

Returns true if the object_view is empty.

Returns
True if object_view is empty.
template<class T >
iterator oos::object_view< T >::end ( )
inline

Return the end of the object_view.

Returns
The end iterator.
template<class T >
const_iterator oos::object_view< T >::end ( ) const
inline

Return the end of the object_view.

Returns
The end iterator.
template<class T >
template<class Predicate >
const_iterator oos::object_view< T >::find_if ( Predicate  pred) const
inline

Find object which matches the given condition

Template Parameters
PredicateThe type for the find predicate
Parameters
predThe find predicate
Returns
The first iterator with the object matching the condition.
template<class T >
template<class Predicate >
iterator oos::object_view< T >::find_if ( Predicate  pred)
inline

Find object which matches the given condition

Template Parameters
PredicateThe type for the find predicate
Parameters
predThe find predicate
Returns
The first iterator with the object matching the condition.
template<class T >
object_pointer oos::object_view< T >::front ( ) const
inline

Return the very first object_ptr of the object_view.

Returns
The first object_ptr of the view.
template<class T >
const prototype_node* oos::object_view< T >::node ( ) const
inline

Return the underlaying prototype node

Returns
The underlaying prototype node.
template<class T >
size_t oos::object_view< T >::size ( ) const
inline

Return the size of the object_view.

Returns
The size of the object_view.
template<class T >
void oos::object_view< T >::skip_siblings ( bool  skip)
inline

Sets the skip siblings flag.

When set to true all objects which are not of the concrete type T are omitted.

Parameters
skipSkips siblings when true.

The documentation for this class was generated from the following file:
  • object/object_view.hpp