|
VMTK
|
Control allocation and memory footprint of item instances. More...
#include <vtkvmtkItems.h>
Public Types | |
| typedef vtkObject | Superclass |
Public Member Functions | |
| virtual int | IsA (const char *type) |
| vtkvmtkItems * | NewInstance () const |
| void | Allocate (vtkIdType numItems, vtkIdType ext=1000) |
| vtkvmtkItem * | GetItem (vtkIdType id) |
| void | Squeeze () |
| void | Reset () |
| void | Initialize () |
| void | ReleaseArray () |
| void | AllocateItem (vtkIdType i, vtkIdType itemType) |
| void | DeepCopy (vtkvmtkItems *src) |
| void | ShallowCopy (vtkvmtkItems *src) |
| virtual void | SetItemType (int) |
| virtual int | GetItemType () |
| void | SetNumberOfItems (vtkIdType numberOfItems) |
| vtkIdType | GetNumberOfItems () |
Static Public Member Functions | |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkItems * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| vtkvmtkItems () | |
| ~vtkvmtkItems () | |
| virtual vtkvmtkItem * | InstantiateNewItem (int itemType)=0 |
| vtkvmtkItem ** | Resize (vtkIdType sz) |
Protected Attributes | |
| vtkvmtkItem ** | Array |
| vtkIdType | Size |
| vtkIdType | MaxId |
| vtkIdType | Extend |
| int | ItemType |
Control allocation and memory footprint of item instances.
vtkvmtkItems is an abstract, reference-counted, resizable array of vtkvmtkItem pointers (modeled after VTK's own vtkCellArray/vtkPoints-style container classes). Allocate() creates and takes ownership of numItems items (each instantiated through the subclass-provided InstantiateNewItem() factory method), AllocateItem() replaces a single slot with a new item of a possibly different type, and Resize()/Squeeze() grow or shrink the backing array as needed. DeepCopy()/ShallowCopy() copy or share another collection's items. vtkvmtkDataSetItems is the concrete subclass used to hold one item per point of a vtkDataSet.
Definition at line 43 of file vtkvmtkItems.h.
| typedef vtkObject vtkvmtkItems::Superclass |
Definition at line 47 of file vtkvmtkItems.h.
|
inlineprotected |
Definition at line 114 of file vtkvmtkItems.h.
|
protected |
Definition at line 30 of file vtkvmtkItems.cxx.
|
static |
|
virtual |
Reimplemented in vtkvmtkDataSetItems, vtkvmtkNeighborhoods, and vtkvmtkStencils.
|
static |
|
protectedvirtual |
Reimplemented in vtkvmtkDataSetItems, vtkvmtkNeighborhoods, and vtkvmtkStencils.
| vtkvmtkItems * vtkvmtkItems::NewInstance | ( | ) | const |
|
virtual |
Set/get the item type (as understood by the subclass's InstantiateNewItem()) used by Allocate() to create new items.
|
virtual |
Set/get the item type (as understood by the subclass's InstantiateNewItem()) used by Allocate() to create new items.
| void vtkvmtkItems::Allocate | ( | vtkIdType | numItems, |
| vtkIdType | ext = 1000 ) |
Allocate the specified number of items (i.e., number of points) that will be built.
Definition at line 41 of file vtkvmtkItems.cxx.
|
inline |
|
inline |
Set/get the number of valid items in the collection (i.e. MaxId + 1). Setting this only moves the MaxId marker; it does not allocate or free storage.
Definition at line 73 of file vtkvmtkItems.h.
|
inline |
Set/get the number of valid items in the collection (i.e. MaxId + 1). Setting this only moves the MaxId marker; it does not allocate or free storage.
Definition at line 74 of file vtkvmtkItems.h.
| void vtkvmtkItems::Squeeze | ( | ) |
| void vtkvmtkItems::Reset | ( | ) |
Reset to a state of no entries without freeing the memory.
Definition at line 80 of file vtkvmtkItems.cxx.
| void vtkvmtkItems::Initialize | ( | ) |
Reset to a state of no entries freeing the memory.
Definition at line 85 of file vtkvmtkItems.cxx.
| void vtkvmtkItems::ReleaseArray | ( | ) |
Releases the stencil array.
Definition at line 67 of file vtkvmtkItems.cxx.
| void vtkvmtkItems::AllocateItem | ( | vtkIdType | i, |
| vtkIdType | itemType ) |
Replace the item at index i with a newly instantiated item of the given itemType, deleting the previous item at that index.
Definition at line 61 of file vtkvmtkItems.cxx.
| void vtkvmtkItems::DeepCopy | ( | vtkvmtkItems * | src | ) |
Standard DeepCopy method.
Definition at line 125 of file vtkvmtkItems.cxx.
| void vtkvmtkItems::ShallowCopy | ( | vtkvmtkItems * | src | ) |
Standard ShallowCopy method.
Definition at line 140 of file vtkvmtkItems.cxx.
|
protectedpure virtual |
Implemented in vtkvmtkNeighborhoods, and vtkvmtkStencils.
|
protected |
Definition at line 91 of file vtkvmtkItems.cxx.
|
protected |
Definition at line 119 of file vtkvmtkItems.h.
|
protected |
Definition at line 120 of file vtkvmtkItems.h.
|
protected |
Definition at line 121 of file vtkvmtkItems.h.
|
protected |
Definition at line 122 of file vtkvmtkItems.h.
|
protected |
Definition at line 125 of file vtkvmtkItems.h.