Create a view for a concrete serializable 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 > | pointer |
Public Member Functions | |
object_view (object_store &store, bool skip_siblings=false) | |
Creates an object_view. | |
object_view (const object_view &x) | |
Copy construct a view. | |
object_view (object_view &&x) noexcept | |
Copy move constructor. | |
object_view & | operator= (const object_view &x) |
Copy assign view. | |
object_view & | operator= (object_view &&x) noexcept |
Assignment move constructor. | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
pointer | front () const |
pointer | back () const |
bool | empty () const |
size_t | size () const |
void | skip_siblings (bool skip) |
Sets the skip siblings flag. | |
template<class Predicate > | |
const_iterator | find_if (Predicate pred) const |
template<class Predicate > | |
iterator | find_if (Predicate pred) |
const prototype_node * | node () const |
Create a view for a concrete serializable type.
T | The type of the object_view. |
The object_view class creates a view over an serializable 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.
typedef const_object_view_iterator<T> matador::object_view< T >::const_iterator |
Shortcut to the const_iterator type
typedef object_view_iterator<T> matador::object_view< T >::iterator |
Shortcut to the iterator type
typedef object_ptr<T> matador::object_view< T >::pointer |
Shortcut to serializable pointer
|
inlineexplicit |
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 serializable of type T.
store | The object_store containing the objects. |
skip_siblings | If true only objects of concrete type T are part of the view. |
|
inline |
Copy construct a view.
x | object_view to be copied |
|
inlinenoexcept |
Copy move constructor.
x | object_view to be moved |
|
inline |
Return the very last pointer of the object_view.
|
inline |
Return the begin of the object_view.
|
inline |
Return the begin of the object_view.
|
inline |
Returns true if the object_view is empty.
|
inline |
Return the end of the object_view.
|
inline |
Return the end of the object_view.
|
inline |
Find serializable which matches the given condition
Predicate | The type for the find predicate |
pred | The find predicate |
|
inline |
Find serializable which matches the given condition
Predicate | The type for the find predicate |
pred | The find predicate |
|
inline |
Return the very first pointer of the object_view.
|
inline |
Return the underlaying prototype node
|
inline |
|
inlinenoexcept |
Assignment move constructor.
x | object_view to be moved |
|
inline |
Return 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.
skip | Skips siblings when true. |