ug4
ug::IAttachmentDataContainer Class Referenceabstract

the interface for an attachment-data-container. More...

#include <attachment_pipe.h>

+ Inheritance diagram for ug::IAttachmentDataContainer:

Public Member Functions

virtual void copy_data (size_t indFrom, size_t indTo)=0
 copy data from entry indFrom to entry indTo. More...
 
virtual void copy_to_container (IAttachmentDataContainer *pDestCon, int *indexMap, int num) const =0
 
virtual void defragment (size_t *pNewIndices, size_t numValidElements)=0
 
virtual size_t occupied_memory ()=0
 returns the size in bytes, which the container occupies More...
 
virtual void reset_entry (size_t index)=0
 resets the entry to its default value. More...
 
virtual void resize (size_t iSize)=0
 resize the data array More...
 
virtual size_t size ()=0
 returns the size of the data-array. More...
 
virtual ~IAttachmentDataContainer ()
 

Detailed Description

the interface for an attachment-data-container.

In order to use an attachment-data-container you have to supply several Typedefs. Take a look at the derived generic class AttachmentDataContainer<T> to see which typedefs and operations have to be supplied in addition to the interface-methods. if possible you should always use the derived generic class AttachmentDataContainer<T> instead creating inheriting your own version of IAttachedDataContainer.

Constructor & Destructor Documentation

◆ ~IAttachmentDataContainer()

virtual ug::IAttachmentDataContainer::~IAttachmentDataContainer ( )
inlinevirtual

Member Function Documentation

◆ copy_data()

virtual void ug::IAttachmentDataContainer::copy_data ( size_t  indFrom,
size_t  indTo 
)
pure virtual

copy data from entry indFrom to entry indTo.

Implemented in ug::AttachmentDataContainer< T >.

◆ copy_to_container()

virtual void ug::IAttachmentDataContainer::copy_to_container ( IAttachmentDataContainer pDestCon,
int *  indexMap,
int  num 
) const
pure virtual

copies entries from the this-container to the specified target container. For the i-th entry in the destination-container, pIndexMap has to contain the index of the associated source entry in this container. num specifies the number of entries to be copied. Make sure, that pDest can hold 'num' elements.

pDestCon has to have the same or a derived dynamic type as the container on which this method is called.

Implemented in ug::AttachmentDataContainer< T >.

Referenced by ug::Grid::copy_user_attachments().

◆ defragment()

virtual void ug::IAttachmentDataContainer::defragment ( size_t *  pNewIndices,
size_t  numValidElements 
)
pure virtual

defragment should clear the containers data from unused entries. pNewIndices should be an array of indices, wich holds a new index for each entry in IAttachedDataContainer. pNewIndices has thus to hold as many indices as there are entries in IAttachedDataContainer. If an entry shall not appear in the defragmented container, its new index has to be set to INVALID_ATTACHMENT_INDEX. numValidElements has to specify the size of the defragmented container - it thus has to equal the number of valid indices in pNewIndices.

Implemented in ug::AttachmentDataContainer< T >.

◆ occupied_memory()

virtual size_t ug::IAttachmentDataContainer::occupied_memory ( )
pure virtual

returns the size in bytes, which the container occupies

Mainly for debugging purposes.

Implemented in ug::AttachmentDataContainer< T >.

Referenced by ug::PrintAttachmentInfo().

◆ reset_entry()

virtual void ug::IAttachmentDataContainer::reset_entry ( size_t  index)
pure virtual

resets the entry to its default value.

Implemented in ug::AttachmentDataContainer< T >.

◆ resize()

virtual void ug::IAttachmentDataContainer::resize ( size_t  iSize)
pure virtual

resize the data array

Implemented in ug::AttachmentDataContainer< T >.

Referenced by ug::AttachmentPipe< TElem, TElemHandler >::attach().

◆ size()

virtual size_t ug::IAttachmentDataContainer::size ( )
pure virtual

returns the size of the data-array.

Implemented in ug::AttachmentDataContainer< T >.

Referenced by ug::Grid::copy_user_attachments().


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