rasdaman client API 10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Member Functions | Protected Attributes | List of all members
r_GMarray Class Reference

The class represents a generic MDD in the sense that it is independent of the cell base type. More...

#include <gmarray.hh>

Inheritance diagram for r_GMarray:
r_Object r_Marray< T >

Public Member Functions

 r_GMarray (r_Transaction *transaction=NULL)
 default constructor (no memory is allocated!)
 
 r_GMarray (const r_Minterval &init_domain, r_Bytes type_length, r_Storage_Layout *stl=0, r_Transaction *transaction=NULL, bool initialize=true)
 constructor for uninitialized MDD objects
 
 r_GMarray (const r_GMarray &)
 If a storage layout pointer is provided, the object refered to is taken and memory control moves to the r_GMarray class.
 
 r_GMarray (r_GMarray &)
 constructor which doesn't copy the data
 
virtual ~r_GMarray ()
 destructor
 
virtual void r_deactivate ()
 it is called when an object leaves transient memory (internal use only)
 
r_GMarrayoperator= (const r_GMarray &)
 assignment: cleanup + copy
 
const char * operator[] (const r_Point &) const
 subscript operator for read access of a cell.
 
r_GMarrayintersect (const r_Minterval &where) const
 Returns a r_GMarray that is the intersection of the current domain with the specified interval.
 
const r_Storage_Layoutget_storage_layout () const
 gets a pointer to the storage layout object
 
const r_Mintervalspatial_domain () const
 getting the spatial domain
 
char * get_array ()
 get the internal representation of the array
 
const char * get_array () const
 get the internal representation of the array for reading
 
r_Set< r_GMarray * > * get_tiled_array ()
 get the internal representation of the array
 
const r_Set< r_GMarray * > * get_tiled_array () const
 get the internal representation of the array for reading
 
r_Bytes get_array_size () const
 get size of internal array representation in byets
 
r_Bytes get_type_length () const
 get length of cell type in bytes
 
r_Data_Format get_current_format () const
 get current data format
 
const r_Base_Typeget_base_type_schema ()
 get base type schema
 
r_Band_Iterator get_band_iterator (unsigned int band)
 get a band iterator
 
r_Band_Linearization get_band_linearization () const
 
r_Cell_Linearization get_cell_linearization () const
 
void set_storage_layout (r_Storage_Layout *)
 sets the storage layout object and checks compatibility with the domain
 
void set_spatial_domain (const r_Minterval &domain)
 set spatial domain
 
void set_array (char *)
 set the internal representation of the array
 
void set_tiled_array (r_Set< r_GMarray * > *newData)
 set the internal representation of the array
 
void set_array_size (r_Bytes)
 set size of internal memory representation in bytes
 
void set_type_length (r_Bytes)
 set length of cell type in bytes
 
void set_current_format (r_Data_Format)
 set current data format
 
void set_band_linearization (r_Band_Linearization)
 set band linearization to pixel-interleaved or channel-interleaved in case of multi-band array
 
void set_cell_linearization (r_Cell_Linearization)
 set cell linearization. Only ColumnMajor is supported currently.
 
virtual void insert_obj_into_db ()
 inserts an object into the database
 
void insert_obj_into_db (const char *collName)
 insert myself into a specific collection in the database
 
virtual void print_status (std::ostream &s)
 writes the state of the object to the specified stream
 
void print_status (std::ostream &s, int hexoutput)
 writes the state of the object to the specified stream
 
- Public Member Functions inherited from r_Object
 r_Object (r_Transaction *transaction=NULL)
 default constructor
 
 r_Object (unsigned short objType, r_Transaction *transaction=NULL)
 constructor getting objType
 
 r_Object (const r_Object &, unsigned short objType=0, r_Transaction *transaction=NULL)
 objType specifies the type of the object (1=Marray, 2=Collection).
 
virtual ~r_Object ()
 objType specifies the type of the object (1=Marray, 2=Collection).
 
void mark_modified ()
 mark the object as modified
 
void * operator new (size_t size)
 new operator for transient objects
 
void * operator new (size_t size, r_Database *database, const char *type_name=0)
 new operator for persistent objects
 
void * operator new (size_t size, const char *type_name)
 new operator for transient objects carrying type information
 
void operator delete (void *obj_ptr)
 delete operator
 
void set_type_by_name (const char *name)
 set object type by name
 
void set_type_structure (const char *name)
 With this method a type name has to be given by the user for each object which he wants to make persistent.
 
const char * get_type_name () const
 get object type name
 
const char * get_type_structure () const
 get object type structure
 
const r_OIdget_oid () const
 get oid
 
const r_Typeget_type_schema ()
 get type schema. returns NULL in case of error
 
void set_type_schema (const r_Type *type)
 
virtual void update_obj_in_db ()
 updates an object in database
 
virtual void load_obj_from_db ()
 load an object from the database
 
void delete_obj_from_db ()
 deletes an object from the database
 
void initialize_oid (const r_OId &initOId)
 initialize oid of the object
 
virtual void r_activate ()
 it is called when an object comes into transient memory
 
bool test_status (ObjectStatus status)
 test object status returns 1 if it matches
 
ObjectStatus get_status () const
 gets the status of the object
 
void set_object_name (const char *name)
 set object name. object name should contain only [a-zA-Z0-9_]
 
const char * get_object_name () const
 get object name
 
void * operator new (size_t size, r_Database *database, ObjectStatus status, const r_OId &oid)
 new operator for activating an object (status = read)
 
r_Transactionget_transaction () const
 

Protected Attributes

r_Minterval domain
 spatial domain
 
char * data {NULL}
 pointer to the internal array representation
 
r_Set< r_GMarray * > * tiled_data {NULL}
 array internally sub-tiled
 
r_Bytes data_size {}
 size of internal array representation in bytes
 
r_Bytes type_length {}
 length of the cell base type in bytes
 
r_Data_Format current_format {r_Array}
 store current data format
 
r_Storage_Layoutstorage_layout {NULL}
 pointer to storage layout object
 
r_Band_Linearization band_linearization {r_Band_Linearization::PixelInterleaved}
 relevant if data has multiple bands (channels) of data
 
r_Cell_Linearization cell_linearization {r_Cell_Linearization::ColumnMajor}
 cell linearization.
 
- Protected Attributes inherited from r_Object
char * object_name {0}
 stores object name if it has one
 
char * type_name {0}
 stores object type name if it has one
 
char * type_structure {0}
 store type structure as string if it has one
 
r_Typetype_schema {0}
 pointer to type schema (built on request)
 
unsigned short internal_obj_type {0}
 internal object type (1 marray, 2 collection)
 
r_Transactiontransaction {NULL}
 pointer to the transaction this object belongs to.
 

Additional Inherited Members

- Public Types inherited from r_Object
enum  ObjectStatus {
  no_status , deleted , created , modified ,
  read , transient
}
 object life status More...
 
enum  ObjectType { no_object , persistent_object , transient_object }
 created - The object was created in the current transaction and has to be stored in the database. More...
 
- Protected Member Functions inherited from r_Object
void update_transaction ()
 resets to the global r_Transaction::actual_transaction if necessary
 
bool test_type (ObjectType type)
 test object type returns 1 if it matches
 

Detailed Description

The class represents a generic MDD in the sense that it is independent of the cell base type.

The only information available is the length in bytes of the base type. More specific MDDs including base type information for more type safety are represented by the template subclass r_Marray. Class r_Marray provides a constructor to convert to the base type specific class.

Constructor & Destructor Documentation

◆ r_GMarray() [1/4]

r_GMarray::r_GMarray ( r_Transaction transaction = NULL)

default constructor (no memory is allocated!)

◆ r_GMarray() [2/4]

r_GMarray::r_GMarray ( const r_Minterval init_domain,
r_Bytes  type_length,
r_Storage_Layout stl = 0,
r_Transaction transaction = NULL,
bool  initialize = true 
)

constructor for uninitialized MDD objects

◆ r_GMarray() [3/4]

r_GMarray::r_GMarray ( const r_GMarray )

If a storage layout pointer is provided, the object refered to is taken and memory control moves to the r_GMarray class.

The user has to take care, that each creation of r_GMarray objects get a new storage layout object. r_Error is throw if the storage layout does not fit the type length or the dimension of the init domain and when the dimension of the domain is 0 (uninitialised). copy constructor

◆ r_GMarray() [4/4]

r_GMarray::r_GMarray ( r_GMarray )

constructor which doesn't copy the data

◆ ~r_GMarray()

virtual r_GMarray::~r_GMarray ( )
virtual

destructor

Member Function Documentation

◆ get_array() [1/2]

char * r_GMarray::get_array ( )

get the internal representation of the array

◆ get_array() [2/2]

const char * r_GMarray::get_array ( ) const

get the internal representation of the array for reading

◆ get_array_size()

r_Bytes r_GMarray::get_array_size ( ) const

get size of internal array representation in byets

◆ get_band_iterator()

r_Band_Iterator r_GMarray::get_band_iterator ( unsigned int  band)

get a band iterator

◆ get_band_linearization()

r_Band_Linearization r_GMarray::get_band_linearization ( ) const
Returns
band linearization, relevant in case of multi-band array

◆ get_base_type_schema()

const r_Base_Type * r_GMarray::get_base_type_schema ( )

get base type schema

◆ get_cell_linearization()

r_Cell_Linearization r_GMarray::get_cell_linearization ( ) const
Returns
cell linearization

◆ get_current_format()

r_Data_Format r_GMarray::get_current_format ( ) const

get current data format

◆ get_storage_layout()

const r_Storage_Layout * r_GMarray::get_storage_layout ( ) const

gets a pointer to the storage layout object

◆ get_tiled_array() [1/2]

r_Set< r_GMarray * > * r_GMarray::get_tiled_array ( )

get the internal representation of the array

◆ get_tiled_array() [2/2]

const r_Set< r_GMarray * > * r_GMarray::get_tiled_array ( ) const

get the internal representation of the array for reading

◆ get_type_length()

r_Bytes r_GMarray::get_type_length ( ) const

get length of cell type in bytes

◆ insert_obj_into_db() [1/2]

virtual void r_GMarray::insert_obj_into_db ( )
virtual

inserts an object into the database

Implements r_Object.

◆ insert_obj_into_db() [2/2]

void r_GMarray::insert_obj_into_db ( const char *  collName)
virtual

insert myself into a specific collection in the database

Implements r_Object.

◆ intersect()

r_GMarray * r_GMarray::intersect ( const r_Minterval where) const

Returns a r_GMarray that is the intersection of the current domain with the specified interval.

◆ operator=()

r_GMarray & r_GMarray::operator= ( const r_GMarray )

assignment: cleanup + copy

◆ operator[]()

const char * r_GMarray::operator[] ( const r_Point ) const

subscript operator for read access of a cell.

Not supported on channel-interleaved arrays, use r_Band_Iterator in that case.

◆ print_status() [1/2]

virtual void r_GMarray::print_status ( std::ostream &  s)
virtual

writes the state of the object to the specified stream

Reimplemented in r_Marray< T >.

◆ print_status() [2/2]

void r_GMarray::print_status ( std::ostream &  s,
int  hexoutput 
)

writes the state of the object to the specified stream

◆ r_deactivate()

virtual void r_GMarray::r_deactivate ( )
virtual

it is called when an object leaves transient memory (internal use only)

Reimplemented from r_Object.

◆ set_array()

void r_GMarray::set_array ( char *  )

set the internal representation of the array

◆ set_array_size()

void r_GMarray::set_array_size ( r_Bytes  )

set size of internal memory representation in bytes

◆ set_band_linearization()

void r_GMarray::set_band_linearization ( r_Band_Linearization  )

set band linearization to pixel-interleaved or channel-interleaved in case of multi-band array

◆ set_cell_linearization()

void r_GMarray::set_cell_linearization ( r_Cell_Linearization  )

set cell linearization. Only ColumnMajor is supported currently.

◆ set_current_format()

void r_GMarray::set_current_format ( r_Data_Format  )

set current data format

◆ set_spatial_domain()

void r_GMarray::set_spatial_domain ( const r_Minterval domain)

set spatial domain

◆ set_storage_layout()

void r_GMarray::set_storage_layout ( r_Storage_Layout )

sets the storage layout object and checks compatibility with the domain

◆ set_tiled_array()

void r_GMarray::set_tiled_array ( r_Set< r_GMarray * > *  newData)

set the internal representation of the array

◆ set_type_length()

void r_GMarray::set_type_length ( r_Bytes  )

set length of cell type in bytes

◆ spatial_domain()

const r_Minterval & r_GMarray::spatial_domain ( ) const

getting the spatial domain

Member Data Documentation

◆ band_linearization

r_Band_Linearization r_GMarray::band_linearization {r_Band_Linearization::PixelInterleaved}
protected

relevant if data has multiple bands (channels) of data

◆ cell_linearization

r_Cell_Linearization r_GMarray::cell_linearization {r_Cell_Linearization::ColumnMajor}
protected

cell linearization.

Note: only ColumnMajor supported currently.

◆ current_format

r_Data_Format r_GMarray::current_format {r_Array}
protected

store current data format

◆ data

char* r_GMarray::data {NULL}
protected

pointer to the internal array representation

◆ data_size

r_Bytes r_GMarray::data_size {}
protected

size of internal array representation in bytes

◆ domain

r_Minterval r_GMarray::domain
protected

spatial domain

◆ storage_layout

r_Storage_Layout* r_GMarray::storage_layout {NULL}
protected

pointer to storage layout object

◆ tiled_data

r_Set<r_GMarray *>* r_GMarray::tiled_data {NULL}
protected

array internally sub-tiled

◆ type_length

r_Bytes r_GMarray::type_length {}
protected

length of the cell base type in bytes


The documentation for this class was generated from the following file: