MineLink
 All Data Structures Functions Variables Pages
delphos::Block Class Reference

A utility class to access blocks individually. More...

#include <blockmodel.h>

Inheritance diagram for delphos::Block:
Inheritance graph
Collaboration diagram for delphos::Block:
Collaboration graph

Public Member Functions

double X () const
 Retrieves the \(x\) coordinate of the block. More...
 
double Y () const
 Retrieves the \(y\) coordinate of the block. More...
 
double Z () const
 Retrieves the \(z\) coordinate of the block. More...
 
double GetX () const
 Retrieves the \(x\) coordinate of the block. More...
 
double GetY () const
 Retrieves the \(y\) coordinate of the block. More...
 
double GetZ () const
 Retrieves the \(z\) coordinate of the block. More...
 
double GetValue (const string &column) const
 Retrieves the value of an attribute of the block. More...
 
void SetValue (const string &column, const double &value)
 Sets the value of an attribute of the block. More...
 
delphos::Coordinates GetCoordinates () const
 Retrieves the coordinates of the block. More...
 
double operator[] (const string &column) const
 Retrieves the value of an attribute of the block. More...
 
delphos::BlockIndexType Index () const
 Retrieves the index (position) of the block in the BlockModel. More...
 
delphos::BlockIndexType GetIndex () const
 Retrieves the index (position) of the block in the block model. More...
 
- Public Member Functions inherited from delphos::BlockModelEntity
 BlockModelEntity (delphos::BlockModel &bm)
 Creates a new block instance associated to a given block model. More...
 
delphos::BlockModelGetBlockModel ()
 Retrieves the block model to which the entity is associated. More...
 
const delphos::BlockModelGetBlockModel () const
 Retrieves the block model to which the entity is associated. More...
 

Friends

class BlockModel
 

Detailed Description

A utility class to access blocks individually.

This class allows to treat blocks individually, useful for syntax simplicity.

Member Function Documentation

Coordinates delphos::Block::GetCoordinates ( ) const

Retrieves the coordinates of the block.

Returns
A Coordinates instance containing the spatial coordinates values of the block.
BlockIndexType delphos::Block::GetIndex ( ) const

Retrieves the index (position) of the block in the block model.

Returns
The index (position) of the block in the BlockModel (from 0 to Size()-1).
double delphos::Block::GetValue ( const string &  column) const

Retrieves the value of an attribute of the block.

Parameters
columnThe name of the attribute to be retrieved.
Returns
The value of the given attribute for the block.

If the aatribute column is not found, an exception is thrown.

double delphos::Block::GetX ( ) const

Retrieves the \(x\) coordinate of the block.

Returns
The \(x\) spatial coordinate value of the block.
double delphos::Block::GetY ( ) const

Retrieves the \(y\) coordinate of the block.

Returns
The \(y\) spatial coordinate value of the block.
double delphos::Block::GetZ ( ) const

Retrieves the \(z\) coordinate of the block.

Returns
The \(z\) spatial coordinate value of the block.
BlockIndexType delphos::Block::Index ( ) const

Retrieves the index (position) of the block in the BlockModel.

Deprecated:
See Block::GetIndex()
Returns
The index (position) of the block in the BlockModel (from 0 to Size()-1).
double delphos::Block::operator[] ( const string &  column) const

Retrieves the value of an attribute of the block.

Parameters
columnThe name of the attribute to be retrieved.
Returns
The value of the given attribute for the block.

This is a shortcut for Block::GetValue(const string & column)

void delphos::Block::SetValue ( const string &  column,
const double &  value 
)

Sets the value of an attribute of the block.

Parameters
columnThe name of the attribute to be set.
valueThe new value for the attribute.

If the attribute column is not found, an exception is thrown.

double delphos::Block::X ( ) const

Retrieves the \(x\) coordinate of the block.

Deprecated:
See Block::GetX()
Returns
The \(x\) spatial coordinate value of the block.
double delphos::Block::Y ( ) const

Retrieves the \(y\) coordinate of the block.

Deprecated:
See Block::GetY()
Returns
The \(y\) spatial coordinate value of the block.
double delphos::Block::Z ( ) const

Retrieves the \(z\) coordinate of the block.

Deprecated:
See Block::GetZ()
Returns
The \(z\) spatial coordinate value of the block.

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