\name{externalStorage-class} \docType{class} \alias{externalStorage-class} \alias{allocator,externalStorage-method} \alias{getNativeStorageMethods,externalStorage-method} \alias{getPointer,externalStorage-method} \alias{initialize,externalStorage-method} \alias{initializeResource,externalStorage-method} \alias{internalType,externalStorage-method} \title{Class "externalStorage", base class for external storage for objects of class "externalVectorWithStorage" } \description{ The \code{"externalStorage"} class represents the base class of the storage backend implementation used by the class \code{"externalVectorWithSToraghe"}. A pointer to the external storage allocated or accessed by an object of class \code{"externalStorage"} is kept in an external pointer. } \section{Objects from the Class}{A virtual Class: No objects may be created from it.} \section{Slots}{ \describe{ \item{\code{ptr}:}{Object of class \code{"externalptr"}, keeps the pointer to the external storage. } \item{\code{type}:}{Object of class \code{"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. } \item{\code{length}:}{Object of class \code{"integer"}, Cached value for the length of the vector stored in the external storage. } } } \section{Extends}{ Class \code{"externalResource"}, directly. } \section{Methods}{ Signature components for the methods: \tabular{ll}{ resource \tab The class "externalStorage"\cr x \tab The class "externalStorage"\cr ptr \tab The class "externalptr"\cr size \tab The class "ANY"\cr type \tab The class "ANY"\cr } \describe{ \item{allocator(resource):}{ The allocator to be used by default with this \code{resource}. Returns an object of class \code{"gcAllocator"}. } \item{getPointer(reource):}{ Return the \code{ptr} slot. } \item{initializeResource(resource, ptr, size, type, \dots):}{ Set the \code{ptr} slot of resource to \code{ptr}. } \item{initialize(.Object, type = logical(1), length = as.integer(0)):}{ This checks the validity of \code{type} and \code{length} arguments and coerce the \code{length} argument to class \code{"integer"} before using them to set the corresponding slots. Finally a call to \code{callNextMethod} is made to use the initializer for class \code{"externalResource"} which, via a call to the \code{initializeResource} method above sets \code{ptr} slot. } \item{internalType(x):}{ The type of object to be stored within the resource. It is an \R basic vector type (\code{"logical"}, \code{"integer"}, \code{"numeric"}, \code{"complex"}, \code{"character"} or \code{"list"}). } \item{getNativeStorageMethods(x):}{ Get the \code{"externalptr"} stored in the \code{"nativeStorageMethods"} object associated with a particular subclass of \code{"externalStorage"} and a basic R vector type. } } } \seealso{ \code{\link{setExternalStorageClass}} for how to set a subclass of \code{"externalStorage"}. \code{\link{nativeStorageMethods-class}} for the C structure containing C function pointers for a particular storage methods class. \code{\link{externalVectorWithStorage-class}} for how the \code{"externalStorage"} class is used. \code{\link{simpleStorage-class}} for a simple implementation of \code{"externalStorage"}. } \keyword{classes}