OWBI1::Array< T > Class Template Reference

Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability. More...

#include <OWBI1_Array.hpp>

Collaboration diagram for OWBI1::Array< T >:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 Array ()
 ~Array ()
 Array (V *toWrap)
 Array (size_type n, const T &value)
 Array (int n, const T &value)
 Array (long n, const T &value)
 Array (size_type n)
template<class InputIterator>
 Array (InputIterator first, InputIterator last)
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
size_type size () const
size_type max_size () const
size_type capacity () const
bool empty () const
reference operator[] (size_type n)
const_reference operator[] (size_type n) const
Array< T > & operator+= (const T &x)
void reserve (size_type n)
reference front ()
const_reference front () const
reference back ()
const_reference back () const
void push_back (const T &x)
void append (const T &x)
void swap (Array< T > &x)
iterator insert (iterator position, const T &x)
void insert (size_type position, const T &x)
void remove (size_type index)
void remove (size_type begin, size_type end)
template<class InputIterator>
void insert (iterator position, InputIterator first, InputIterator last)
void appendArray (const Array< T > &x)
void pop_back ()
iterator erase (iterator position)
iterator erase (iterator first, iterator last)
void resize (size_type new_size, const T &x)
void resize (size_type new_size)
void clear ()

Private Types

typedef std::vector< T, std::allocator<
T > > 
V

Private Attributes

COWReference< Vm_impl

Friends

bool operator== (const Array< T > &x, const Array< T > &y)
bool operator< (const Array< T > &x, const Array< T > &y)

Detailed Description

template<class T>
class OWBI1::Array< T >

Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.

It also adds valid range checks to operator[] if OWBI1_CHECK_ARRAY_INDEXING is defined.

Invariants: See std::vector<> Thread safety: read Copy semantics: Copy On Write Exception safety: same as std::vector<T>

Definition at line 60 of file OWBI1_Array.hpp.


Member Typedef Documentation

template<class T>
typedef V::const_iterator OWBI1::Array< T >::const_iterator
 

Definition at line 80 of file OWBI1_Array.hpp.

template<class T>
typedef V::const_pointer OWBI1::Array< T >::const_pointer
 

Definition at line 78 of file OWBI1_Array.hpp.

template<class T>
typedef V::const_reference OWBI1::Array< T >::const_reference
 

Definition at line 82 of file OWBI1_Array.hpp.

template<class T>
typedef V::const_reverse_iterator OWBI1::Array< T >::const_reverse_iterator
 

Definition at line 86 of file OWBI1_Array.hpp.

template<class T>
typedef V::difference_type OWBI1::Array< T >::difference_type
 

Definition at line 84 of file OWBI1_Array.hpp.

template<class T>
typedef V::iterator OWBI1::Array< T >::iterator
 

Definition at line 79 of file OWBI1_Array.hpp.

template<class T>
typedef V::pointer OWBI1::Array< T >::pointer
 

Definition at line 77 of file OWBI1_Array.hpp.

template<class T>
typedef V::reference OWBI1::Array< T >::reference
 

Definition at line 81 of file OWBI1_Array.hpp.

template<class T>
typedef V::reverse_iterator OWBI1::Array< T >::reverse_iterator
 

Definition at line 85 of file OWBI1_Array.hpp.

template<class T>
typedef V::size_type OWBI1::Array< T >::size_type
 

Definition at line 83 of file OWBI1_Array.hpp.

template<class T>
typedef std::vector<T, std::allocator<T> > OWBI1::Array< T >::V [private]
 

Definition at line 62 of file OWBI1_Array.hpp.

template<class T>
typedef V::value_type OWBI1::Array< T >::value_type
 

Definition at line 76 of file OWBI1_Array.hpp.


Constructor & Destructor Documentation

template<typename T>
OWBI1::Array< T >::Array  )  [inline]
 

Definition at line 46 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::~Array  )  [inline]
 

Definition at line 52 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::Array V toWrap  )  [inline, explicit]
 

Definition at line 57 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::Array size_type  n,
const T &  value
[inline]
 

Definition at line 63 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::Array int  n,
const T &  value
[inline]
 

Definition at line 69 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::Array long  n,
const T &  value
[inline]
 

Definition at line 75 of file OWBI1_ArrayImpl.hpp.

template<typename T>
OWBI1::Array< T >::Array size_type  n  )  [inline, explicit]
 

Definition at line 81 of file OWBI1_ArrayImpl.hpp.

template<typename T>
template<class InputIterator>
OWBI1::Array< T >::Array InputIterator  first,
InputIterator  last
[inline]
 

Definition at line 88 of file OWBI1_ArrayImpl.hpp.


Member Function Documentation

template<typename T>
void OWBI1::Array< T >::append const T &  x  )  [inline]
 

Definition at line 249 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::push_back().

Referenced by OWBI1::WQLCompile::_buildEvalHeap(), OWBI1::WQLCompile::_factoring(), OWBI1::WQLCompile::_gather(), OWBI1::CIMInstance::clone(), OWBI1::CIMClass::getKeys(), OWBI1::CIMClass::getMethods(), OWBI1::CIMClass::getProperties(), and OWBI1::String::tokenize().

template<typename T>
void OWBI1::Array< T >::appendArray const Array< T > &  x  )  [inline]
 

Definition at line 306 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::begin(), OWBI1::Array< T >::end(), and OWBI1::Array< T >::insert().

template<typename T>
Array< T >::const_reference OWBI1::Array< T >::back  )  const [inline]
 

Definition at line 235 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::reference OWBI1::Array< T >::back  )  [inline]
 

Definition at line 228 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::const_iterator OWBI1::Array< T >::begin  )  const [inline]
 

Definition at line 102 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::iterator OWBI1::Array< T >::begin  )  [inline]
 

Definition at line 95 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::Array< T >::appendArray(), OWBI1::CIMInstance::createModifiedInstance(), OWBI1::getParamValue(), and OWBI1::CIMClass::toMOF().

template<typename T>
Array< T >::size_type OWBI1::Array< T >::capacity  )  const [inline]
 

Definition at line 165 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::clear  )  [inline]
 

Definition at line 348 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLSelectStatement::clear().

template<typename T>
bool OWBI1::Array< T >::empty  )  const [inline]
 

Definition at line 172 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLCompile::_gather().

template<typename T>
Array< T >::const_iterator OWBI1::Array< T >::end  )  const [inline]
 

Definition at line 116 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::iterator OWBI1::Array< T >::end  )  [inline]
 

Definition at line 109 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::Array< T >::appendArray(), OWBI1::CIMInstance::createModifiedInstance(), OWBI1::getParamValue(), and OWBI1::CIMClass::toMOF().

template<typename T>
Array< T >::iterator OWBI1::Array< T >::erase iterator  first,
iterator  last
[inline]
 

Definition at line 327 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::iterator OWBI1::Array< T >::erase iterator  position  )  [inline]
 

Definition at line 320 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::CIMClass::toMOF().

template<typename T>
Array< T >::const_reference OWBI1::Array< T >::front  )  const [inline]
 

Definition at line 221 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::reference OWBI1::Array< T >::front  )  [inline]
 

Definition at line 214 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
template<class InputIterator>
void OWBI1::Array< T >::insert iterator  position,
InputIterator  first,
InputIterator  last
[inline]
 

Definition at line 299 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::insert size_type  position,
const T &  x
[inline]
 

Definition at line 270 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::iterator OWBI1::Array< T >::insert iterator  position,
const T &  x
[inline]
 

Definition at line 263 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLCompile::_factoring(), OWBI1::WQLCompile::_gather(), OWBI1::Array< T >::appendArray(), and OWBI1::CIMClass::toMOF().

template<typename T>
Array< T >::size_type OWBI1::Array< T >::max_size  )  const [inline]
 

Definition at line 158 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T > & OWBI1::Array< T >::operator+= const T &  x  )  [inline]
 

Definition at line 199 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::const_reference OWBI1::Array< T >::operator[] size_type  n  )  const [inline]
 

Definition at line 189 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::reference OWBI1::Array< T >::operator[] size_type  n  )  [inline]
 

Definition at line 179 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::pop_back  )  [inline]
 

Definition at line 313 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::push_back const T &  x  )  [inline]
 

Definition at line 242 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLCompile::_buildEvalHeap(), OWBI1::ProviderInfoBase< ClassInfoT >::addInstrumentedClass(), OWBI1::MethodProviderInfo::addInstrumentedClass(), OWBI1::Array< T >::append(), OWBI1::CIMQualifierTypeArrayBuilder::doHandle(), OWBI1::CIMInstanceArrayBuilder::doHandle(), OWBI1::CIMObjectPathArrayBuilder::doHandle(), OWBI1::CIMNameArrayBuilder::doHandle(), OWBI1::CIMClassArrayBuilder::doHandle(), OWBI1::CIMMethod::getINParameters(), and OWBI1::CIMMethod::getOUTParameters().

template<typename T>
Array< T >::const_reverse_iterator OWBI1::Array< T >::rbegin  )  const [inline]
 

Definition at line 130 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::reverse_iterator OWBI1::Array< T >::rbegin  )  [inline]
 

Definition at line 123 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::remove size_type  begin,
size_type  end
[inline]
 

Definition at line 287 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::remove size_type  index  )  [inline]
 

Definition at line 277 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLCompile::_gather(), OWBI1::CIMObjectPath::syncWithClass(), and OWBI1::CIMInstance::syncWithClass().

template<typename T>
Array< T >::const_reverse_iterator OWBI1::Array< T >::rend  )  const [inline]
 

Definition at line 144 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::reverse_iterator OWBI1::Array< T >::rend  )  [inline]
 

Definition at line 137 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::reserve size_type  n  )  [inline]
 

Definition at line 207 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLSelectStatement::WQLSelectStatement().

template<typename T>
void OWBI1::Array< T >::resize size_type  new_size  )  [inline]
 

Definition at line 341 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
void OWBI1::Array< T >::resize size_type  new_size,
const T &  x
[inline]
 

Definition at line 334 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

template<typename T>
Array< T >::size_type OWBI1::Array< T >::size  )  const [inline]
 

Definition at line 151 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl.

Referenced by OWBI1::WQLCompile::_buildEvalHeap(), OWBI1::WQLCompile::_factoring(), OWBI1::WQLCompile::_gather(), OWBI1::WQLCompile::_pushNOTDown(), OWBI1::WQLCompile::_sortTableau(), OWBI1::WQLSelectStatement::appendWherePropertyName(), OWBI1::WQLCompile::evaluate(), OWBI1::WQLSelectStatement::evaluateWhereClause(), OWBI1::WQLSelectStatement::print(), OWBI1::WQLCompile::print(), OWBI1::WQLCompile::printTableau(), OWBI1::CIMInstance::propertiesAreEqualTo(), OWBI1::CIMObjectPath::syncWithClass(), OWBI1::CIMInstance::syncWithClass(), OWBI1::WQLSelectStatement::toString(), and OWBI1::CIMInstance::updatePropertyValues().

template<typename T>
void OWBI1::Array< T >::swap Array< T > &  x  )  [inline]
 

Definition at line 256 of file OWBI1_ArrayImpl.hpp.

References OWBI1::Array< T >::m_impl, and OWBI1::COWReference< T >::swap().

Referenced by OWBI1::swap().


Friends And Related Function Documentation

template<class T>
bool operator< const Array< T > &  x,
const Array< T > &  y
[friend]
 

template<class T>
bool operator== const Array< T > &  x,
const Array< T > &  y
[friend]
 


Member Data Documentation

template<class T>
COWReference<V> OWBI1::Array< T >::m_impl [private]
 

Definition at line 69 of file OWBI1_Array.hpp.

Referenced by OWBI1::Array< T >::back(), OWBI1::Array< T >::begin(), OWBI1::Array< T >::capacity(), OWBI1::Array< T >::clear(), OWBI1::Array< T >::empty(), OWBI1::Array< T >::end(), OWBI1::Array< T >::erase(), OWBI1::Array< T >::front(), OWBI1::Array< T >::insert(), OWBI1::Array< T >::max_size(), OWBI1::Array< T >::operator+=(), OWBI1::operator==(), OWBI1::Array< T >::operator[](), OWBI1::Array< T >::pop_back(), OWBI1::Array< T >::push_back(), OWBI1::Array< T >::rbegin(), OWBI1::Array< T >::remove(), OWBI1::Array< T >::rend(), OWBI1::Array< T >::reserve(), OWBI1::Array< T >::resize(), OWBI1::Array< T >::size(), and OWBI1::Array< T >::swap().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:23 2006 for openwbem by  doxygen 1.4.6