AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxData::BufferT< T > Class Template Reference

#include <Buffer.h>

+ Inheritance diagram for agxData::BufferT< T >:

Public Types

typedef const T * const_iterator
 
typedef agx::Event1< Buffer * > Event
 
typedef agx::observer_ptr
< const Event > 
EventConstObserver
 
typedef agx::ref_ptr< const Event > EventConstRef
 
typedef agx::observer_ptr< Event > EventObserver
 
typedef agx::ref_ptr< Event > EventRef
 
typedef T * iterator
 
typedef Event2< Component
*, Object * > 
ObjectEvent
 Event when adding removing child objects. More...
 
typedef agx::Callback2< Buffer
*, const agx::IndexRange & > 
RangeCallback
 Specify a custom element initializer callback. More...
 
typedef Callback1< Object * > TraverseCallback
 
typedef T Type
 
typedef T value_type
 

Public Member Functions

 BufferT ()
 
 BufferT (const agx::Name &name)
 
void addListener (EventListener *listener)
 
virtual void addObject (agx::Object *object, bool assignContext=true)
 Add an object to the component. More...
 
 AGX_DECLARE_VECTOR_TYPES (Event)
 
void * allocateBackBuffer ()
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
T & at (size_t index)
 
const T & at (size_t index) const
 
virtual String autoComplete (const String &partialName, StringVector &matchingNames) const
 
T & back ()
 
const T & back () const
 
iterator begin ()
 
const_iterator begin () const
 
virtual void buildNavigationTree (agxJson::Value &eNode) const override
 
size_t capacity () const
 
void clear ()
 
Buffer * clone () const
 Clone the buffer. More...
 
Buffer * clone (const agx::IndexRange &range) const
 Clone a subset of the buffer. More...
 
Buffer * clone (const agxData::IndexArray &indices) const
 
Buffer * clone (const agx::IndexVector &indices) const
 
void commit ()
 
void commit (agx::IndexRange32 range)
 
void commit (agx::Index index)
 
void commit (const agxData::IndexArray &indexList)
 
void commit (const agx::IndexVector &indexList)
 
virtual void configure (TiXmlElement *eComponent) override
 
virtual void configure (agx::TiXmlElement *eBuffer) override
 
void configure (Model *model)
 
template<typename T2 >
bool contains (const T2 &value) const
 
void deleteOverflowBuffer (void *buffer, size_t numElements)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
template<typename T2 >
size_t find (const T2 &value) const
 
T & front ()
 
const T & front () const
 
agx::String fullName () const
 
agx::String fullPath () const
 
agx::String fullPath (const agx::Object *root) const
 
template<typename T >
agxData::Array< T > & getArray ()
 Convenience method to get an direct data array. More...
 
template<typename T >
const agxData::Array< T > & getArray () const
 
agxData::AbstractArray & getArray ()
 
const agxData::AbstractArray & getArray () const
 
agxData::Attribute * getAttribute ()
 
const agxData::Attribute * getAttribute () const
 
agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getAutoScopedResource (const agx::Path &path)
 
template<typename T >
const T * getAutoScopedResource (const agx::Path &path) const
 
agx::Object * getContext ()
 
const agx::Object * getContext () const
 
template<typename T >
T * getContext ()
 
template<typename T >
const T * getContext () const
 
agxData::Value * getDefaultValue ()
 
const agxData::Value * getDefaultValue () const
 
agx::Device * getDevice ()
 
const agx::Device * getDevice () const
 
template<typename T >
T * getDevice ()
 
template<typename T >
const T * getDevice () const
 
template<typename T >
T & getElement (size_t index)
 
template<typename T >
const T & getElement (size_t index) const
 
void * getElement (size_t index)
 
const void * getElement (size_t index) const
 
size_t getElementArraySize () const
 
Buffer * getElementBuffer ()
 If the buffer contains arrays/vectors, the actual elements are stored in another buffer. More...
 
const Buffer * getElementBuffer () const
 
agxData::Format * getFormat ()
 
const agxData::Format * getFormat () const
 
Buffer * getGlobalOrderBuffer ()
 If the buffer is used as a global result, we provide a permutation buffer for parallel determinism. More...
 
const Buffer * getGlobalOrderBuffer () const
 
agx::GlobalResultBuffer * getGlobalResult ()
 
const agx::GlobalResultBuffer * getGlobalResult () const
 
agx::UInt32 getId () const
 
const agx::Name & getImplementationName () const
 
agx::Model * getModel ()
 
const agx::Model * getModel () const
 
const agx::Name & getName () const
 
agx::Object * getNextSibling ()
 
const agx::Object * getNextSibling () const
 
size_t getNumObjects (const agx::Name &name) const
 
agx::Object * getObject (const agx::Name &name, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, size_t index=0) const
 
agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0)
 
const agx::Object * getObject (const agx::Name &name, agx::Model *model, size_t index=0) const
 
template<typename T >
T * getObject (const agx::Name &name, size_t index=0)
 
template<typename T >
const T * getObject (const agx::Name &name, size_t index=0) const
 
const agx::ObjectRefVector & getObjects () const
 
template<typename T >
void getObjects (agx::ObjectPtrVector &result, bool recursive=false) const
 
void getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const
 
template<typename T >
void getObjects (ObjectPtrVector &result, bool recursive) const
 
Buffer * getOrCreateGlobalOrderBuffer ()
 
Buffer * getOriginalBuffer ()
 
const Buffer * getOriginalBuffer () const
 
agx::Path getPath () const
 
agx::Path getPath (const agx::Object *root) const
 
int getReferenceCount () const
 
const
agxData::Value::Event::CallbackType & 
getReserveCallback () const
 
const
agxData::Value::Event::CallbackType & 
getResizeCallback () const
 
agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr)
 
const agx::Object * getResource (const agx::Path &path, agx::Model *model=nullptr) const
 
template<typename T >
T * getResource (const agx::Path &path)
 
template<typename T >
const T * getResource (const agx::Path &path) const
 
virtual Object * getResourceImpl (const Path &path, agx::Model *model) override
 
agx::UInt64 getRevision () const
 
agx::Object * getRootContext ()
 
const agx::Object * getRootContext () const
 
agxData::EntityStorage * getStorage ()
 
const agxData::EntityStorage * getStorage () const
 
agxData::Type * getType ()
 
const agxData::Type * getType () const
 
bool hasListener (EventListener *listener)
 
bool hasParent (const agx::Object *node) const
 
void initialize (const agx::IndexRange &range)
 Initialize a range of elements. More...
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool isUnique () const
 
void * kernelOverflowReallocation (size_t size)
 
T & operator[] (size_t index)
 
const T & operator[] (size_t index) const
 
void pop_back ()
 
void presize (size_t size, size_t initialSize)
 
void print () const
 Print the buffer. More...
 
void print (agx::IndexRange range) const
 
void print (std::ostream &stream) const
 
void print (std::ostream &stream, agx::IndexRange range) const
 
virtual void printSubtree () const override
 
void printSubtree (std::ostream &stream, int depth=0) const
 
void * ptr ()
 Get access to the raw data buffer. More...
 
const void * ptr () const
 
template<typename T >
T * ptr ()
 
template<typename T >
const T * ptr () const
 
void push_back (const T &value)
 
virtual void rebind () override
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void registerSharedContainer (agx::Container *container)
 
void removeAllObjects ()
 Remove all components. More...
 
void removeListener (EventListener *listener)
 
virtual void removeObject (agx::Object *object)
 Remove an object from the component. More...
 
void removeObject (const agx::Name &name, size_t index=0)
 Remove an object with a specified name (and optional index) from the component. More...
 
void reserve (size_t size)
 Reserve space for future buffer expansion. More...
 
void resize (size_t size, bool initializeElements=true)
 Resize the buffer. More...
 
virtual void save (TiXmlElement *) const
 
virtual void setContext (agx::Object *context)
 
void setDefaultValue (agxData::Value *value)
 Set the default element value. More...
 
void setElementBuffer (Buffer *buffer)
 Set the element buffer, internal use only. More...
 
void setElementDestructor (const RangeCallback &callback)
 
void setElementInitializer (const RangeCallback &callback)
 
void setId (UInt32 id)
 
void setModel (agx::Model *model)
 Set the object model (handled automatically). More...
 
void setName (const agx::Name &name)
 Set the name of the object. More...
 
void setRevision (agx::UInt64 revision)
 
size_t size () const
 
virtual void snapshot (TiXmlNode *eParent, const String &directory) const override
 
virtual void snapshot (agx::TiXmlNode *eParent, const agx::String &directory) const override
 
void swapBackBuffer (void *backBuffer)
 
void traverse (const TraverseCallback &callback)
 
void traverse (ComponentVisitor *)
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unregisterSharedContainer (agx::Container *container)
 

Static Public Member Functions

static Component * _load (TiXmlElement *eComponent, Device *device)
 
static agx::Model * ClassModel ()
 
static void copy (Buffer *target, const Buffer *source)
 Copy one buffer to another. More...
 
static void copy (Buffer *target, size_t targetOffset, const Buffer *source, size_t sourceOffset, size_t numElements)
 
static void copyGather (Buffer *target, const Buffer *source, const agxData::IndexArray &indices)
 
static void copyScatter (Buffer *target, const Buffer *source, const agxData::IndexArray &indices)
 
static agx::String generateName (const agx::String &bindPath)
 
static const HashSet< Object * > & getActiveObjects ()
 
static bool getEnableRebind ()
 Should rebinding be allowed? Right now a global setting. More...
 
static Component * load (const String &path, const Path &_namespace=Path())
 
static Component * load (const String &path, Device *device, const Path &_namespace=Path())
 
static Component * load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path())
 
static Component * load (TiXmlElement *eComponent, Device *device)
 
static Buffer * load (agx::TiXmlElement *eBuffer, agx::Device *device)
 
static Object * load (const String &path, Device *device, const String &type="", size_t instance=0)
 
static Object * load (const String &path, Device *device, const String &type, const String &attribute, const String &value)
 
static void load (const String &path, Device *device, ObjectPtrVector &loadedObjects)
 
static TiXmlDocument openDocument (const String &path)
 
static void setEnableRebind (bool flag)
 Sets if rebinding of objects should be allowed (Right now a global setting). More...
 
template<typename T2 >
static bool ValidateCast (const agx::Referenced *object)
 

Public Attributes

ObjectEvent addObjectEvent
 
agxData::ValueRefT< agx::UInt > capacityParameter
 
Event reallocationEvent
 Triggered when buffer is reallocated. More...
 
ObjectEvent removeObjectEvent
 
agxData::ValueRefT< agx::UInt > sizeParameter
 

Static Public Attributes

static agx::UInt ALIGNMENT
 
static agx::Real CAPACITY_MULTIPLIER
 
static agx::UInt MIN_BUFFER_CAPACITY
 

Protected Member Functions

virtual ~BufferT ()
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
String expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const
 
virtual void reallocate (size_t size)
 
void setDevice (Device *device)
 

Static Protected Member Functions

static void destroyElements (Buffer *buffer, const agx::IndexRange &range)
 
static DeleteHandler * getDeleteHandler ()
 
static void initializeElements (Buffer *buffer, const agx::IndexRange &range)
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Protected Attributes

agx::ByteAllocator m_allocator
 
AbstractArray m_array
 
Attribute * m_attribute
 
size_t m_capacity
 
agxData::ValueRef m_defaultElementValue
 
RangeCallback m_destructor
 
agxData::BufferRef m_elementBuffer
 
EventDispatch m_eventDispatch
 
FormatRef m_format
 
agxData::BufferRef m_globalOrderBuffer
 
agx::GlobalResultBuffer * m_globalResult
 
bool m_initElements
 
RangeCallback m_initializer
 
Mutex m_mutex
 
ObserverContainer m_observers
 
agxData::Buffer * m_originalBuffer
 
void * m_ptr
 
AtomicValue m_refCount
 
agxData::Value::Event::CallbackType m_reserveCallback
 
agxData::Value::Event::CallbackType m_resizeCallback
 
agx::UInt64 m_revision
 
agx::Container * m_sharedContainer
 
agxData::ShareHandleRef m_shareHandle
 
size_t m_size
 
EntityStorage * m_storage
 
bool m_usedResizeMethod
 

Detailed Description

template<typename T>
class agxData::BufferT< T >

Definition at line 396 of file Buffer.h.

Member Typedef Documentation

template<typename T >
typedef const T* agxData::BufferT< T >::const_iterator

Definition at line 406 of file Buffer.h.

Definition at line 82 of file Buffer.h.

Definition at line 62 of file Object.h.

typedef agx::ref_ptr< const Event > agx::Object::EventConstRef
inherited

Definition at line 62 of file Object.h.

Definition at line 62 of file Object.h.

Definition at line 62 of file Object.h.

template<typename T >
typedef T* agxData::BufferT< T >::iterator

Definition at line 405 of file Buffer.h.

typedef Event2<Component *, Object *> agx::Component::ObjectEvent
inherited

Event when adding removing child objects.

NOTE: Events are triggered recursively up the parent structure Example: B is added to root node A, one event is triggered (A.addObjectEvent(A, B)). Then when C is added to B two events are triggered (B.addObjectEvent(B, C), and A.addObjectEvent(B,C))

Definition at line 61 of file Component.h.

Specify a custom element initializer callback.

Definition at line 285 of file Buffer.h.

typedef Callback1<Object*> agx::Component::TraverseCallback
inherited

Definition at line 141 of file Component.h.

template<typename T >
typedef T agxData::BufferT< T >::Type

Definition at line 403 of file Buffer.h.

template<typename T >
typedef T agxData::BufferT< T >::value_type

Definition at line 404 of file Buffer.h.

Constructor & Destructor Documentation

template<typename T >
agxData::BufferT< T >::BufferT ( )

Definition at line 952 of file Buffer.h.

template<typename T >
agxData::BufferT< T >::BufferT ( const agx::Name &  name)

Definition at line 957 of file Buffer.h.

template<typename T >
agxData::BufferT< T >::~BufferT ( )
protectedvirtual

Definition at line 962 of file Buffer.h.

Member Function Documentation

static Component* agx::Component::_load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited
void agxData::Buffer::addListener ( EventListener *  listener)
inherited
virtual void agx::Component::addObject ( agx::Object *  object,
bool  assignContext = true 
)
virtualinherited

Add an object to the component.

Parameters
objectThe object to be added
assignContextTrue if the child get the component as the context, set to false to allow 'weak' coupled children
agx::Object::AGX_DECLARE_VECTOR_TYPES ( Event  )
inherited
void* agxData::Buffer::allocateBackBuffer ( )
inherited
void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().

template<typename T >
const T* agx::Referenced::as ( ) const
inherited
template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited
template<typename T >
T & agxData::BufferT< T >::at ( size_t  index)

Definition at line 1038 of file Buffer.h.

template<typename T >
const T & agxData::BufferT< T >::at ( size_t  index) const

Definition at line 1044 of file Buffer.h.

virtual String agx::Component::autoComplete ( const String &  partialName,
StringVector &  matchingNames 
) const
virtualinherited

Reimplemented in agx::Namespace.

template<typename T >
T & agxData::BufferT< T >::back ( )

Definition at line 1062 of file Buffer.h.

template<typename T >
const T & agxData::BufferT< T >::back ( ) const

Definition at line 1068 of file Buffer.h.

template<typename T >
BufferT< T >::iterator agxData::BufferT< T >::begin ( )

Definition at line 1076 of file Buffer.h.

template<typename T >
BufferT< T >::const_iterator agxData::BufferT< T >::begin ( ) const

Definition at line 1082 of file Buffer.h.

virtual void agxData::Buffer::buildNavigationTree ( agxJson::Value &  eNode) const
overridevirtualinherited

Reimplemented from agx::Component.

size_t agxData::Buffer::capacity ( ) const
inherited
Returns
The capacity of the buffer.

Definition at line 460 of file Buffer.h.

References agxData::Buffer::m_capacity.

Referenced by agxData::Buffer::getElement().

static agx::Model* agxData::Buffer::ClassModel ( )
staticinherited
template<typename T >
void agxData::BufferT< T >::clear ( )

Definition at line 1004 of file Buffer.h.

References m_size.

Buffer* agxData::Buffer::clone ( ) const
inherited

Clone the buffer.

Buffer* agxData::Buffer::clone ( const agx::IndexRange &  range) const
inherited

Clone a subset of the buffer.

Buffer* agxData::Buffer::clone ( const agxData::IndexArray &  indices) const
inherited
Buffer* agxData::Buffer::clone ( const agx::IndexVector &  indices) const
inherited
template<typename T >
void agxData::BufferT< T >::commit ( )

Definition at line 1100 of file Buffer.h.

References agxData::Buffer::commit().

template<typename T >
void agxData::BufferT< T >::commit ( agx::IndexRange32  range)

Definition at line 1106 of file Buffer.h.

References agxData::Buffer::commit().

template<typename T >
void agxData::BufferT< T >::commit ( agx::Index  index)

Definition at line 1112 of file Buffer.h.

References agxData::Buffer::commit().

template<typename T >
void agxData::BufferT< T >::commit ( const agxData::IndexArray &  indexList)

Definition at line 1118 of file Buffer.h.

References agxData::Buffer::commit().

template<typename T >
void agxData::BufferT< T >::commit ( const agx::IndexVector &  indexList)
virtual void agx::Component::configure ( TiXmlElement *  eComponent)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Clock, agx::Task, agx::Kernel, agx::UnresolvedTask, and agx::Clock.

virtual void agxData::Buffer::configure ( agx::TiXmlElement *  eBuffer)
overridevirtualinherited
void agx::Component::configure ( Model *  model)
inherited
template<typename T >
template<typename T2 >
bool agxData::BufferT< T >::contains ( const T2 &  value) const

Definition at line 1014 of file Buffer.h.

static void agxData::Buffer::copy ( Buffer *  target,
const Buffer *  source 
)
staticinherited

Copy one buffer to another.

static void agxData::Buffer::copy ( Buffer *  target,
size_t  targetOffset,
const Buffer *  source,
size_t  sourceOffset,
size_t  numElements 
)
staticinherited
static void agxData::Buffer::copyGather ( Buffer *  target,
const Buffer *  source,
const agxData::IndexArray &  indices 
)
staticinherited
static void agxData::Buffer::copyScatter ( Buffer *  target,
const Buffer *  source,
const agxData::IndexArray &  indices 
)
staticinherited
void agxData::Buffer::deleteOverflowBuffer ( void *  buffer,
size_t  numElements 
)
inherited
void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
static void agxData::Buffer::destroyElements ( Buffer *  buffer,
const agx::IndexRange &  range 
)
staticprotectedinherited
bool agxData::Buffer::empty ( ) const
inherited
Returns
True if the buffer is empty.

Definition at line 461 of file Buffer.h.

References agxData::Buffer::m_size.

template<typename T >
BufferT< T >::iterator agxData::BufferT< T >::end ( )

Definition at line 1088 of file Buffer.h.

template<typename T >
BufferT< T >::const_iterator agxData::BufferT< T >::end ( ) const

Definition at line 1094 of file Buffer.h.

String agx::Component::expandAutoCompletionMatch ( const String &  query,
const StringVector &  matchingNames 
) const
protectedinherited
template<typename T >
template<typename T2 >
size_t agxData::BufferT< T >::find ( const T2 &  value) const

Definition at line 1020 of file Buffer.h.

template<typename T >
T & agxData::BufferT< T >::front ( )

Definition at line 1050 of file Buffer.h.

template<typename T >
const T & agxData::BufferT< T >::front ( ) const

Definition at line 1056 of file Buffer.h.

agx::String agx::Object::fullName ( ) const
inherited
agx::String agx::Object::fullPath ( ) const
inherited
Returns
path:implementation
agx::String agx::Object::fullPath ( const agx::Object *  root) const
inherited
static agx::String agx::Object::generateName ( const agx::String &  bindPath)
staticinherited
static const HashSet<Object *>& agx::Object::getActiveObjects ( )
staticinherited
template<typename T >
AbstractArray & agxData::Buffer::getArray ( )
inherited

Convenience method to get an direct data array.

Definition at line 495 of file Buffer.h.

References agxData::Buffer::m_array.

Referenced by agxData::AbstractArray::init(), and agxData::AbstractArray::setRange().

template<typename T >
const AbstractArray & agxData::Buffer::getArray ( ) const
inherited

Definition at line 496 of file Buffer.h.

References agxData::Buffer::m_array.

Array< T > & agxData::Buffer::getArray ( )
inherited
const Array< T > & agxData::Buffer::getArray ( ) const
inherited

Definition at line 490 of file Buffer.h.

Attribute * agxData::Buffer::getAttribute ( )
inherited
Returns
The attribute which the buffer holds data, nullptr if not part of a storage.

Definition at line 471 of file Buffer.h.

References agxData::Buffer::m_attribute.

const Attribute * agxData::Buffer::getAttribute ( ) const
inherited

Definition at line 472 of file Buffer.h.

References agxData::Buffer::m_attribute.

agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
The resource with the first matching subpath starting from this node and traversing upwards to the root.

Referenced by agx::Object::getAutoScopedResource().

const agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited
template<typename T >
T * agx::Object::getAutoScopedResource ( const agx::Path &  path)
inherited

Definition at line 428 of file Object.h.

References agx::Object::getAutoScopedResource(), and agx::Referenced::is().

template<typename T >
const T * agx::Object::getAutoScopedResource ( const agx::Path &  path) const
inherited

Definition at line 435 of file Object.h.

T * agx::Object::getContext ( )
inherited
Returns
The parent node in the system tree.

Definition at line 373 of file Object.h.

Referenced by agxData::Value::get(), and agx::Model::getNamespace().

const T * agx::Object::getContext ( ) const
inherited

Definition at line 374 of file Object.h.

template<typename T >
T* agx::Object::getContext ( )
inherited
template<typename T >
const T* agx::Object::getContext ( ) const
inherited
agxData::Value * agxData::Buffer::getDefaultValue ( )
inherited
Returns
The default element value.

Definition at line 479 of file Buffer.h.

References agxData::Buffer::m_defaultElementValue.

const agxData::Value * agxData::Buffer::getDefaultValue ( ) const
inherited

Definition at line 480 of file Buffer.h.

References agxData::Buffer::m_defaultElementValue.

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
T * agx::Component::getDevice ( )
inherited
Returns
The device which the component stored on.

Definition at line 222 of file Component.h.

Referenced by agx::Component::getDevice().

const T * agx::Component::getDevice ( ) const
inherited

Definition at line 223 of file Component.h.

References agx::Component::getDevice().

template<typename T >
T* agx::Component::getDevice ( )
inherited
template<typename T >
const T* agx::Component::getDevice ( ) const
inherited
template<typename T >
void * agxData::Buffer::getElement ( size_t  index)
inherited
template<typename T >
const void * agxData::Buffer::getElement ( size_t  index) const
inherited

Definition at line 529 of file Buffer.h.

void* agxData::Buffer::getElement ( size_t  index)
inherited
Returns
The raw data of a specific element in the buffer.
const void* agxData::Buffer::getElement ( size_t  index) const
inherited
size_t agxData::Buffer::getElementArraySize ( ) const
inherited
Returns
The array size. (used for ArrayAttribute in an EntityStorage)

Definition at line 466 of file Buffer.h.

References agx::ref_ptr< T >::get().

Referenced by agx::ArrayParameter::getNumElements().

Buffer * agxData::Buffer::getElementBuffer ( )
inherited

If the buffer contains arrays/vectors, the actual elements are stored in another buffer.

Definition at line 554 of file Buffer.h.

References agxData::Buffer::m_elementBuffer.

const Buffer * agxData::Buffer::getElementBuffer ( ) const
inherited

Definition at line 555 of file Buffer.h.

References agxData::Buffer::m_elementBuffer.

static bool agx::Object::getEnableRebind ( )
staticinherited

Should rebinding be allowed? Right now a global setting.

Format * agxData::Buffer::getFormat ( )
inherited
const Format * agxData::Buffer::getFormat ( ) const
inherited

Definition at line 477 of file Buffer.h.

References agxData::Buffer::m_format.

Buffer * agxData::Buffer::getGlobalOrderBuffer ( )
inherited

If the buffer is used as a global result, we provide a permutation buffer for parallel determinism.

Definition at line 557 of file Buffer.h.

References agxData::Buffer::m_globalOrderBuffer.

const Buffer * agxData::Buffer::getGlobalOrderBuffer ( ) const
inherited

Definition at line 558 of file Buffer.h.

References agxData::Buffer::m_globalOrderBuffer.

agx::GlobalResultBuffer * agxData::Buffer::getGlobalResult ( )
inherited
Returns
The global result bound to this buffer.

Definition at line 548 of file Buffer.h.

References agxData::Buffer::m_globalResult.

const agx::GlobalResultBuffer * agxData::Buffer::getGlobalResult ( ) const
inherited

Definition at line 549 of file Buffer.h.

References agxData::Buffer::m_globalResult.

UInt32 agx::Object::getId ( ) const
inherited
Returns
The global object id.

Definition at line 370 of file Object.h.

Referenced by agxData::EntityStorage::indexToId().

const agx::Name& agx::Object::getImplementationName ( ) const
inherited
Returns
The implementation name of the model. Alias for getModel()->getImplementationName()
Model * agx::Object::getModel ( )
inherited
Returns
The object model.

Definition at line 371 of file Object.h.

const Model * agx::Object::getModel ( ) const
inherited

Definition at line 372 of file Object.h.

const Name & agx::Object::getName ( ) const
inherited
Returns
Then name of the object.

Definition at line 369 of file Object.h.

Referenced by agxData::Value::get(), agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().

agx::Object* agx::Object::getNextSibling ( )
inherited
Returns
The next sibling with identical name.
const agx::Object* agx::Object::getNextSibling ( ) const
inherited
size_t agx::Component::getNumObjects ( const agx::Name &  name) const
inherited
Returns
The number of child objects with a specified name.
T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited
Returns
The child object with specified name (and optional index).

Definition at line 194 of file Component.h.

Referenced by agxData::EntityPtr::operator()().

const T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited

Definition at line 195 of file Component.h.

Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
)
inherited

Definition at line 197 of file Component.h.

const Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
) const
inherited

Definition at line 198 of file Component.h.

template<typename T >
T* agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited
template<typename T >
const T* agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited
const ObjectRefVector & agx::Component::getObjects ( ) const
inherited
Returns
All child objects.

Definition at line 192 of file Component.h.

Referenced by agx::Component::getObjects().

template<typename T >
void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
bool  recursive = false 
) const
inherited
Returns
All child objects of a specified type.
void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
const agx::Model *  model,
bool  recursive = false 
) const
inherited
template<typename T >
void agx::Component::getObjects ( ObjectPtrVector &  result,
bool  recursive 
) const
inherited

Definition at line 241 of file Component.h.

References agx::Component::getObjects().

Buffer* agxData::Buffer::getOrCreateGlobalOrderBuffer ( )
inherited
Buffer* agxData::Buffer::getOriginalBuffer ( )
inherited
const Buffer* agxData::Buffer::getOriginalBuffer ( ) const
inherited
agx::Path agx::Object::getPath ( const agx::Object *  root) const
inherited
Returns
A relative path from a specified root
Parameters
rootA node along the parent path from this object.
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
const agxData::Value::Event::CallbackType& agxData::Buffer::getReserveCallback ( ) const
inherited
const agxData::Value::Event::CallbackType& agxData::Buffer::getResizeCallback ( ) const
inherited
agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
A resource in the subtree below this object.

Referenced by agx::Object::getResource().

const agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited
template<typename T >
T * agx::Object::getResource ( const agx::Path &  path)
inherited

Definition at line 414 of file Object.h.

References agx::Object::getResource(), and agx::Referenced::is().

template<typename T >
const T * agx::Object::getResource ( const agx::Path &  path) const
inherited

Definition at line 421 of file Object.h.

virtual Object* agx::Component::getResourceImpl ( const Path &  path,
agx::Model *  model 
)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agxData::EntityStorage.

agx::UInt64 agxData::Buffer::getRevision ( ) const
inherited
Returns
The revision counter

Definition at line 464 of file Buffer.h.

References agxData::Buffer::m_revision.

agx::Object* agx::Object::getRootContext ( )
inherited
Returns
The root context.
const agx::Object* agx::Object::getRootContext ( ) const
inherited
EntityStorage * agxData::Buffer::getStorage ( )
inherited
Returns
The storage which the buffer is part of.

Definition at line 468 of file Buffer.h.

References agxData::Buffer::m_storage.

Referenced by agxData::Vector< T >::Vector().

const EntityStorage * agxData::Buffer::getStorage ( ) const
inherited

Definition at line 469 of file Buffer.h.

References agxData::Buffer::m_storage.

Type * agxData::Buffer::getType ( )
inherited
Returns
The type of the buffer.

Definition at line 474 of file Buffer.h.

References agxData::Buffer::m_format.

const Type * agxData::Buffer::getType ( ) const
inherited

Definition at line 475 of file Buffer.h.

References agxData::Buffer::m_format.

bool agxData::Buffer::hasListener ( EventListener *  listener)
inherited
bool agx::Object::hasParent ( const agx::Object *  node) const
inherited
Returns
True if the specified node is located somewhere in the path above the object.
void agxData::Buffer::initialize ( const agx::IndexRange &  range)
inherited

Initialize a range of elements.

static void agxData::Buffer::initializeElements ( Buffer *  buffer,
const agx::IndexRange &  range 
)
staticprotectedinherited
template<typename T >
bool agx::Referenced::is ( ) const
inherited
bool agx::Object::isUnique ( ) const
inherited

Definition at line 375 of file Object.h.

void* agxData::Buffer::kernelOverflowReallocation ( size_t  size)
inherited
static Component* agx::Component::load ( const String &  path,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( const String &  path,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( const Path &  path,
const Name &  implementation,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited
static Buffer* agxData::Buffer::load ( agx::TiXmlElement *  eBuffer,
agx::Device *  device 
)
staticinherited
T * agx::Object::load ( const String &  path,
Device *  device,
const String &  type = "",
size_t  instance = 0 
)
staticinherited

Definition at line 379 of file Object.h.

References agx::Object::load().

T * agx::Object::load ( const String &  path,
Device *  device,
const String &  type,
const String &  attribute,
const String &  value 
)
staticinherited

Definition at line 386 of file Object.h.

References agx::Object::load().

static void agx::Object::load ( const String &  path,
Device *  device,
ObjectPtrVector &  loadedObjects 
)
staticinherited
static TiXmlDocument agx::Object::openDocument ( const String &  path)
staticinherited
template<typename T >
T & agxData::BufferT< T >::operator[] ( size_t  index)

Definition at line 1026 of file Buffer.h.

template<typename T >
const T & agxData::BufferT< T >::operator[] ( size_t  index) const

Definition at line 1032 of file Buffer.h.

template<typename T >
void agxData::BufferT< T >::pop_back ( )

Definition at line 994 of file Buffer.h.

References agxAssert, and m_size.

void agxData::Buffer::presize ( size_t  size,
size_t  initialSize 
)
inherited
void agxData::Buffer::print ( ) const
inherited

Print the buffer.

void agxData::Buffer::print ( agx::IndexRange  range) const
inherited
void agxData::Buffer::print ( std::ostream &  stream) const
inherited
void agxData::Buffer::print ( std::ostream &  stream,
agx::IndexRange  range 
) const
inherited
virtual void agx::Component::printSubtree ( ) const
overridevirtualinherited

Reimplemented from agx::Object.

void agx::Component::printSubtree ( std::ostream &  stream,
int  depth = 0 
) const
inherited
T * agxData::Buffer::ptr ( )
inherited

Get access to the raw data buffer.

Definition at line 499 of file Buffer.h.

References agxData::Buffer::m_ptr.

Referenced by agxData::AbstractArray::sync().

const T * agxData::Buffer::ptr ( ) const
inherited

Definition at line 500 of file Buffer.h.

References agxData::Buffer::m_ptr.

template<typename T >
T* agxData::Buffer::ptr ( )
inherited
template<typename T >
const T* agxData::Buffer::ptr ( ) const
inherited
template<typename T >
void agxData::BufferT< T >::push_back ( const T &  value)

Definition at line 983 of file Buffer.h.

References agxData::Buffer::CAPACITY_MULTIPLIER, m_capacity, m_size, and agx::max().

virtual void agxData::Buffer::reallocate ( size_t  size)
protectedvirtualinherited

Reimplemented in agxGL::Buffer.

virtual void agx::Component::rebind ( )
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agx::Clock.

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

Referenced by agxData::Val< UInt >::Val().

void agxData::Buffer::registerSharedContainer ( agx::Container *  container)
inherited
void agx::Component::removeAllObjects ( )
inherited

Remove all components.

void agxData::Buffer::removeListener ( EventListener *  listener)
inherited
virtual void agx::Component::removeObject ( agx::Object *  object)
virtualinherited

Remove an object from the component.

void agx::Component::removeObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited

Remove an object with a specified name (and optional index) from the component.

void agxData::Buffer::reserve ( size_t  size)
inherited

Reserve space for future buffer expansion.

void agxData::Buffer::resize ( size_t  size,
bool  initializeElements = true 
)
inherited

Resize the buffer.

virtual void agx::Object::save ( TiXmlElement *  ) const
inlinevirtualinherited

Reimplemented in agx::Clock.

Definition at line 105 of file Object.h.

virtual void agx::Object::setContext ( agx::Object *  context)
virtualinherited

Reimplemented in agx::Task, and agxData::FunctionValue.

void agxData::Buffer::setDefaultValue ( agxData::Value *  value)
inherited

Set the default element value.

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

void agx::Component::setDevice ( Device *  device)
protectedinherited
void agxData::Buffer::setElementBuffer ( Buffer *  buffer)
inherited

Set the element buffer, internal use only.

void agxData::Buffer::setElementDestructor ( const RangeCallback &  callback)
inherited
void agxData::Buffer::setElementInitializer ( const RangeCallback &  callback)
inherited
static void agx::Object::setEnableRebind ( bool  flag)
staticinherited

Sets if rebinding of objects should be allowed (Right now a global setting).

Allowing it when adding larger parts to the system tree might hit performance, so it might be smarter to disable it first, then add, and then enable again.

void agx::Object::setId ( UInt32  id)
inherited
void agx::Object::setModel ( agx::Model *  model)
inherited

Set the object model (handled automatically).

void agx::Object::setName ( const agx::Name &  name)
inherited

Set the name of the object.

void agxData::Buffer::setRevision ( agx::UInt64  revision)
inherited
size_t agxData::Buffer::size ( ) const
inherited
Returns
The size of the buffer.

Definition at line 459 of file Buffer.h.

References agxData::Buffer::m_size.

Referenced by agx::ArrayParameter::getNumElements(), agxData::AbstractArray::init(), and agxData::AbstractArray::setRange().

virtual void agx::Component::snapshot ( TiXmlNode *  eParent,
const String &  directory 
) const
overridevirtualinherited

Reimplemented from agx::Object.

virtual void agxData::Buffer::snapshot ( agx::TiXmlNode *  eParent,
const agx::String &  directory 
) const
overridevirtualinherited
void agxData::Buffer::swapBackBuffer ( void *  backBuffer)
inherited
void agx::Component::traverse ( const TraverseCallback &  callback)
inherited
void agx::Component::traverse ( ComponentVisitor *  )
inherited
void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

void agxData::Buffer::unregisterSharedContainer ( agx::Container *  container)
inherited
template<typename T >
template<typename T2 >
bool agxData::BufferT< T >::ValidateCast ( const agx::Referenced *  object)
static

Definition at line 945 of file Buffer.h.

References agxData::Buffer::getFormat().

Member Data Documentation

ObjectEvent agx::Component::addObjectEvent
inherited

Definition at line 63 of file Component.h.

agx::UInt agxData::Buffer::ALIGNMENT
staticinherited

Definition at line 67 of file Buffer.h.

agx::Real agxData::Buffer::CAPACITY_MULTIPLIER
staticinherited
agxData::ValueRefT<agx::UInt> agxData::Buffer::capacityParameter
inherited

Definition at line 79 of file Buffer.h.

agx::ByteAllocator agxData::Buffer::m_allocator
protectedinherited

Definition at line 341 of file Buffer.h.

AbstractArray agxData::Buffer::m_array
protectedinherited

Definition at line 342 of file Buffer.h.

Referenced by agxData::Buffer::getArray().

Attribute* agxData::Buffer::m_attribute
protectedinherited

Definition at line 346 of file Buffer.h.

Referenced by agxData::Buffer::getAttribute().

size_t agxData::Buffer::m_capacity
protectedinherited

Definition at line 337 of file Buffer.h.

Referenced by agxData::Buffer::capacity().

agxData::ValueRef agxData::Buffer::m_defaultElementValue
protectedinherited

Definition at line 348 of file Buffer.h.

Referenced by agxData::Buffer::getDefaultValue().

RangeCallback agxData::Buffer::m_destructor
protectedinherited

Definition at line 358 of file Buffer.h.

agxData::BufferRef agxData::Buffer::m_elementBuffer
protectedinherited

Definition at line 349 of file Buffer.h.

Referenced by agxData::Buffer::getElementBuffer().

EventDispatch agxData::Buffer::m_eventDispatch
protectedinherited

Definition at line 355 of file Buffer.h.

FormatRef agxData::Buffer::m_format
protectedinherited
agxData::BufferRef agxData::Buffer::m_globalOrderBuffer
protectedinherited

Definition at line 350 of file Buffer.h.

Referenced by agxData::Buffer::getGlobalOrderBuffer().

agx::GlobalResultBuffer* agxData::Buffer::m_globalResult
protectedinherited

Definition at line 354 of file Buffer.h.

Referenced by agxData::Buffer::getGlobalResult().

bool agxData::Buffer::m_initElements
protectedinherited

Definition at line 343 of file Buffer.h.

RangeCallback agxData::Buffer::m_initializer
protectedinherited

Definition at line 357 of file Buffer.h.

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

agxData::Buffer* agxData::Buffer::m_originalBuffer
protectedinherited

Definition at line 362 of file Buffer.h.

void* agxData::Buffer::m_ptr
protectedinherited

Definition at line 340 of file Buffer.h.

Referenced by agxData::Buffer::getElement(), and agxData::Buffer::ptr().

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

agxData::Value::Event::CallbackType agxData::Buffer::m_reserveCallback
protectedinherited

Definition at line 353 of file Buffer.h.

agxData::Value::Event::CallbackType agxData::Buffer::m_resizeCallback
protectedinherited

Definition at line 352 of file Buffer.h.

agx::UInt64 agxData::Buffer::m_revision
protectedinherited

Definition at line 338 of file Buffer.h.

Referenced by agxData::Buffer::getRevision().

agx::Container* agxData::Buffer::m_sharedContainer
protectedinherited

Definition at line 351 of file Buffer.h.

agxData::ShareHandleRef agxData::Buffer::m_shareHandle
protectedinherited

Definition at line 361 of file Buffer.h.

size_t agxData::Buffer::m_size
protectedinherited

Definition at line 336 of file Buffer.h.

Referenced by agxData::Buffer::empty(), and agxData::Buffer::size().

EntityStorage* agxData::Buffer::m_storage
protectedinherited

Definition at line 345 of file Buffer.h.

Referenced by agxData::Buffer::getStorage().

bool agxData::Buffer::m_usedResizeMethod
protectedinherited

Definition at line 344 of file Buffer.h.

agx::UInt agxData::Buffer::MIN_BUFFER_CAPACITY
staticinherited

Definition at line 66 of file Buffer.h.

Event agxData::Buffer::reallocationEvent
inherited

Triggered when buffer is reallocated.

Definition at line 85 of file Buffer.h.

ObjectEvent agx::Component::removeObjectEvent
inherited

Definition at line 64 of file Component.h.

agxData::ValueRefT<agx::UInt> agxData::Buffer::sizeParameter
inherited

Definition at line 78 of file Buffer.h.


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