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

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

Definition at line 63 of file Vector.h.

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

Definition at line 58 of file Vector.h.

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

Definition at line 60 of file Vector.h.

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

Definition at line 138 of file Vector.h.

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

Definition at line 65 of file Vector.h.

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

Definition at line 62 of file Vector.h.

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

Definition at line 64 of file Vector.h.

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

Definition at line 57 of file Vector.h.

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

Definition at line 59 of file Vector.h.

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

Definition at line 137 of file Vector.h.

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

Definition at line 61 of file Vector.h.

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

Definition at line 55 of file Vector.h.

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

Definition at line 56 of file Vector.h.

Member Enumeration Documentation

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

ByteAllocator & agx::Vector< agxIO::FileState , ByteAllocator >::allocator ( )
inherited
const ByteAllocator & agx::Vector< agxIO::FileState , ByteAllocator >::allocator ( ) const
inherited
agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::at ( size_t  index) const
inherited
agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::back ( ) const
inherited
iterator agx::Vector< agxIO::FileState , ByteAllocator >::begin ( )
inherited
const_iterator agx::Vector< agxIO::FileState , ByteAllocator >::begin ( ) const
inherited
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< T, Allocator >::operator=().

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

Remove all elements, optionally with maintained buffer allocation.

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

Test if the vector contains a certain element.

bool agx::Vector< agxIO::FileState , ByteAllocator >::contains ( const agxIO::FileState &  element) const
inherited
iterator agx::Vector< agxIO::FileState , ByteAllocator >::end ( )
inherited
const_iterator agx::Vector< agxIO::FileState , ByteAllocator >::end ( ) const
inherited
iterator agx::Vector< agxIO::FileState , ByteAllocator >::erase ( iterator  position)
inherited

STL erase functionality.

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

Erase elements using indices instead of iterators.

void agx::Vector< agxIO::FileState , ByteAllocator >::erase ( size_t  start,
size_t  end 
)
inherited
iterator agx::Vector< agxIO::FileState , ByteAllocator >::eraseFast ( const_iterator  position)
inherited

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

void agx::Vector< agxIO::FileState , ByteAllocator >::eraseFast ( size_t  index)
inherited
size_t agx::Vector< agxIO::FileState , ByteAllocator >::find ( const T2 &  element) const
inherited

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

bool agx::Vector< agxIO::FileState , ByteAllocator >::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
agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::front ( ) const
inherited
bool agxIO::FileStateVector::hasChanged ( ) const
Returns
true if any of the FileStates have been changed
agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::increment ( size_t  numElements = 1)
inherited

Resize using a increment.

iterator agx::Vector< agxIO::FileState , ByteAllocator >::insert ( iterator  position,
const agxIO::FileState &  value 
)
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::insert ( size_t  index,
const agxIO::FileState &  value 
)
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::insert ( const_iterator  it,
InputIterator  first,
InputIterator  last 
)
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::insert ( const_iterator  it,
std::initializer_list< agxIO::FileState >  ilist 
)
inherited
bool agx::Vector< agxIO::FileState , ByteAllocator >::operator!= ( const Vector< agxIO::FileState , ByteAllocator > &  other) const
inherited
bool agx::Vector< agxIO::FileState , ByteAllocator >::operator== ( const Vector< agxIO::FileState , ByteAllocator > &  other) const
inherited

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

agxIO::FileState & agx::Vector< agxIO::FileState , ByteAllocator >::operator[] ( size_t  i) const
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::pop_back ( )
inherited
agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::ptr ( )
inherited

Get access to the internal data buffer.

const agxIO::FileState * agx::Vector< agxIO::FileState , ByteAllocator >::ptr ( ) const
inherited
void agxIO::FileStateVector::push_back ( const FileState &  fs)

Add a FileState to the vector.

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

Add a filename to the vector.

void agx::Vector< agxIO::FileState , ByteAllocator >::push_back ( const T2 &  value)
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::push_back ( agxIO::FileState &&  value)
inherited
reverse_iterator agx::Vector< agxIO::FileState , ByteAllocator >::rbegin ( )
inherited
const_reverse_iterator agx::Vector< agxIO::FileState , ByteAllocator >::rbegin ( ) const
inherited
reverse_iterator agx::Vector< agxIO::FileState , ByteAllocator >::rend ( )
inherited
const_reverse_iterator agx::Vector< agxIO::FileState , ByteAllocator >::rend ( ) const
inherited
void agx::Vector< agxIO::FileState , ByteAllocator >::reserve ( size_t  size)
inherited

Reserve capacity in the vector.

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

Reserve capacity in the vector.

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

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

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

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

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

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< T >::Array(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::back(), agx::SetVector< const agxPowerLine::Unit * >::back(), agx::WireContactConstraint::calculateD(), agx::WireContactConstraint::calculateRHS(), agx::GlobalResult::Transaction::commit(), agxData::BufferT< T >::commit(), agxSDK::copyVectors(), agx::createMissingTiers(), agxCollide::Space::disableForContacts(), agxSDK::LinkedSegmentIterator< T >::end(), agx::ConstraintImplementation::findSecondaryConstraintGivenType(), agxSDK::MergeSplitThresholds::get(), agx::WireContactConstraint::getForceOnParticle(), agxSDK::MultiCollisionFilterContactHandler::getGeometryContact(), agxModel::HeightController::getHeight(), agx::WireContactConstraint::getInvMass(), agx::WireContactConstraint::getJacobian(), agx::WireContactConstraint::getMass(), agx::ConstraintImplementation::BodyView::getNumBodies(), agxSDK::LinkedStructure::getNumSegments(), agxIO::MeshReader::getNumTriangles(), agxSDK::MergeSplitThresholds::getNumValues(), agxSDK::LinkedStructure::getSegment(), agxSDK::CollisionGroupFilter::hasMemberGroup(), agxSDK::CollisionGroupFilter::match(), agx::Vector< T, Allocator >::operator!=(), agx::VectorPOD< T, Allocator >::operator!=(), agx::Vector< T, Allocator >::operator=(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::operator=(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::operator=(), agx::VectorPOD< T, Allocator >::operator=(), agx::Vector< T, Allocator >::operator==(), agx::VectorPOD< T, Allocator >::operator==(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::operator[](), agx::SetVector< const agxPowerLine::Unit * >::operator[](), agxOSG::RenderStateManager::parseUniform(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::purge(), agx::SetVector< const agxPowerLine::Unit * >::purge(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::push_back(), agx::SetVector< const agxPowerLine::Unit * >::push_back(), agxIO::ArgumentParser::read1(), agxIO::ArgumentParser::read2(), agxIO::ArgumentParser::read3(), agx::HashSetImplementation< CellPtr, HashFn< CellPtr >, ByteAllocator >::rebuild(), agx::QuadraticProbingHashTableImplementation< SymmetricMaterialPair, agx::ContactMaterialRef, HashFn< SymmetricMaterialPair >, ByteAllocator >::rebuild(), agxRender::HeightFieldProxy::setHeights(), agxUtil::ConvexHull2D::size(), agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > >::size(), agx::SetVector< const agxPowerLine::Unit * >::size(), agxVehicle::utils::splitNonconsecutive(), agxWire::transformPointToShape(), agxWire::transformPointToWorld(), agxWire::transformVectorToShape(), agxWire::transformVectorToWorld(), agxModel::triangleIterator(), agx::Event::trigger(), and agxStream::StoreObjects< T >::~StoreObjects().

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

Member Data Documentation


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