Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

template<typename T>
typedef T const* ObjexxFCL::Chunk< T >::const_pointer
template<typename T>
typedef T const& ObjexxFCL::Chunk< T >::const_reference
template<typename T>
typedef T const* ObjexxFCL::Chunk< T >::ConstPointer
template<typename T>
typedef T const& ObjexxFCL::Chunk< T >::ConstReference
template<typename T>
typedef T* ObjexxFCL::Chunk< T >::pointer
template<typename T>
typedef T* ObjexxFCL::Chunk< T >::Pointer
template<typename T>
typedef T& ObjexxFCL::Chunk< T >::reference
template<typename T>
typedef T& ObjexxFCL::Chunk< T >::Reference
template<typename T>
typedef std::size_t ObjexxFCL::Chunk< T >::Size
template<typename T>
typedef std::size_t ObjexxFCL::Chunk< T >::size_type
template<typename T>
typedef T ObjexxFCL::Chunk< T >::Value
template<typename T>
typedef T ObjexxFCL::Chunk< T >::value_type

Constructor & Destructor Documentation

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

Default Constructor.

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

Copy Constructor.

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

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

Size Constructor: Built-In Types are Not Initialized!

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_, ObjexxFCL::Chunk< T >::size_, and value.

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

Destructor.

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

Member Function Documentation

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

Capacity.

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

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

Empty?

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

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

Maximum Size.

References max().

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

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_.

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

Resize + Fill Value: Values Not Preserved.

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

template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator*= ( T const &  value)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator+= ( Chunk< T > const &  c)
inline
template<typename T>
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator+= ( Chunk< U > const &  c)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator+= ( T const &  value)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator-= ( Chunk< T > const &  c)
inline
template<typename T>
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator-= ( Chunk< U > const &  c)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator-= ( T const &  value)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator/= ( T const &  value)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator= ( Chunk< T > const &  c)
inline
template<typename T>
template<typename U >
Chunk& ObjexxFCL::Chunk< T >::operator= ( Chunk< U > const &  c)
inline
template<typename T>
Chunk& ObjexxFCL::Chunk< T >::operator= ( T const &  value)
inline
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_, and ObjexxFCL::Chunk< T >::size_.

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

Chunk[ i ]: 0-Based Indexing.

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

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

Remove the Last Element.

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

template<typename T>
Chunk& ObjexxFCL::Chunk< T >::push_back ( T const &  value)
inline
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_, and ObjexxFCL::Chunk< T >::size_.

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

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

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

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

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

Size.

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

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

Friends And Related Function Documentation

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

Chunk != Chunk.

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

Chunk == Chunk.

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

Swap.

Member Data Documentation

template<typename T>
T* ObjexxFCL::Chunk< T >::array_
private
template<typename T>
size_type ObjexxFCL::Chunk< T >::capacity_
private
template<typename T>
size_type ObjexxFCL::Chunk< T >::size_
private

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