AGXDynamics  2.31.1.0
agxIO::FileStateVector Class Reference

vector for holding a set of file states, where the vector can be asked if any of the files has been changed. More...

#include <FileState.h>

+ Inheritance diagram for agxIO::FileStateVector:

Public Types

enum  ClearPolicy { SHRINK_BUFFER, SHRINK_BUFFER_AVERAGED, MAINTAIN_BUFFER }
 agxData::Values from this enumeration is passed to the subclasses' 'clear' method in order to control what should become of the container's memory. More...
 
typedef const agxIO::FileState * const_iterator
 
typedef const agxIO::FileState * const_pointer
 
typedef const agxIO::FileState & const_reference
 
typedef std::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef ptrdiff_t difference_type
 
typedef agxIO::FileState * iterator
 
typedef std::random_access_iterator_tag iterator_category
 
typedef agxIO::FileState * pointer
 
typedef agxIO::FileState & reference
 
typedef std::reverse_iterator< iterator > reverse_iterator
 
typedef size_t size_type
 
typedef agxIO::FileState Type
 
typedef agxIO::FileState value_type
 

Public Member Functions

ByteAllocator & allocator ()
 
const ByteAllocator & allocator () const
 
agxIO::FileState & at (size_t index) const
 
agxIO::FileState & back () const
 
iterator begin ()
 
const_iterator begin () const
 
size_t capacity () const
 Returns the size of the memory are used by the container to store its elements. More...
 
void clear (ClearPolicy policy=SHRINK_BUFFER_AVERAGED)
 Remove all elements, optionally with maintained buffer allocation. More...
 
bool contains (const T2 &element) const
 Test if the vector contains a certain element. More...
 
bool contains (const agxIO::FileState &element) const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator position)
 STL erase functionality. More...
 
iterator erase (iterator start, iterator end)
 
void erase (size_t index)
 Erase elements using indices instead of iterators. More...
 
void erase (size_t start, size_t end)
 
iterator eraseFast (const_iterator position)
 Fast erase, replacing the erased element with the last element. More...
 
void eraseFast (size_t index)
 
size_t find (const T2 &element) const
 Find the index to a matching element, return size() if not found. More...
 
bool findAndErase (const T2 &element, bool searchMultiple=false)
 Find and erase an element. More...
 
agxIO::FileState & front () const
 
bool hasChanged () const
 
agxIO::FileState * increment (size_t numElements=1)
 Resize using a increment. More...
 
iterator insert (iterator position, const agxIO::FileState &value)
 
void insert (size_t index, const agxIO::FileState &value)
 
void insert (const_iterator it, InputIterator first, InputIterator last)
 
void insert (const_iterator it, std::initializer_list< agxIO::FileState > ilist)
 
bool operator!= (const Vector< agxIO::FileState, ByteAllocator > &other) const
 
bool operator== (const Vector< agxIO::FileState, ByteAllocator > &other) const
 Compare with other vector, return true if same size and all pairs are equal. More...
 
agxIO::FileState & operator[] (size_t i) const
 
void pop_back ()
 
agxIO::FileState * ptr ()
 Get access to the internal data buffer. More...
 
const agxIO::FileState * ptr () const
 
void push_back (const FileState &fs)
 Add a FileState to the vector. More...
 
void push_back (const agx::String &filename)
 Add a filename to the vector. More...
 
void push_back (const T2 &value)
 
void push_back (agxIO::FileState &&value)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void reserve (size_t size)
 Reserve capacity in the vector. More...
 
void reserveAtLeast (size_t size)
 Reserve capacity in the vector. More...
 
void resize (size_t size)
 Resize the vector, which then enables direct addressing using the bracket '[]' operator. More...
 
void resize (size_t size, const agxIO::FileState &value)
 
void shrink_to_fit ()
 Reduce the capacity of the vector to the actual size (number of elements) More...
 
size_t size () const
 
void swap (Vector &other)
 

Protected Attributes

void * m_buffer
 
size_t m_capacity
 
size_t m_size
 

Detailed Description

vector for holding a set of file states, where the vector can be asked if any of the files has been changed.

Definition at line 69 of file FileState.h.

Member Typedef Documentation

◆ const_iterator

typedef const agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::const_iterator
inherited

Definition at line 63 of file Vector.h.

◆ const_pointer

typedef const agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::const_pointer
inherited

Definition at line 58 of file Vector.h.

◆ const_reference

typedef const agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::const_reference
inherited

Definition at line 60 of file Vector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> agx::Vector< agxIO::FileState , ByteAllocator >::const_reverse_iterator
inherited

Definition at line 138 of file Vector.h.

◆ difference_type

typedef ptrdiff_t agx::Vector< agxIO::FileState , ByteAllocator >::difference_type
inherited

Definition at line 65 of file Vector.h.

◆ iterator

typedef agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::iterator
inherited

Definition at line 62 of file Vector.h.

◆ iterator_category

typedef std::random_access_iterator_tag agx::Vector< agxIO::FileState , ByteAllocator >::iterator_category
inherited

Definition at line 64 of file Vector.h.

◆ pointer

typedef agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::pointer
inherited

Definition at line 57 of file Vector.h.

◆ reference

typedef agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::reference
inherited

Definition at line 59 of file Vector.h.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> agx::Vector< agxIO::FileState , ByteAllocator >::reverse_iterator
inherited

Definition at line 137 of file Vector.h.

◆ size_type

typedef size_t agx::Vector< agxIO::FileState , ByteAllocator >::size_type
inherited

Definition at line 61 of file Vector.h.

◆ Type

typedef agxIO::FileState agx::Vector< agxIO::FileState , ByteAllocator >::Type
inherited

Definition at line 55 of file Vector.h.

◆ value_type

typedef agxIO::FileState agx::Vector< agxIO::FileState , ByteAllocator >::value_type
inherited

Definition at line 56 of file Vector.h.

Member Enumeration Documentation

◆ ClearPolicy

agxData::Values from this enumeration is passed to the subclasses' 'clear' method in order to control what should become of the container's memory.

Enumerator
SHRINK_BUFFER 

Buffer is deallocated and replaced by an newly allocated empty buffer.

SHRINK_BUFFER_AVERAGED 

Buffer is shrunk if a smoothing average (which is updated each clear call) goes below a threshold.

MAINTAIN_BUFFER 

Buffer is maintained (normal stl behavior).

Definition at line 42 of file Container.h.

Member Function Documentation

◆ allocator() [1/2]

A & agx::Vector< agxIO::FileState , A >::allocator ( )
inherited

Definition at line 1001 of file Vector.h.

◆ allocator() [2/2]

const A & agx::Vector< agxIO::FileState , A >::allocator ( ) const
inherited

Definition at line 1004 of file Vector.h.

◆ at()

agxIO::FileState & agx::Vector< agxIO::FileState , A >::at ( size_t  index) const
inherited

Definition at line 691 of file Vector.h.

◆ back()

agxIO::FileState & agx::Vector< agxIO::FileState , A >::back ( ) const
inherited

Definition at line 707 of file Vector.h.

◆ begin() [1/2]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::begin ( )
inherited

Definition at line 1041 of file Vector.h.

◆ begin() [2/2]

Vector< agxIO::FileState , A >::const_iterator agx::Vector< agxIO::FileState , A >::begin ( ) const
inherited

Definition at line 1047 of file Vector.h.

◆ capacity()

size_t agx::Container::capacity ( ) const
inherited

Returns the size of the memory are used by the container to store its elements.

Some types of containers, e.g. the agx::Vector, will not do a reallocation until the size of the container reaches the capacity. However, this is not the case for e.g., agx::HashTable, which may perform a reallocation earlier.

Returns
The size of the allocated memory area, in number of elements.

Definition at line 135 of file Container.h.

References agx::Container::m_capacity.

Referenced by agx::Vector< WireContactConstraintRef >::operator=().

◆ clear()

void agx::Vector< agxIO::FileState , A >::clear ( ClearPolicy  policy = SHRINK_BUFFER_AVERAGED)
inherited

Remove all elements, optionally with maintained buffer allocation.

Definition at line 491 of file Vector.h.

◆ contains() [1/2]

bool agx::Vector< agxIO::FileState , A >::contains ( const T2 &  element) const
inherited

Test if the vector contains a certain element.

Definition at line 843 of file Vector.h.

◆ contains() [2/2]

bool agx::Vector< agxIO::FileState , A >::contains ( const agxIO::FileState &  element) const
inherited

Definition at line 849 of file Vector.h.

◆ empty()

bool agx::Container::empty ( ) const
inherited

◆ end() [1/2]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::end ( )
inherited

Definition at line 1044 of file Vector.h.

◆ end() [2/2]

Vector< agxIO::FileState , A >::const_iterator agx::Vector< agxIO::FileState , A >::end ( ) const
inherited

Definition at line 1050 of file Vector.h.

◆ erase() [1/4]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::erase ( iterator  position)
inherited

STL erase functionality.

Definition at line 765 of file Vector.h.

◆ erase() [2/4]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::erase ( iterator  start,
iterator  end 
)
inherited

Definition at line 773 of file Vector.h.

◆ erase() [3/4]

void agx::Vector< agxIO::FileState , A >::erase ( size_t  index)
inherited

Erase elements using indices instead of iterators.

Definition at line 784 of file Vector.h.

◆ erase() [4/4]

void agx::Vector< agxIO::FileState , A >::erase ( size_t  start,
size_t  end 
)
inherited

Definition at line 806 of file Vector.h.

◆ eraseFast() [1/2]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::eraseFast ( const_iterator  position)
inherited

Fast erase, replacing the erased element with the last element.

Definition at line 825 of file Vector.h.

◆ eraseFast() [2/2]

void agx::Vector< agxIO::FileState , A >::eraseFast ( size_t  index)
inherited

Definition at line 833 of file Vector.h.

◆ find()

size_t agx::Vector< agxIO::FileState , A >::find ( const T2 &  element) const
inherited

Find the index to a matching element, return size() if not found.

Definition at line 856 of file Vector.h.

◆ findAndErase()

bool agx::Vector< agxIO::FileState , A >::findAndErase ( const T2 &  element,
bool  searchMultiple = false 
)
inherited

Find and erase an element.

Parameters
element- Element to search for
searchMultipleSet to true if search should continue after element is found, otherwise the search terminates on first match.
Returns
true if the element was found, else false

Definition at line 868 of file Vector.h.

◆ front()

agxIO::FileState & agx::Vector< agxIO::FileState , A >::front ( ) const
inherited

Definition at line 699 of file Vector.h.

◆ hasChanged()

bool agxIO::FileStateVector::hasChanged ( ) const
Returns
true if any of the FileStates have been changed

◆ increment()

agxIO::FileState * agx::Vector< agxIO::FileState , A >::increment ( size_t  numElements = 1)
inherited

Resize using a increment.

Definition at line 605 of file Vector.h.

◆ insert() [1/4]

Vector< agxIO::FileState , A >::iterator agx::Vector< agxIO::FileState , A >::insert ( iterator  position,
const agxIO::FileState &  value 
)
inherited

Definition at line 891 of file Vector.h.

◆ insert() [2/4]

void agx::Vector< agxIO::FileState , A >::insert ( size_t  index,
const agxIO::FileState &  value 
)
inherited

Definition at line 930 of file Vector.h.

◆ insert() [3/4]

void agx::Vector< agxIO::FileState , A >::insert ( const_iterator  it,
InputIterator  first,
InputIterator  last 
)
inherited

Definition at line 899 of file Vector.h.

◆ insert() [4/4]

void agx::Vector< agxIO::FileState , A >::insert ( const_iterator  it,
std::initializer_list< agxIO::FileState >  ilist 
)
inherited

Definition at line 924 of file Vector.h.

◆ operator!=()

bool agx::Vector< agxIO::FileState , A >::operator!= ( const Vector< agxIO::FileState , A > &  other) const
inherited

Definition at line 632 of file Vector.h.

◆ operator==()

bool agx::Vector< agxIO::FileState , A >::operator== ( const Vector< agxIO::FileState , A > &  other) const
inherited

Compare with other vector, return true if same size and all pairs are equal.

Definition at line 619 of file Vector.h.

◆ operator[]()

agxIO::FileState & agx::Vector< agxIO::FileState , A >::operator[] ( size_t  i) const
inherited

Definition at line 684 of file Vector.h.

◆ pop_back()

void agx::Vector< agxIO::FileState , A >::pop_back ( )
inherited

Definition at line 754 of file Vector.h.

◆ ptr() [1/2]

agxIO::FileState * agx::Vector< agxIO::FileState , A >::ptr ( )
inherited

Get access to the internal data buffer.

Definition at line 677 of file Vector.h.

◆ ptr() [2/2]

const agxIO::FileState * agx::Vector< agxIO::FileState , A >::ptr ( ) const
inherited

Definition at line 680 of file Vector.h.

◆ push_back() [1/4]

void agxIO::FileStateVector::push_back ( const FileState &  fs)

Add a FileState to the vector.

◆ push_back() [2/4]

void agxIO::FileStateVector::push_back ( const agx::String &  filename)

Add a filename to the vector.

◆ push_back() [3/4]

void agx::Vector< agxIO::FileState , A >::push_back ( const T2 &  value)
inherited

Definition at line 715 of file Vector.h.

◆ push_back() [4/4]

void agx::Vector< agxIO::FileState , A >::push_back ( agxIO::FileState &&  value)
inherited

Definition at line 741 of file Vector.h.

◆ rbegin() [1/2]

Definition at line 1053 of file Vector.h.

◆ rbegin() [2/2]

Vector< agxIO::FileState , A >::const_reverse_iterator agx::Vector< agxIO::FileState , A >::rbegin ( ) const
inherited

Definition at line 1059 of file Vector.h.

◆ rend() [1/2]

Definition at line 1056 of file Vector.h.

◆ rend() [2/2]

Definition at line 1062 of file Vector.h.

◆ reserve()

void agx::Vector< agxIO::FileState , A >::reserve ( size_t  size)
inherited

Reserve capacity in the vector.

Definition at line 583 of file Vector.h.

◆ reserveAtLeast()

void agx::Vector< agxIO::FileState , A >::reserveAtLeast ( size_t  size)
inherited

Reserve capacity in the vector.

Let vector grow in same way as push_back() does.

Definition at line 592 of file Vector.h.

◆ resize() [1/2]

void agx::Vector< agxIO::FileState , A >::resize ( size_t  size)
inherited

Resize the vector, which then enables direct addressing using the bracket '[]' operator.

Definition at line 540 of file Vector.h.

◆ resize() [2/2]

void agx::Vector< agxIO::FileState , A >::resize ( size_t  size,
const agxIO::FileState &  value 
)
inherited

Definition at line 562 of file Vector.h.

◆ shrink_to_fit()

void agx::Vector< agxIO::FileState , A >::shrink_to_fit ( )
inherited

Reduce the capacity of the vector to the actual size (number of elements)

Definition at line 531 of file Vector.h.

◆ size()

size_t agx::Container::size ( ) const
inherited
Returns
The number of elements in the container.

Definition at line 134 of file Container.h.

References agx::Container::m_size.

Referenced by agxCollide::GroupFooCollider< ShapeType >::_calculateContacts(), agxData::Array< JacobianElementT >::Array(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::back(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::back(), agx::MemoryPoolOld< T >::clear(), agxData::BufferT< T >::commit(), agxSDK::copyVectors(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agxSDK::LinkedSegmentIterator< T >::end(), agxSDK::LinkedSegmentIterator< T >::findPrevIndex(), agx::ConstraintImplementation::findSecondaryConstraintGivenType(), agx::MemoryPoolOld< T >::garbageCollect(), agx::ConstraintImplementation::BodyView::getNumBodies(), agx::ConstraintImplementation::SolverBodyView::getPermutedBodyAt(), agxSDK::LinkedSegmentIterator< T >::isEnd(), agxPowerLine::ConnectionIterator< T >::isValid(), agxPowerLine::PhysicalDimensionIterator< UnitPtr >::isValid(), agx::Vector< WireContactConstraintRef >::operator!=(), agx::VectorPOD< agx::Vec6 >::operator!=(), agxSDK::LinkedSegmentIterator< T >::operator+(), agxPowerLine::PhysicalDimensionIterator< UnitPtr >::operator++(), agxSDK::LinkedSegmentIterator< T >::operator-(), agx::Vector< WireContactConstraintRef >::operator=(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::operator=(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::operator=(), agx::VectorPOD< agx::Vec6 >::operator=(), agx::Vector< WireContactConstraintRef >::operator==(), agx::VectorPOD< agx::Vec6 >::operator==(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::operator[](), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::operator[](), agxOSG::RenderStateManager::parseUniform(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::purge(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::purge(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::push_back(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::push_back(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agxRender::HeightFieldProxy::setHeights(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::size(), agx::SetVector< agx::ref_ptr< agxSDK::EventListener > >::size(), agxVehicle::utils::splitNonconsecutive(), agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), agxWire::transformVectorToWorld(), agxModel::triangleIterator(), agx::Event::trigger(), and agxStream::StoreObjects< T >::~StoreObjects().

◆ swap()

void agx::Vector< agxIO::FileState , A >::swap ( Vector< agxIO::FileState > &  other)
inherited

Definition at line 1651 of file Vector.h.

Member Data Documentation

◆ m_buffer

◆ m_capacity

◆ m_size


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