Workspace 6.21.5
Public Member Functions | Static Public Member Functions | List of all members
ArrayNdSliceRegistry Class Reference

The registry for the various data slice factories. We register all of the types we want to support here, and then can easily create them using the createSlice function.

#include <DataAnalysis/DataStructures/arrayndslice.h>

Public Member Functions

ArrayNdSlicecreateSlice (const DataExecution::DataFactory &dataType)
 
void registerFactory (ArrayNdSliceFactory &factory)
 

Static Public Member Functions

static ArrayNdSliceRegistrygetInstance ()
 

Member Function Documentation

◆ createSlice()

ArrayNdSlice * createSlice ( const DataExecution::DataFactory dataType)
Parameters
dataTypeThe data type of the slice interface we want to create.
Returns
The ArrayNdSlice object that matches the type specified with dataType
Note
the caller is responsible for cleaning up the created object.

◆ getInstance()

ArrayNdSliceRegistry & getInstance ( )
static
Returns
the instance of the registry.

◆ registerFactory()

void registerFactory ( ArrayNdSliceFactory factory)
Parameters
factoryThe factory to register. If another factory associated with the same datatype (DataExecution::DataFactory) has already been registered, it will be replaced with the provided one.
Note
The registry does NOT take ownership of the factories. They are assumed to all be singleton classes.