rasdaman complete source
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MDDObj Class Reference

#include <mddobj.hh>

Public Member Functions

void releaseTiles ()
 release all tiles from the index More...
 
StorageLayoutgetStorageLayout () const
 Return the storage layout of this object. More...
 
 MDDObj (const MDDBaseType *mddType, const r_Minterval &domain)
 
 MDDObj (const MDDBaseType *mddType, const r_Minterval &domain, const OId &newOId, const StorageLayout &ms) throw (r_Error)
 Creates a new persistent MDD object using preallocated OId {}. More...
 
 MDDObj (const DBMDDObjId &dbmddobj) throw (r_Error)
 Opens an existent transient/persistent MDD object. More...
 
 MDDObj (const OId &givenOId) throw (r_Error)
 Opens an existent persistent MDD object which has the OIdi { givenOId }. More...
 
 MDDObj (const MDDBaseType *mddType, const r_Minterval &domain, const StorageLayout &ms)
 
int getOId (OId *pOId) const
 
int getEOId (EOId *pEOId) const
 
void printStatus (unsigned int level=0, std::ostream &stream=std::cout) const
 Prints current status of the object. More...
 
void insertTile (Tile *newTile)
 Inserts new tile into the object. More...
 
void removeTile (Tile *&tileToRemove)
 
std::vector< Tile * > * intersect (const r_Minterval &searchInter) const
 Finds all tiles of the object which intersect searchInter. More...
 
std::vector< Tile * > * getTiles () const
 Returns all the tiles belonging to the object. More...
 
const char * pointQuery (const r_Point &searchPoint) const
 Gets the cell with coordinates { searchPoint} in the MDD. More...
 
char * pointQuery (const r_Point &searchPoint)
 Gets the cell with coordinates { searchPoint} in the MDD. More...
 
const MDDBaseTypegetMDDBaseType () const
 Returns the MDDBaseType of the object. More...
 
r_Minterval getDefinitionDomain () const
 Returns the domain of the object as it was given in the definition. More...
 
r_Minterval getCurrentDomain () const
 Returns the current domain for the object. More...
 
const char * getCellTypeName () const
 Get cell type name. More...
 
const BaseTypegetCellType () const
 Get base type. More...
 
r_Dimension getDimension () const
 Returns the dimensionality of the object. More...
 
bool isPersistent () const
 This method is used to get around a bug in the qlparser. More...
 
DBMDDObjId getDBMDDObjId () const
 Returns a pointer to the actual object in the base DBMS. More...
 
 ~MDDObj ()
 Destructor - frees dynamic memory. More...
 

Protected Member Functions

const r_MintervalcheckStorage (const r_Minterval &domain) throw (r_Error)
 does some consistency checks for regular tiling with rc index More...
 

Protected Attributes

DBMDDObjId myDBMDDObj
 The data class that holds all information. More...
 
MDDObjIxmyMDDIndex
 The index class that is used to access tile, before deleting thems. More...
 
StorageLayoutmyStorageLayout
 The storage class which is reponsible for the tiling. More...
 

Constructor & Destructor Documentation

MDDObj::MDDObj ( const MDDBaseType mddType,
const r_Minterval domain 
)
MDDObj::MDDObj ( const MDDBaseType mddType,
const r_Minterval domain,
const OId newOId,
const StorageLayout ms 
)
throw (r_Error
)

Creates a new persistent MDD object using preallocated OId {}.

Creates a new transient MDD object with definition domain { domain } and type ( mddType). The newly created object has no tiles.

MDDObj::MDDObj ( const DBMDDObjId dbmddobj)
throw (r_Error
)

Opens an existent transient/persistent MDD object.

Creates a new persistent MDD object with definition domaini { domain} and type ( mddType). The newly created object has no tiles. { } must have been previously allocated with { OIdIf::allocateOId() } Throws an exception if the object already exists or if the OId is not valid.

MDDObj::MDDObj ( const OId givenOId)
throw (r_Error
)

Opens an existent persistent MDD object which has the OIdi { givenOId }.

Throws an exception if the object does not exists.

MDDObj::MDDObj ( const MDDBaseType mddType,
const r_Minterval domain,
const StorageLayout ms 
)

Throws an exception if the object does not exists.

MDDObj::~MDDObj ( )

Destructor - frees dynamic memory.

Member Function Documentation

const r_Minterval& MDDObj::checkStorage ( const r_Minterval domain)
throw (r_Error
)
protected

does some consistency checks for regular tiling with rc index

const BaseType* MDDObj::getCellType ( ) const

Get base type.

const char* MDDObj::getCellTypeName ( ) const

Get cell type name.

r_Minterval MDDObj::getCurrentDomain ( ) const

Returns the current domain for the object.

DBMDDObjId MDDObj::getDBMDDObjId ( ) const

Returns a pointer to the actual object in the base DBMS.

r_Minterval MDDObj::getDefinitionDomain ( ) const

Returns the domain of the object as it was given in the definition.

r_Dimension MDDObj::getDimension ( ) const

Returns the dimensionality of the object.

int MDDObj::getEOId ( EOId pEOId) const

returns 0 if object has an OId.

const MDDBaseType* MDDObj::getMDDBaseType ( ) const

Returns the MDDBaseType of the object.

Returns null pointer if cell doesnt exist in the object.

int MDDObj::getOId ( OId pOId) const

Creates a new persistent MDD object with definition domain { domain}, storage layout { ms} and type { mddType}. The newly created object has no tiles.

StorageLayout* MDDObj::getStorageLayout ( ) const

Return the storage layout of this object.

std::vector< Tile* >* MDDObj::getTiles ( ) const

Returns all the tiles belonging to the object.

Returns a vector of pointers to the intersected tiles which belong to the MDDObj. The returned vector but not the tiles must be freed by the caller.

void MDDObj::insertTile ( Tile newTile)

Inserts new tile into the object.

After insertion of tiles in an MDDObj, the object becomes responsible for managing the memory allocated for the tiles inserted. Deallocation is done by the destructor of the index which is called in ~MDDObj. When new tiles are inserted in an MDDObj, the current domain for the object is updated. This information is kept in the index. Neither type nor domain compatibility is checked.

std::vector< Tile* >* MDDObj::intersect ( const r_Minterval searchInter) const

Finds all tiles of the object which intersect searchInter.

Removes tile from the object. This functon is not implemented yet. The methods which allow access to tiles of the MDDObj return pointers to tiles in the object, which continue being managed by the MDDObject. For that reason, the caller should not free the returned pointers to tiles.

bool MDDObj::isPersistent ( ) const

This method is used to get around a bug in the qlparser.

This method is used to get around a bug in the qlparser. Tells if object is persistent.

const char* MDDObj::pointQuery ( const r_Point searchPoint) const

Gets the cell with coordinates { searchPoint} in the MDD.

Returns a vector with all the tiles which belong to the MDDObj. The returned vector but not the tiles must be freed by the caller.

char* MDDObj::pointQuery ( const r_Point searchPoint)

Gets the cell with coordinates { searchPoint} in the MDD.

Returns null pointer if cell doesnt exist in the object.

void MDDObj::printStatus ( unsigned int  level = 0,
std::ostream &  stream = std::cout 
) const

Prints current status of the object.

returns 0 if object has an EOId.

void MDDObj::releaseTiles ( )

release all tiles from the index

void MDDObj::removeTile ( Tile *&  tileToRemove)

Member Data Documentation

DBMDDObjId MDDObj::myDBMDDObj
protected

The data class that holds all information.

MDDObjIx* MDDObj::myMDDIndex
protected

The index class that is used to access tile, before deleting thems.

StorageLayout* MDDObj::myStorageLayout
protected

The storage class which is reponsible for the tiling.


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