externalStorage-class {externalVector}R Documentation

Class "externalStorage", base class for external storage for objects of class "externalVectorWithStorage"

Description

The "externalStorage" class represents the base class of the storage backend implementation used by the class "externalVectorWithSToraghe". A pointer to the external storage allocated or accessed by an object of class "externalStorage" is kept in an external pointer.

Objects from the Class

A virtual Class: No objects may be created from it.

Slots

ptr:
Object of class "externalptr", keeps the pointer to the external storage.
type:
Object of class "vector", a vector object of length one representing the type of object stored in the external storage. Usually one of the basic R vector types.
length:
Object of class "integer", Cached value for the length of the vector stored in the external storage.

Extends

Class "externalResource", directly.

Methods

Signature components for the methods:

resource The class "externalStorage"
x The class "externalStorage"
ptr The class "externalptr"
size The class "ANY"
type The class "ANY"
allocator(resource):
The allocator to be used by default with this resource. Returns an object of class "gcAllocator".
getPointer(reource):
Return the ptr slot.
initializeResource(resource, ptr, size, type, ...):
Set the ptr slot of resource to ptr.
initialize(.Object, type = logical(1), length = as.integer(0)):
This checks the validity of type and length arguments and coerce the length argument to class "integer" before using them to set the corresponding slots. Finally a call to callNextMethod is made to use the initializer for class "externalResource" which, via a call to the initializeResource method above sets ptr slot.
internalType(x):
The type of object to be stored within the resource. It is an R basic vector type ("logical", "integer", "numeric", "complex", "character" or "list").
getNativeStorageMethods(x):
Get the "externalptr" stored in the "nativeStorageMethods" object associated with a particular subclass of "externalStorage" and a basic R vector type.

See Also

setExternalStorageClass for how to set a subclass of "externalStorage".

nativeStorageMethods-class for the C structure containing C function pointers for a particular storage methods class.

externalVectorWithStorage-class for how the "externalStorage" class is used.

simpleStorage-class for a simple implementation of "externalStorage".


[Package externalVector version 1.0.14 Index]