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_node * | node () const |
Detailed Description
template<class T>
class oos::object_view< T >
Create a view for a concrete object type.
- Template Parameters
-
T The 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
typedef const_object_view_iterator<T> oos::object_view< T >::const_iterator |
Shortcut to the const_iterator type
typedef object_view_iterator<T> oos::object_view< T >::iterator |
Shortcut to the iterator type
typedef object_ptr<T> oos::object_view< T >::object_pointer |
Shortcut to object pointer
Constructor & Destructor Documentation
|
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
-
ostore The object_store containing the objects. skip_siblings If true only objects of concrete type T are part of the view.
Member Function Documentation
|
inline |
Return the very last object_ptr of the object_view.
- Returns
- The last object_ptr of the view.
|
inline |
Return the begin of the object_view.
- Returns
- The begin iterator.
|
inline |
Return the begin of the object_view.
- Returns
- The begin iterator.
|
inline |
Returns true if the object_view is empty.
- Returns
- True if object_view is empty.
|
inline |
Return the end of the object_view.
- Returns
- The end iterator.
|
inline |
Return the end of the object_view.
- Returns
- The end iterator.
|
inline |
Find object which matches the given condition
- Template Parameters
-
Predicate The type for the find predicate
- Parameters
-
pred The find predicate
- Returns
- The first iterator with the object matching the condition.
|
inline |
Find object which matches the given condition
- Template Parameters
-
Predicate The type for the find predicate
- Parameters
-
pred The find predicate
- Returns
- The first iterator with the object matching the condition.
|
inline |
Return the very first object_ptr of the object_view.
- Returns
- The first object_ptr of the view.
|
inline |
Return the underlaying prototype node
- Returns
- The underlaying prototype node.
|
inline |
Return the size of the object_view.
- Returns
- The size of the object_view.
|
inline |
Sets the skip siblings flag.
When set to true all objects which are not of the concrete type T are omitted.
- Parameters
-
skip Skips siblings when true.
The documentation for this class was generated from the following file:
- object/object_view.hpp