oos::object_vector< S, T, WITH_JOIN_TABLE > Class Template Reference

Object vector class without relation table. More...

#include <object_vector.hpp>

Inherits oos::object_vector_base< S, T >.

Public Types

typedef object_ref< S > parent_ref
 
typedef void(T::object_type::* FUNC1 )(const parent_ref &)
 
typedef void(T::object_type::* FUNC2 )(int)
 
typedef int(T::object_type::* FUNC3 )() const
 
typedef base_vector::size_type size_type
 
typedef base_vector::iterator iterator
 
typedef base_vector::const_iterator const_iterator
 
typedef object_vector_base< S, T > base_vector
 
typedef object_vector_base< S,
T, object_ptr
< object_vector_item< T, S > > > 
base_vector
 
typedef T::object_type value_type
 
typedef oos::conditional
< CPP11_TYPE_TRAITS_NS::is_base_of
< object_base_ptr, T >::value,
T, dummyy >::type::object_type 
value_type
 
typedef T value_holder
 
typedef T::object_type item_type
 
typedef object_vector_item< T, S > item_type
 
typedef base_vector::item_holder item_holder
 
typedef item_holder item_ptr
 
- Public Types inherited from oos::object_vector_base< S, T >
typedef T value_holder
 
typedef S parent_type
 
typedef T item_holder
 
typedef T::object_type item_type
 
typedef std::vector< item_holdervector_type
 
typedef vector_type::iterator iterator
 
typedef vector_type::const_iterator const_iterator
 
typedef object_container::size_type size_type
 

Additional Inherited Members

- Public Member Functions inherited from oos::object_vector_base< S, T >
 object_vector_base (parent_type *parent)
 Creates a new object_vector. More...
 
virtual const char * classname () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
virtual bool empty () const
 
virtual void clear ()
 
virtual size_type size () const
 
virtual iterator insert (iterator pos, const value_holder &x)=0
 Inserts a new element. More...
 
void push_back (const value_holder &x)
 
value_holder operator[] (size_type pos)
 
const value_holder operator[] (size_type pos) const
 
value_holder at (size_type pos)
 
const value_holder at (size_type pos) const
 
virtual iterator erase (iterator i)=0
 Interface to erase an element. More...
 
virtual iterator erase (iterator first, iterator last)=0
 Erases a range defines by iterators. More...
 
- Protected Member Functions inherited from oos::object_vector_base< S, T >
virtual void for_each (const node_func &nf) const
 Executes the given function object for all elements. More...
 
virtual void uninstall ()
 
virtual void parent (object *p)
 
parent_typeparent ()
 
vector_typevector ()
 
virtual void adjust_index (iterator i)=0
 
void insert_proxy (int index, object_proxy *proxy)
 

Detailed Description

template<class S, class T, bool WITH_JOIN_TABLE>
class oos::object_vector< S, T, WITH_JOIN_TABLE >

Object vector class without relation table.

Template Parameters
SThe type of the parent object.
TThe value of the vector.
WITH_JOIN_TABLEIndicates wether a join object/table is used or not..

The object_vector class implements a vector which can hold any type of object from builtin types as int, float to object_ptr or object_ref elements. The class provides STL like behaviour and the order of the elements is reliable.

S indicates the super class holding the vector and T is the type of the vector item.

The last template argument indicates wether the vector uses a relation object/table or not, where true means use a relation object/table and false not to. If the value is false the item must be an object containing already information about its super/holder object.

Member Typedef Documentation

template<class S , class T , bool WITH_JOIN_TABLE>
typedef object_vector_base<S, T> oos::object_vector< S, T, WITH_JOIN_TABLE >::base_vector

Shortcut for the base vector.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef object_vector_base<S, T, object_ptr<object_vector_item<T, S> > > oos::object_vector< S, T, WITH_JOIN_TABLE >::base_vector

Shortcut for the base vector.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef base_vector::const_iterator oos::object_vector< S, T, WITH_JOIN_TABLE >::const_iterator

Shortcut for the const iterator.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef void(T::object_type::* oos::object_vector< S, T, WITH_JOIN_TABLE >::FUNC1)(const parent_ref &)

Shortcut for the parent reference setter function.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef void(T::object_type::* oos::object_vector< S, T, WITH_JOIN_TABLE >::FUNC2)(int)

Shortcut for the index setter function.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef int(T::object_type::* oos::object_vector< S, T, WITH_JOIN_TABLE >::FUNC3)() const

Shortcut for the index getter function.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef base_vector::item_holder oos::object_vector< S, T, WITH_JOIN_TABLE >::item_holder

Shortcut for the item holder.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef item_holder oos::object_vector< S, T, WITH_JOIN_TABLE >::item_ptr

Shortcut for the item ptr.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef T::object_type oos::object_vector< S, T, WITH_JOIN_TABLE >::item_type

Shortcut for the item type.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef object_vector_item<T, S> oos::object_vector< S, T, WITH_JOIN_TABLE >::item_type

Shortcut for the item type.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef base_vector::iterator oos::object_vector< S, T, WITH_JOIN_TABLE >::iterator

Shortcut for the iterator.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef object_ref<S> oos::object_vector< S, T, WITH_JOIN_TABLE >::parent_ref

Shortcut for the parent reference.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef base_vector::size_type oos::object_vector< S, T, WITH_JOIN_TABLE >::size_type

Shortcut for the size type.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef T oos::object_vector< S, T, WITH_JOIN_TABLE >::value_holder

Shortcut for the value holder.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef T::object_type oos::object_vector< S, T, WITH_JOIN_TABLE >::value_type

Shortcut for the value type.

template<class S , class T , bool WITH_JOIN_TABLE>
typedef oos::conditional<CPP11_TYPE_TRAITS_NS::is_base_of<object_base_ptr, T>::value, T, dummyy>::type::object_type oos::object_vector< S, T, WITH_JOIN_TABLE >::value_type

Shortcut for the value type.


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