OpenSceneGraph 3.6.5
osg::MixinVector< ValueT > Class Template Reference

MixinVector is a base class that allows inheritance to be used to easily emulate derivation from std::vector but without introducing undefined behaviour through violation of virtual destructor rules. More...

#include <MixinVector>

Inherited by osg::TemplateArray< GLfloat, Array::FloatArrayType, 1, GL_FLOAT >, osg::TemplateArray< GLdouble, Array::DoubleArrayType, 1, GL_DOUBLE >, osg::TemplateArray< Vec2b, Array::Vec2bArrayType, 2, GL_BYTE >, osg::TemplateArray< Vec3b, Array::Vec3bArrayType, 3, GL_BYTE >, osg::TemplateArray< Vec4b, Array::Vec4bArrayType, 4, GL_BYTE >, osg::TemplateArray< Vec2s, Array::Vec2sArrayType, 2, GL_SHORT >, osg::TemplateArray< Vec3s, Array::Vec3sArrayType, 3, GL_SHORT >, osg::TemplateArray< Vec4s, Array::Vec4sArrayType, 4, GL_SHORT >, osg::TemplateArray< Vec2i, Array::Vec2iArrayType, 2, GL_INT >, osg::TemplateArray< Vec3i, Array::Vec3iArrayType, 3, GL_INT >, osg::TemplateArray< Vec4i, Array::Vec4iArrayType, 4, GL_INT >, osg::TemplateArray< Vec2ub, Array::Vec2ubArrayType, 2, GL_UNSIGNED_BYTE >, osg::TemplateArray< Vec3ub, Array::Vec3ubArrayType, 3, GL_UNSIGNED_BYTE >, osg::TemplateArray< Vec4ub, Array::Vec4ubArrayType, 4, GL_UNSIGNED_BYTE >, osg::TemplateArray< Vec2us, Array::Vec2usArrayType, 2, GL_UNSIGNED_SHORT >, osg::TemplateArray< Vec3us, Array::Vec3usArrayType, 3, GL_UNSIGNED_SHORT >, osg::TemplateArray< Vec4us, Array::Vec4usArrayType, 4, GL_UNSIGNED_SHORT >, osg::TemplateArray< Vec2ui, Array::Vec2uiArrayType, 2, GL_UNSIGNED_INT >, osg::TemplateArray< Vec3ui, Array::Vec3uiArrayType, 3, GL_UNSIGNED_INT >, osg::TemplateArray< Vec4ui, Array::Vec4uiArrayType, 4, GL_UNSIGNED_INT >, osg::TemplateArray< Vec2, Array::Vec2ArrayType, 2, GL_FLOAT >, osg::TemplateArray< Vec3, Array::Vec3ArrayType, 3, GL_FLOAT >, osg::TemplateArray< Vec4, Array::Vec4ArrayType, 4, GL_FLOAT >, osg::TemplateArray< Vec2d, Array::Vec2dArrayType, 2, GL_DOUBLE >, osg::TemplateArray< Vec3d, Array::Vec3dArrayType, 3, GL_DOUBLE >, osg::TemplateArray< Vec4d, Array::Vec4dArrayType, 4, GL_DOUBLE >, osg::TemplateArray< Matrixf, Array::MatrixArrayType, 16, GL_FLOAT >, osg::TemplateArray< Matrixd, Array::MatrixdArrayType, 16, GL_DOUBLE >, osg::TemplateArray< Quat, Array::QuatArrayType, 4, GL_DOUBLE >, osg::TemplateIndexArray< GLbyte, Array::ByteArrayType, 1, GL_BYTE >, osg::TemplateIndexArray< GLshort, Array::ShortArrayType, 1, GL_SHORT >, osg::TemplateIndexArray< GLint, Array::IntArrayType, 1, GL_INT >, osg::TemplateIndexArray< GLuint64, Array::UInt64ArrayType, 1, GL_UNSIGNED_INT64_ARB >, osg::TemplateIndexArray< GLint64, Array::Int64ArrayType, 1, GL_INT64_ARB >, osgAnimation::TemplateKeyframeContainer< typename SamplerType::KeyframeType >, osgAnimation::TemplateKeyframeContainer< float >, osgAnimation::TemplateKeyframeContainer< double >, osgAnimation::TemplateKeyframeContainer< osg::Vec2 >, osgAnimation::TemplateKeyframeContainer< osg::Vec3 >, osgAnimation::TemplateKeyframeContainer< osg::Vec3us >, osgAnimation::TemplateKeyframeContainer< osg::Vec4 >, osgAnimation::TemplateKeyframeContainer< osg::Quat >, osgAnimation::TemplateKeyframeContainer< osg::Matrixf >, osgAnimation::TemplateKeyframeContainer< FloatCubicBezier >, osgAnimation::TemplateKeyframeContainer< DoubleCubicBezier >, osgAnimation::TemplateKeyframeContainer< Vec2CubicBezier >, osgAnimation::TemplateKeyframeContainer< Vec3CubicBezier >, osgAnimation::TemplateKeyframeContainer< Vec4CubicBezier >, and osgAnimation::TemplateKeyframeContainer< KeyframeType >.

Public Types

typedef vector_type::allocator_type allocator_type
typedef vector_type::value_type value_type
typedef vector_type::const_pointer const_pointer
typedef vector_type::pointer pointer
typedef vector_type::const_reference const_reference
typedef vector_type::reference reference
typedef vector_type::const_iterator const_iterator
typedef vector_type::iterator iterator
typedef vector_type::const_reverse_iterator const_reverse_iterator
typedef vector_type::reverse_iterator reverse_iterator
typedef vector_type::size_type size_type
typedef vector_type::difference_type difference_type

Public Member Functions

 MixinVector ()
 MixinVector (size_type initial_size, const value_type &fill_value=value_type())
template<class InputIterator>
 MixinVector (InputIterator first, InputIterator last)
 MixinVector (const vector_type &other)
 MixinVector (const MixinVector &other)
MixinVectoroperator= (const vector_type &other)
MixinVectoroperator= (const MixinVector &other)
virtual ~MixinVector ()
void clear ()
void resize (size_type new_size, const value_type &fill_value=value_type())
void reserve (size_type new_capacity)
void swap (vector_type &other)
void swap (MixinVector &other)
bool empty () const
size_type size () const
size_type capacity () const
size_type max_size () const
allocator_type get_allocator () const
const_iterator begin () const
iterator begin ()
const_iterator end () const
iterator end ()
const_reverse_iterator rbegin () const
reverse_iterator rbegin ()
const_reverse_iterator rend () const
reverse_iterator rend ()
const_reference operator[] (size_type index) const
reference operator[] (size_type index)
const_reference at (size_type index) const
reference at (size_type index)
void assign (size_type count, const value_type &value)
template<class Iter>
void assign (Iter first, Iter last)
void push_back (const value_type &value)
void pop_back ()
iterator erase (iterator where)
iterator erase (iterator first, iterator last)
iterator insert (iterator where, const value_type &value)
template<class InputIterator>
void insert (iterator where, InputIterator first, InputIterator last)
void insert (iterator where, size_type count, const value_type &value)
const_reference back () const
reference back ()
const_reference front () const
reference front ()
vector_type & asVector ()
const vector_type & asVector () const

Friends

bool operator== (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator== (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator== (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator!= (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator!= (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator!= (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator< (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator< (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator< (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator> (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator> (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator> (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator<= (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator<= (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator<= (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator>= (const MixinVector< ValueT > &left, const MixinVector< ValueT > &right)
bool operator>= (const MixinVector< ValueT > &left, const std::vector< ValueT > &right)
bool operator>= (const std::vector< ValueT > &left, const MixinVector< ValueT > &right)

Detailed Description

template<class ValueT>
class osg::MixinVector< ValueT >

MixinVector is a base class that allows inheritance to be used to easily emulate derivation from std::vector but without introducing undefined behaviour through violation of virtual destructor rules.

Author
Neil Groves

Member Typedef Documentation

◆ allocator_type

template<class ValueT>
typedef vector_type::allocator_type osg::MixinVector< ValueT >::allocator_type

◆ const_iterator

template<class ValueT>
typedef vector_type::const_iterator osg::MixinVector< ValueT >::const_iterator

◆ const_pointer

template<class ValueT>
typedef vector_type::const_pointer osg::MixinVector< ValueT >::const_pointer

◆ const_reference

template<class ValueT>
typedef vector_type::const_reference osg::MixinVector< ValueT >::const_reference

◆ const_reverse_iterator

template<class ValueT>
typedef vector_type::const_reverse_iterator osg::MixinVector< ValueT >::const_reverse_iterator

◆ difference_type

template<class ValueT>
typedef vector_type::difference_type osg::MixinVector< ValueT >::difference_type

◆ iterator

template<class ValueT>
typedef vector_type::iterator osg::MixinVector< ValueT >::iterator

◆ pointer

template<class ValueT>
typedef vector_type::pointer osg::MixinVector< ValueT >::pointer

◆ reference

template<class ValueT>
typedef vector_type::reference osg::MixinVector< ValueT >::reference

◆ reverse_iterator

template<class ValueT>
typedef vector_type::reverse_iterator osg::MixinVector< ValueT >::reverse_iterator

◆ size_type

template<class ValueT>
typedef vector_type::size_type osg::MixinVector< ValueT >::size_type

◆ value_type

template<class ValueT>
typedef vector_type::value_type osg::MixinVector< ValueT >::value_type

Constructor & Destructor Documentation

◆ MixinVector() [1/5]

◆ MixinVector() [2/5]

template<class ValueT>
osg::MixinVector< ValueT >::MixinVector ( size_type initial_size,
const value_type & fill_value = value_type() )
inlineexplicit

◆ MixinVector() [3/5]

template<class ValueT>
template<class InputIterator>
osg::MixinVector< ValueT >::MixinVector ( InputIterator first,
InputIterator last )
inline

◆ MixinVector() [4/5]

template<class ValueT>
osg::MixinVector< ValueT >::MixinVector ( const vector_type & other)
inline

◆ MixinVector() [5/5]

template<class ValueT>
osg::MixinVector< ValueT >::MixinVector ( const MixinVector< ValueT > & other)
inline

◆ ~MixinVector()

template<class ValueT>
virtual osg::MixinVector< ValueT >::~MixinVector ( )
inlinevirtual

Member Function Documentation

◆ assign() [1/2]

template<class ValueT>
template<class Iter>
void osg::MixinVector< ValueT >::assign ( Iter first,
Iter last )
inline

◆ assign() [2/2]

template<class ValueT>
void osg::MixinVector< ValueT >::assign ( size_type count,
const value_type & value )
inline

◆ asVector() [1/2]

template<class ValueT>
vector_type & osg::MixinVector< ValueT >::asVector ( )
inline

Referenced by osg::swap(), osg::swap(), and osg::swap().

◆ asVector() [2/2]

template<class ValueT>
const vector_type & osg::MixinVector< ValueT >::asVector ( ) const
inline

◆ at() [1/2]

template<class ValueT>
reference osg::MixinVector< ValueT >::at ( size_type index)
inline

◆ at() [2/2]

template<class ValueT>
const_reference osg::MixinVector< ValueT >::at ( size_type index) const
inline

◆ back() [1/2]

template<class ValueT>
reference osg::MixinVector< ValueT >::back ( )
inline

◆ back() [2/2]

◆ begin() [1/2]

template<class ValueT>
iterator osg::MixinVector< ValueT >::begin ( )
inline

◆ begin() [2/2]

◆ capacity()

template<class ValueT>
size_type osg::MixinVector< ValueT >::capacity ( ) const
inline

◆ clear()

template<class ValueT>
void osg::MixinVector< ValueT >::clear ( )
inline

◆ empty()

◆ end() [1/2]

template<class ValueT>
iterator osg::MixinVector< ValueT >::end ( )
inline

◆ end() [2/2]

◆ erase() [1/2]

template<class ValueT>
iterator osg::MixinVector< ValueT >::erase ( iterator first,
iterator last )
inline

◆ erase() [2/2]

template<class ValueT>
iterator osg::MixinVector< ValueT >::erase ( iterator where)
inline

◆ front() [1/2]

template<class ValueT>
reference osg::MixinVector< ValueT >::front ( )
inline

◆ front() [2/2]

template<class ValueT>
const_reference osg::MixinVector< ValueT >::front ( ) const
inline

Referenced by osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osgAnimation::TemplateInterpolatorBase< TYPE, KEY >::getKeyIndexFromTime(), osgAnimation::TemplateCubicBezierInterpolator< float, FloatCubicBezier >::getValue(), osgAnimation::TemplateLinearInterpolator< double, double >::getValue(), osgAnimation::TemplateLinearPackedInterpolator< TYPE, KEY >::getValue(), osgAnimation::TemplateSphericalLinearInterpolator< osg::Quat, osg::Quat >::getValue(), and osgAnimation::TemplateStepInterpolator< double, double >::getValue().

◆ get_allocator()

template<class ValueT>
allocator_type osg::MixinVector< ValueT >::get_allocator ( ) const
inline

◆ insert() [1/3]

template<class ValueT>
iterator osg::MixinVector< ValueT >::insert ( iterator where,
const value_type & value )
inline

◆ insert() [2/3]

template<class ValueT>
template<class InputIterator>
void osg::MixinVector< ValueT >::insert ( iterator where,
InputIterator first,
InputIterator last )
inline

◆ insert() [3/3]

template<class ValueT>
void osg::MixinVector< ValueT >::insert ( iterator where,
size_type count,
const value_type & value )
inline

◆ max_size()

template<class ValueT>
size_type osg::MixinVector< ValueT >::max_size ( ) const
inline

◆ operator=() [1/2]

template<class ValueT>
MixinVector & osg::MixinVector< ValueT >::operator= ( const MixinVector< ValueT > & other)
inline

◆ operator=() [2/2]

template<class ValueT>
MixinVector & osg::MixinVector< ValueT >::operator= ( const vector_type & other)
inline

◆ operator[]() [1/2]

template<class ValueT>
reference osg::MixinVector< ValueT >::operator[] ( size_type index)
inline

◆ operator[]() [2/2]

template<class ValueT>
const_reference osg::MixinVector< ValueT >::operator[] ( size_type index) const
inline

◆ pop_back()

template<class ValueT>
void osg::MixinVector< ValueT >::pop_back ( )
inline

◆ push_back()

template<class ValueT>
void osg::MixinVector< ValueT >::push_back ( const value_type & value)
inline

◆ rbegin() [1/2]

template<class ValueT>
reverse_iterator osg::MixinVector< ValueT >::rbegin ( )
inline

◆ rbegin() [2/2]

template<class ValueT>
const_reverse_iterator osg::MixinVector< ValueT >::rbegin ( ) const
inline

◆ rend() [1/2]

template<class ValueT>
reverse_iterator osg::MixinVector< ValueT >::rend ( )
inline

◆ rend() [2/2]

template<class ValueT>
const_reverse_iterator osg::MixinVector< ValueT >::rend ( ) const
inline

◆ reserve()

template<class ValueT>
void osg::MixinVector< ValueT >::reserve ( size_type new_capacity)
inline

◆ resize()

template<class ValueT>
void osg::MixinVector< ValueT >::resize ( size_type new_size,
const value_type & fill_value = value_type() )
inline

◆ size()

template<class ValueT>
size_type osg::MixinVector< ValueT >::size ( ) const
inline

Referenced by osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::AttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), osg::ConstAttributeFunctorArrayVisitor::apply(), and osgAnimation::TemplateKeyframeContainer< typename SamplerType::KeyframeType >::linearInterpolationDeduplicate().

◆ swap() [1/2]

template<class ValueT>
void osg::MixinVector< ValueT >::swap ( MixinVector< ValueT > & other)
inline

◆ swap() [2/2]

template<class ValueT>
void osg::MixinVector< ValueT >::swap ( vector_type & other)
inline

◆ operator!= [1/3]

template<class ValueT>
bool operator!= ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator!= [2/3]

template<class ValueT>
bool operator!= ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator!= [3/3]

template<class ValueT>
bool operator!= ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator< [1/3]

template<class ValueT>
bool operator< ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator< [2/3]

template<class ValueT>
bool operator< ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator< [3/3]

template<class ValueT>
bool operator< ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator<= [1/3]

template<class ValueT>
bool operator<= ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator<= [2/3]

template<class ValueT>
bool operator<= ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator<= [3/3]

template<class ValueT>
bool operator<= ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator== [1/3]

template<class ValueT>
bool operator== ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator== [2/3]

template<class ValueT>
bool operator== ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator== [3/3]

template<class ValueT>
bool operator== ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator> [1/3]

template<class ValueT>
bool operator> ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator> [2/3]

template<class ValueT>
bool operator> ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator> [3/3]

template<class ValueT>
bool operator> ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator>= [1/3]

template<class ValueT>
bool operator>= ( const MixinVector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

◆ operator>= [2/3]

template<class ValueT>
bool operator>= ( const MixinVector< ValueT > & left,
const std::vector< ValueT > & right )
friend

◆ operator>= [3/3]

template<class ValueT>
bool operator>= ( const std::vector< ValueT > & left,
const MixinVector< ValueT > & right )
friend

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

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.