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

#include <tile.hh>

Public Member Functions

const Tileoperator= (const Tile &cell)
 assignment operator (needed, as class uses dynamic memory). More...
 
 Tile (const r_Minterval &newDom, const BaseType *newType, DBTileId newBLOBTile)
 
 Tile (const Tile &tile)
 
 Tile (std::vector< Tile * > *tilesVec)
 constructs a TransTile joined out of the Tiles in { tilesVec}. More...
 
 Tile (std::vector< Tile * > *tilesVec, const r_Minterval &resDom)
 
 Tile (const Tile *projTile, const r_Minterval &projDom, const std::set< r_Dimension, std::less< r_Dimension > > *projDim)
 constructs Tile as projection of { projTile}. More...
 
 Tile (const r_Minterval &newDom, const BaseType *newType, r_Data_Format newFormat=r_Array)
 
 Tile (const r_Minterval &newDom, const BaseType *newType, char *newCells, r_Bytes newSize=0, r_Data_Format newFormat=r_Array)
 constructs a Tile with contents { newCells}. More...
 
 Tile (const r_Minterval &newDom, const BaseType *newType, const char *newCells, bool, r_Bytes newSize=0, r_Data_Format newFormat=r_Array)
 
void printStatus (unsigned int level=0, std::ostream &stream=std::cout) const
 printed output for testing. More...
 
void setPersistent (bool state=true)
 
std::vector< Tile * > * splitTile (r_Minterval resDom, int storageDomain=0)
 splits tile in vector of tiles of smaller size. More...
 
int scaleGetDomain (const r_Minterval &areaOp, const std::vector< double > &scaleFactors, r_Minterval &areaScaled)
 
virtual ~Tile ()
 virtual destructor. More...
 
virtual void copyTile (const r_Minterval &areaRes, const Tile *opTile, const r_Minterval &areaOp)
 copy a subcube from one tile to another More...
 
DBTileId getDBTile ()
 
const r_Minterval & getDomain () const
 returns the spatial domain of the tile. More...
 
const BaseTypegetType () const
 returns the BaseType of the tile. More...
 
r_Dimension getDimension () const
 returns the dimension of the tile. More...
 
r_Bytes getSize () const
 returns size of the (uncompressed) contents of the tile in chars. More...
 
r_Bytes getCompressedSize () const
 returns size of the contents of the tile as stored in chars. More...
 
r_Data_Format getDataFormat () const
 returns the format of the data maintained by the tile More...
 
bool isPersistent () const
 returns true for persistent instances. More...
 
bool isCompressed () const
 returns true if the contents are currently compressed and must be decompressed in order to be usefull More...
 
const char * getCell (r_Area index) const
 access to cell for reading (index is 1D) one cell length is basetype length. More...
 
char * getCell (r_Area index)
 access to cell for modifying (index is 1D). More...
 
void setCell (r_Area index, const char *newCell)
 set cell (index is 1D). More...
 
char * getCell (const r_Point &aPoint)
 access to a cell using an r_Point. More...
 
const char * getCell (const r_Point &aPoint) const
 access to a cell using an r_Point. More...
 
const char * getContents () const
 returns pointer to (uncompressed) contents of Tile. More...
 
char * getContents ()
 returns pointer to (uncompressed) contents of Tile. More...
 
void setContents (char *newContents)
 sets (uncompressed) contents of Tile. More...
 

Protected Member Functions

r_Bytes calcOffset (const r_Point &point) const
 calculate offset in cells More...
 

Protected Attributes

r_Minterval domain
 spatial domain of the tile. More...
 
const BaseTypetype
 pointer to base type for cells of Tile. More...
 
DBTileId blobTile
 Smart pointer to the persistent BLOBTile. More...
 
char * execCondenseOp (CondenseOp *myOp, const r_Minterval &areaOp)
 carries out condense function (const) More...
 
void execUnaryOp (UnaryOp *myOp, const r_Minterval &areaRes, const Tile *opTile, const r_Minterval &areaOp)
 carries out unary function with self as result. More...
 
void execBinaryOp (BinaryOp *myOp, const r_Minterval &areaRes, const Tile *op1Tile, const r_Minterval &areaOp1, const Tile *op2Tile, const r_Minterval &areaOp2)
 carries out binary function with self as result. More...
 
virtual void execConstOp (BinaryOp *myOp, const r_Minterval &areaRes, const Tile *opTile, const r_Minterval &areaOp, const char *cell, int constPos=1)
 carries out binary function with self as result. More...
 
virtual void execMarrayOp (MarrayOp *myOp, const r_Minterval &areaRes, const r_Minterval &areaOp)
 fills tile in area { areaRes} using MarrayOp { myOp}. More...
 
virtual void execScaleOp (const Tile *opTile, const r_Minterval &areaOp, const r_Point &origin, const std::vector< double > &scaleFactors)
 executes scaling operation. More...
 
static char * execGenCondenseOp (GenCondenseOp *myOp, const r_Minterval &areaOp)
 executes general condense operation { myOp} in area { areaOp} (const) More...
 

Constructor & Destructor Documentation

Tile::Tile ( const r_Minterval &  newDom,
const BaseType newType,
DBTileId  newBLOBTile 
)
Tile::Tile ( const Tile tile)
Tile::Tile ( std::vector< Tile * > *  tilesVec)

constructs a TransTile joined out of the Tiles in { tilesVec}.

Tile::Tile ( std::vector< Tile * > *  tilesVec,
const r_Minterval &  resDom 
)
Tile::Tile ( const Tile projTile,
const r_Minterval &  projDom,
const std::set< r_Dimension, std::less< r_Dimension > > *  projDim 
)

constructs Tile as projection of { projTile}.

Tile::Tile ( const r_Minterval &  newDom,
const BaseType newType,
r_Data_Format  newFormat = r_Array 
)
Tile::Tile ( const r_Minterval &  newDom,
const BaseType newType,
char *  newCells,
r_Bytes  newSize = 0,
r_Data_Format  newFormat = r_Array 
)

constructs a Tile with contents { newCells}.

Tile::Tile ( const r_Minterval &  newDom,
const BaseType newType,
const char *  newCells,
bool  ,
r_Bytes  newSize = 0,
r_Data_Format  newFormat = r_Array 
)
virtual Tile::~Tile ( )
virtual

virtual destructor.

Member Function Documentation

r_Bytes Tile::calcOffset ( const r_Point &  point) const
protected

calculate offset in cells

virtual void Tile::copyTile ( const r_Minterval &  areaRes,
const Tile opTile,
const r_Minterval &  areaOp 
)
virtual

copy a subcube from one tile to another

void Tile::execBinaryOp ( BinaryOp *  myOp,
const r_Minterval &  areaRes,
const Tile op1Tile,
const r_Minterval &  areaOp1,
const Tile op2Tile,
const r_Minterval &  areaOp2 
)

carries out binary function with self as result.

char* Tile::execCondenseOp ( CondenseOp *  myOp,
const r_Minterval &  areaOp 
)

carries out condense function (const)

virtual void Tile::execConstOp ( BinaryOp *  myOp,
const r_Minterval &  areaRes,
const Tile opTile,
const r_Minterval &  areaOp,
const char *  cell,
int  constPos = 1 
)
virtual

carries out binary function with self as result.

static char* Tile::execGenCondenseOp ( GenCondenseOp *  myOp,
const r_Minterval &  areaOp 
)
static

executes general condense operation { myOp} in area { areaOp} (const)

virtual void Tile::execMarrayOp ( MarrayOp *  myOp,
const r_Minterval &  areaRes,
const r_Minterval &  areaOp 
)
virtual

fills tile in area { areaRes} using MarrayOp { myOp}.

virtual void Tile::execScaleOp ( const Tile opTile,
const r_Minterval &  areaOp,
const r_Point &  origin,
const std::vector< double > &  scaleFactors 
)
virtual

executes scaling operation.

void Tile::execUnaryOp ( UnaryOp *  myOp,
const r_Minterval &  areaRes,
const Tile opTile,
const r_Minterval &  areaOp 
)

carries out unary function with self as result.

const char* Tile::getCell ( r_Area  index) const

access to cell for reading (index is 1D) one cell length is basetype length.

char* Tile::getCell ( r_Area  index)

access to cell for modifying (index is 1D).

char* Tile::getCell ( const r_Point &  aPoint)

access to a cell using an r_Point.

const char* Tile::getCell ( const r_Point &  aPoint) const

access to a cell using an r_Point.

r_Bytes Tile::getCompressedSize ( ) const

returns size of the contents of the tile as stored in chars.

const char* Tile::getContents ( ) const

returns pointer to (uncompressed) contents of Tile.

char* Tile::getContents ( )

returns pointer to (uncompressed) contents of Tile.

r_Data_Format Tile::getDataFormat ( ) const

returns the format of the data maintained by the tile

DBTileId Tile::getDBTile ( )
r_Dimension Tile::getDimension ( ) const

returns the dimension of the tile.

const r_Minterval& Tile::getDomain ( ) const

returns the spatial domain of the tile.

r_Bytes Tile::getSize ( ) const

returns size of the (uncompressed) contents of the tile in chars.

const BaseType* Tile::getType ( ) const

returns the BaseType of the tile.

bool Tile::isCompressed ( ) const

returns true if the contents are currently compressed and must be decompressed in order to be usefull

bool Tile::isPersistent ( ) const

returns true for persistent instances.

const Tile& Tile::operator= ( const Tile cell)

assignment operator (needed, as class uses dynamic memory).

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

printed output for testing.

int Tile::scaleGetDomain ( const r_Minterval &  areaOp,
const std::vector< double > &  scaleFactors,
r_Minterval &  areaScaled 
)

return spatial domain of result tile for scaling in areaScaled. return 0 if the result tile will be empty. (the same function, but with implicit origin (0,0,...0) and working fine!)

void Tile::setCell ( r_Area  index,
const char *  newCell 
)

set cell (index is 1D).

void Tile::setContents ( char *  newContents)

sets (uncompressed) contents of Tile.

void Tile::setPersistent ( bool  state = true)
std::vector<Tile*>* Tile::splitTile ( r_Minterval  resDom,
int  storageDomain = 0 
)

splits tile in vector of tiles of smaller size.

Member Data Documentation

DBTileId Tile::blobTile
protected

Smart pointer to the persistent BLOBTile.

r_Minterval Tile::domain
protected

spatial domain of the tile.

const BaseType* Tile::type
protected

pointer to base type for cells of Tile.


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