rasdaman API
Public Types | Public Member Functions | List of all members
r_Marray< T > Class Template Reference

#include <marray.hh>

Inheritance diagram for r_Marray< T >:
r_GMarray r_Object

Public Types

typedef T(* r_InitFunction )(const r_Point &)
 function type for initialization function More...
 
- 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 }
 object types More...
 

Public Member Functions

 r_Marray () throw (r_Error)
 default constructor (no memory is allocated!) More...
 
 r_Marray (const r_Minterval &, r_Storage_Layout *stl=0) throw (r_Error)
 constructor for uninitialized MDD objects More...
 
 r_Marray (const r_Minterval &, const T &, r_Storage_Layout *stl=0) throw (r_Error)
 constructor for constant MDD objects More...
 
 r_Marray (const r_Minterval &, r_InitFunction, r_Storage_Layout *stl=0) throw (r_Error)
 constructor with initializing function More...
 
 r_Marray (const r_Marray< T > &) throw (r_Error)
 copy constructor More...
 
 r_Marray (r_GMarray &) throw (r_Error)
 constructor getting an object of type r_GMarray More...
 
virtual ~r_Marray ()
 destructor More...
 
const r_Marrayoperator= (const r_Marray &)
 assignment: cleanup + copy More...
 
r_Marray< T > operator[] (long) const throw (r_Eindex_violation)
 subscript operator for projection in the 1st dimension More...
 
r_Marray< T > operator[] (const r_Minterval &) const throw ( r_Edim_mismatch )
 subscript operator for restriction/extension combination More...
 
const T & operator[] (const r_Point &) const throw (r_Edim_mismatch, r_Eindex_violation)
 subscript operator for read access of a cell More...
 
T & operator[] (const r_Point &) throw (r_Edim_mismatch, r_Eindex_violation)
 subscript operator for write access of a cell More...
 
 operator T () throw ( r_Eno_cell )
 cast operator for converting to base type for cell access More...
 
virtual void print_status (std::ostream &s=cout) const
 writes the state of the object to the specified stream More...
 
- Public Member Functions inherited from r_GMarray
 r_GMarray () throw (r_Error)
 default constructor (no memory is allocated!) More...
 
 r_GMarray (const r_Minterval &init_domain, r_Bytes type_length, r_Storage_Layout *stl=0) throw (r_Error)
 constructor for uninitialized MDD objects More...
 
 r_GMarray (const r_GMarray &) throw (r_Error)
 copy constructor More...
 
 r_GMarray (r_GMarray &) throw (r_Error)
 constructor which doesn't copy the data More...
 
virtual ~r_GMarray ()
 destructor More...
 
virtual void r_deactivate ()
 it is called when an object leaves transient memory (internal use only) More...
 
const r_GMarrayoperator= (const r_GMarray &)
 assignment: cleanup + copy More...
 
const char * operator[] (const r_Point &) const throw (r_Edim_mismatch, r_Eindex_violation)
 subscript operator for read access of a cell More...
 
r_GMarrayintersect (r_Minterval where) const
 Returns a r_GMarray that is the intersection of the current domain with the specified interval. More...
 
void print_status (std::ostream &s, int hexoutput) const
 writes the state of the object to the specified stream More...
 
const r_Storage_Layoutget_storage_layout () const
 gets a pointer to the storage layout object More...
 
const r_Mintervalspatial_domain () const
 getting the spatial domain More...
 
char * get_array ()
 get the internal representation of the array More...
 
const char * get_array () const
 get the internal representation of the array for reading More...
 
r_Bytes get_array_size () const
 get size of internal array representation in byets More...
 
r_Bytes get_type_length () const
 get length of cell type in bytes More...
 
r_Data_Format get_current_format () const
 get current data format More...
 
const r_Base_Typeget_base_type_schema ()
 get base type schema More...
 
void set_storage_layout (r_Storage_Layout *) throw (r_Error)
 sets the storage layout object and checks compatibility with the domain More...
 
void set_spatial_domain (const r_Minterval &domain)
 set spatial domain More...
 
void set_array (char *)
 set the internal representation of the array More...
 
void set_array_size (r_Bytes)
 set size of internal memory representation in bytes More...
 
void set_type_length (r_Bytes)
 set length of cell type in bytes More...
 
void set_current_format (r_Data_Format)
 set current data format More...
 
virtual void insert_obj_into_db ()
 inserts an object into the database More...
 
void insert_obj_into_db (const char *collName)
 insert myself into a specific collection in the database More...
 
- Public Member Functions inherited from r_Object
 r_Object ()
 default constructor More...
 
 r_Object (unsigned short objType) throw (r_Error)
 constructor getting objType More...
 
 r_Object (const r_Object &, unsigned short objType=0) throw (r_Error)
 copy constructor More...
 
virtual ~r_Object ()
 virtual destructor More...
 
void mark_modified ()
 mark the object as modified More...
 
void * operator new (size_t size)
 new operator for transient objects More...
 
void * operator new (size_t size, r_Database *database, const char *type_name=0)
 new operator for persistent objects More...
 
void * operator new (size_t size, const char *type_name)
 new operator for transient objects carrying type information More...
 
void operator delete (void *obj_ptr)
 delete operator More...
 
void set_type_by_name (const char *name) throw (r_Error)
 set object type by name More...
 
void set_type_structure (const char *name) throw (r_Error)
 set object type by name More...
 
const char * get_type_name () const
 get object type name More...
 
const char * get_type_structure () const
 get object type structure More...
 
const r_OIdget_oid () const
 get oid More...
 
const r_Typeget_type_schema ()
 get type schema More...
 
void set_type_schema (const r_Type *type) throw (r_Error)
 
virtual void update_obj_in_db ()
 updates an object in database More...
 
virtual void load_obj_from_db ()
 load an object from the database More...
 
void delete_obj_from_db ()
 deletes an object from the database More...
 
void initialize_oid (const r_OId &initOId)
 initialize oid of the object More...
 
virtual void r_activate ()
 it is called when an object comes into transient memory More...
 
int test_status (ObjectStatus status)
 test object status returns 1 if it matches More...
 
ObjectStatus get_status () const
 gets the status of the object More...
 
void set_object_name (const char *name) throw (r_Error)
 set object name. object name should contain only [a-zA-Z0-9_] More...
 
const char * get_object_name () const
 get object name More...
 
void * operator new (size_t size, r_Database *database, ObjectStatus status, const r_OId &oid)
 new operator for activating an object (status = read) More...
 

Additional Inherited Members

- Protected Member Functions inherited from r_Object
int test_type (ObjectType type)
 test object type returns 1 if it matches More...
 
- Protected Attributes inherited from r_GMarray
r_Minterval domain
 spatial domain More...
 
char * data
 pointer to the internal array representation More...
 
r_Bytes data_size
 size of internal array representation in bytes More...
 
r_Bytes type_length
 length of the cell base type in bytes More...
 
r_Data_Format current_format
 store current data format More...
 
r_Storage_Layoutstorage_layout
 pointer to storage layout object More...
 
- Protected Attributes inherited from r_Object
char * object_name
 stores object name if it has one More...
 
char * type_name
 stores object type name if it has one More...
 
char * type_structure
 store type structure as string if it has one More...
 
r_Typetype_schema
 pointer to type schema (built on request) More...
 
unsigned short internal_obj_type
 internal object type (1 marray, 2 collection) More...
 

Member Typedef Documentation

template<class T >
typedef T(* r_Marray< T >::r_InitFunction)(const r_Point &)

function type for initialization function

Constructor & Destructor Documentation

template<class T >
r_Marray< T >::r_Marray ( )
throw (r_Error
)

default constructor (no memory is allocated!)

template<class T >
r_Marray< T >::r_Marray ( const r_Minterval ,
r_Storage_Layout stl = 0 
)
throw (r_Error
)

constructor for uninitialized MDD objects

template<class T >
r_Marray< T >::r_Marray ( const r_Minterval ,
const T &  ,
r_Storage_Layout stl = 0 
)
throw (r_Error
)

constructor for constant MDD objects

If a storage layout pointer is provided, the object refered to is taken and memory control moves to the {r_Marray} class. The user has to take care, that each creation of {r_Marray} objects get a new storage layout object.

template<class T >
r_Marray< T >::r_Marray ( const r_Minterval ,
r_InitFunction  ,
r_Storage_Layout stl = 0 
)
throw (r_Error
)

constructor with initializing function

If a storage layout pointer is provided, the object refered to is taken and memory control moves to the {r_Marray} class. The user has to take care, that each creation of {r_Marray} objects get a new storage layout object.

template<class T >
r_Marray< T >::r_Marray ( const r_Marray< T > &  )
throw (r_Error
)

copy constructor

If a storage layout pointer is provided, the object refered to is taken and memory control moves to the {r_Marray} class. The user has to take care, that each creation of {r_Marray} objects get a new storage layout object.

template<class T >
r_Marray< T >::r_Marray ( r_GMarray )
throw (r_Error
)

constructor getting an object of type r_GMarray

template<class T >
virtual r_Marray< T >::~r_Marray ( )
virtual

destructor

Member Function Documentation

template<class T >
r_Marray< T >::operator T ( )
throw (r_Eno_cell
)

cast operator for converting to base type for cell access

template<class T >
const r_Marray& r_Marray< T >::operator= ( const r_Marray< T > &  )

assignment: cleanup + copy

template<class T >
r_Marray<T> r_Marray< T >::operator[] ( long  ) const
throw (r_Eindex_violation
)

subscript operator for projection in the 1st dimension

template<class T >
r_Marray<T> r_Marray< T >::operator[] ( const r_Minterval ) const
throw (r_Edim_mismatch
)

subscript operator for restriction/extension combination

template<class T >
const T& r_Marray< T >::operator[] ( const r_Point ) const
throw (r_Edim_mismatch,
r_Eindex_violation
)

subscript operator for read access of a cell

template<class T >
T& r_Marray< T >::operator[] ( const r_Point )
throw (r_Edim_mismatch,
r_Eindex_violation
)

subscript operator for write access of a cell

template<class T >
virtual void r_Marray< T >::print_status ( std::ostream &  s = cout) const
virtual

writes the state of the object to the specified stream

Reimplemented from r_GMarray.


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