31 template <
class ScalarTypeT>
36 typedef ScalarTypeT ScalarType;
98 void operator=(
const vtkBuffer&) VTK_DELETE_FUNCTION;
101 template <
class ScalarT>
108 template <
typename ScalarT>
134 template <
typename ScalarT>
141 ScalarType* newArray =
142 static_cast<ScalarType*
>(malloc(size *
sizeof(ScalarType)));
154 template <
typename ScalarT>
157 if (newsize == 0) {
return this->
Allocate(0); }
162 ScalarType* newArray =
163 static_cast<ScalarType*
>(malloc(newsize *
sizeof(ScalarType)));
177 ScalarType* newArray =
static_cast<ScalarType*
>(
178 realloc(this->
Pointer, newsize *
sizeof(ScalarType)));
184 this->
Size = newsize;
static vtkBuffer< ScalarTypeT > * New()
vtkIdType GetSize() const
Return the number of elements the current buffer can hold.
const ScalarType * GetBuffer() const
abstract base class for most VTK objects
vtkTemplateTypeMacro(vtkBuffer< ScalarTypeT >, vtkObject) typedef ScalarTypeT ScalarType
internal storage class used by vtkSOADataArrayTemplate, vtkAOSDataArrayTemplate, and others...
ScalarType * GetBuffer()
Access the buffer as a scalar pointer.
bool Reallocate(vtkIdType newsize)
Allocate a new buffer that holds newsize elements.
bool Allocate(vtkIdType size)
Allocate a new buffer that holds size elements.
#define VTK_STANDARD_NEW_BODY(thisClass)
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))
void SetBuffer(ScalarType *array, vtkIdType size, bool save=false, int deleteMethod=VTK_DATA_ARRAY_FREE)
Set the memory buffer that this vtkBuffer object will manage.