Rosetta
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ObjexxFCL::Chunk< T > Class Template Reference

Chunk: Contiguous Array for Use in ChunkVector. More...

#include <Chunk.hh>

Public Types

typedef T value_type
 
typedef Treference
 
typedef T const & const_reference
 
typedef Tpointer
 
typedef T const * const_pointer
 
typedef std::size_t size_type
 
typedef T Value
 
typedef TReference
 
typedef T const & ConstReference
 
typedef TPointer
 
typedef T const * ConstPointer
 
typedef std::size_t Size
 

Public Member Functions

 Chunk ()
 Default Constructor. More...
 
 Chunk (Chunk const &c)
 Copy Constructor. More...
 
template<typename U >
 Chunk (Chunk< U > const &c)
 Copy Constructor Template. More...
 
 Chunk (size_type const size_a)
 Size Constructor: Built-In Types are Not Initialized! More...
 
 Chunk (size_type const size_a, T const &value)
 Size + Uniform Value Constructor. More...
 
 ~Chunk ()
 Destructor. More...
 
Chunkoperator= (Chunk const &c)
 Copy Assignment. More...
 
template<typename U >
Chunkoperator= (Chunk< U > const &c)
 Copy Assignment Template. More...
 
Chunkassign (size_type const size_a, T const &value)
 Size + Value Assignment. More...
 
Chunkoperator+= (Chunk const &c)
 += Chunk More...
 
Chunkoperator-= (Chunk const &c)
 -= Chunk More...
 
template<typename U >
Chunkoperator+= (Chunk< U > const &c)
 += Chunk Template More...
 
template<typename U >
Chunkoperator-= (Chunk< U > const &c)
 -= Chunk Template More...
 
Chunkoperator= (T const &value)
 = Value More...
 
Chunkoperator+= (T const &value)
 += Value More...
 
Chunkoperator-= (T const &value)
 -= Value More...
 
Chunkoperator*= (T const &value)
 *= Value More...
 
Chunkoperator/= (T const &value)
 /= Value More...
 
T const & operator[] (size_type const i) const
 Chunk[ i ] const: 0-Based Indexing. More...
 
Toperator[] (size_type const i)
 Chunk[ i ]: 0-Based Indexing. More...
 
size_type size () const
 Size. More...
 
size_type capacity () const
 Capacity. More...
 
size_type max_size () const
 Maximum Size. More...
 
bool empty () const
 Empty? More...
 
T const & front () const
 First Element. More...
 
T const & back () const
 Last Element. More...
 
Tfront ()
 First Element. More...
 
Tback ()
 Last Element. More...
 
Chunkpush_back (T const &value)
 Append an Element. More...
 
Chunkpop_back ()
 Remove the Last Element. More...
 
Chunkresize (size_type const size_a)
 Resize: Values Preserved: Added Built-In Values are Not Initialized! More...
 
Chunkresize (size_type const size_a, T const &value)
 Resize + Fill Value: Values Preserved. More...
 
Chunknon_preserving_resize (size_type const size_a)
 Resize: Values Not Preserved: Built-In Values are Not Initialized! More...
 
Chunknon_preserving_resize (size_type const size_a, T const &value)
 Resize + Fill Value: Values Not Preserved. More...
 
Chunkreserve (size_type const capacity_a)
 Reserve: Values Preserved: Added Built-In Values are Not Initialized! More...
 
Chunkshrink ()
 Shrink Capacity to Size. More...
 
void swap (Chunk &c)
 Swap. More...
 
Chunkclear ()
 Clear. More...
 

Private Attributes

size_type size_
 Number of elements in use. More...
 
size_type capacity_
 Number of elements it can hold without resizing. More...
 
Tarray_
 Data array. More...
 

Friends

template<typename >
class Chunk
 
bool operator== (Chunk const &a, Chunk const &b)
 Chunk == Chunk. More...
 
bool operator!= (Chunk const &a, Chunk const &b)
 Chunk != Chunk. More...
 
void swap (Chunk &a, Chunk &b)
 Swap. More...
 

Detailed Description

template<typename T>
class ObjexxFCL::Chunk< T >

Chunk: Contiguous Array for Use in ChunkVector.

Remarks
  • size <= capacity
  • capacity == size after construction
  • capacity == size after assignment if reallocation required

Member Typedef Documentation

◆ const_pointer

template<typename T >
typedef T const* ObjexxFCL::Chunk< T >::const_pointer

◆ const_reference

template<typename T >
typedef T const& ObjexxFCL::Chunk< T >::const_reference

◆ ConstPointer

template<typename T >
typedef T const* ObjexxFCL::Chunk< T >::ConstPointer

◆ ConstReference

template<typename T >
typedef T const& ObjexxFCL::Chunk< T >::ConstReference

◆ pointer

template<typename T >
typedef T* ObjexxFCL::Chunk< T >::pointer

◆ Pointer

template<typename T >
typedef T* ObjexxFCL::Chunk< T >::Pointer

◆ reference

template<typename T >
typedef T& ObjexxFCL::Chunk< T >::reference

◆ Reference

template<typename T >
typedef T& ObjexxFCL::Chunk< T >::Reference

◆ Size

template<typename T >
typedef std::size_t ObjexxFCL::Chunk< T >::Size

◆ size_type

template<typename T >
typedef std::size_t ObjexxFCL::Chunk< T >::size_type

◆ Value

template<typename T >
typedef T ObjexxFCL::Chunk< T >::Value

◆ value_type

template<typename T >
typedef T ObjexxFCL::Chunk< T >::value_type

Constructor & Destructor Documentation

◆ Chunk() [1/5]

template<typename T >
ObjexxFCL::Chunk< T >::Chunk ( )
inline

Default Constructor.

◆ Chunk() [2/5]

template<typename T >
ObjexxFCL::Chunk< T >::Chunk ( Chunk< T > const &  c)
inline

◆ Chunk() [3/5]

template<typename T >
template<typename U >
ObjexxFCL::Chunk< T >::Chunk ( Chunk< U > const &  c)
inlineexplicit

◆ Chunk() [4/5]

template<typename T >
ObjexxFCL::Chunk< T >::Chunk ( size_type const  size_a)
inlineexplicit

Size Constructor: Built-In Types are Not Initialized!

◆ Chunk() [5/5]

template<typename T >
ObjexxFCL::Chunk< T >::Chunk ( size_type const  size_a,
T const &  value 
)
inline

Size + Uniform Value Constructor.

References ObjexxFCL::Chunk< T >::array_, create_a3b_hbs::i, ObjexxFCL::Chunk< T >::size_, and value.

◆ ~Chunk()

template<typename T >
ObjexxFCL::Chunk< T >::~Chunk ( )
inline

Destructor.

References ObjexxFCL::Chunk< T >::array_.

Member Function Documentation

◆ assign()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::assign ( size_type const  size_a,
T const &  value 
)
inline

◆ back() [1/2]

template<typename T >
T& ObjexxFCL::Chunk< T >::back ( )
inline

◆ back() [2/2]

template<typename T >
T const& ObjexxFCL::Chunk< T >::back ( ) const
inline

◆ capacity()

template<typename T >
size_type ObjexxFCL::Chunk< T >::capacity ( ) const
inline

Capacity.

References ObjexxFCL::Chunk< T >::capacity_.

◆ clear()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::clear ( )
inline

◆ empty()

template<typename T >
bool ObjexxFCL::Chunk< T >::empty ( ) const
inline

Empty?

References ObjexxFCL::Chunk< T >::size_.

◆ front() [1/2]

template<typename T >
T& ObjexxFCL::Chunk< T >::front ( )
inline

◆ front() [2/2]

template<typename T >
T const& ObjexxFCL::Chunk< T >::front ( ) const
inline

◆ max_size()

template<typename T >
size_type ObjexxFCL::Chunk< T >::max_size ( ) const
inline

Maximum Size.

References max().

Referenced by ObjexxFCL::Chunk< T >::push_back().

◆ non_preserving_resize() [1/2]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::non_preserving_resize ( size_type const  size_a)
inline

Resize: Values Not Preserved: Built-In Values are Not Initialized!

References ObjexxFCL::Chunk< T >::array_, ObjexxFCL::Chunk< T >::capacity_, and ObjexxFCL::Chunk< T >::size_.

◆ non_preserving_resize() [2/2]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::non_preserving_resize ( size_type const  size_a,
T const &  value 
)
inline

◆ operator*=()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator*= ( T const &  value)
inline

◆ operator+=() [1/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator+= ( Chunk< T > const &  c)
inline

◆ operator+=() [2/3]

template<typename T >
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator+= ( Chunk< U > const &  c)
inline

◆ operator+=() [3/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator+= ( T const &  value)
inline

◆ operator-=() [1/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator-= ( Chunk< T > const &  c)
inline

◆ operator-=() [2/3]

template<typename T >
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator-= ( Chunk< U > const &  c)
inline

◆ operator-=() [3/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator-= ( T const &  value)
inline

◆ operator/=()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator/= ( T const &  value)
inline

◆ operator=() [1/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator= ( Chunk< T > const &  c)
inline

◆ operator=() [2/3]

template<typename T >
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator= ( Chunk< U > const &  c)
inline

◆ operator=() [3/3]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::operator= ( T const &  value)
inline

◆ operator[]() [1/2]

template<typename T >
T& ObjexxFCL::Chunk< T >::operator[] ( size_type const  i)
inline

◆ operator[]() [2/2]

template<typename T >
T const& ObjexxFCL::Chunk< T >::operator[] ( size_type const  i) const
inline

Chunk[ i ] const: 0-Based Indexing.

References ObjexxFCL::Chunk< T >::array_, create_a3b_hbs::i, and ObjexxFCL::Chunk< T >::size_.

◆ pop_back()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::pop_back ( )
inline

Remove the Last Element.

References ObjexxFCL::Chunk< T >::size_.

◆ push_back()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::push_back ( T const &  value)
inline

◆ reserve()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::reserve ( size_type const  capacity_a)
inline

Reserve: Values Preserved: Added Built-In Values are Not Initialized!

References ObjexxFCL::Chunk< T >::array_, ObjexxFCL::Chunk< T >::capacity_, create_a3b_hbs::i, and ObjexxFCL::Chunk< T >::size_.

Referenced by ObjexxFCL::Chunk< T >::push_back().

◆ resize() [1/2]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::resize ( size_type const  size_a)
inline

◆ resize() [2/2]

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::resize ( size_type const  size_a,
T const &  value 
)
inline

◆ shrink()

template<typename T >
Chunk& ObjexxFCL::Chunk< T >::shrink ( )
inline

◆ size()

template<typename T >
size_type ObjexxFCL::Chunk< T >::size ( ) const
inline

Size.

References ObjexxFCL::Chunk< T >::size_.

◆ swap()

template<typename T >
void ObjexxFCL::Chunk< T >::swap ( Chunk< T > &  c)
inline

Friends And Related Function Documentation

◆ Chunk

template<typename T >
template<typename >
friend class Chunk
friend

◆ operator!=

template<typename T >
bool operator!= ( Chunk< T > const &  a,
Chunk< T > const &  b 
)
friend

Chunk != Chunk.

◆ operator==

template<typename T >
bool operator== ( Chunk< T > const &  a,
Chunk< T > const &  b 
)
friend

Chunk == Chunk.

◆ swap

template<typename T >
void swap ( Chunk< T > &  a,
Chunk< T > &  b 
)
friend

Swap.

Member Data Documentation

◆ array_

template<typename T >
T* ObjexxFCL::Chunk< T >::array_
private

◆ capacity_

template<typename T >
size_type ObjexxFCL::Chunk< T >::capacity_
private

◆ size_

template<typename T >
size_type ObjexxFCL::Chunk< T >::size_
private

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