OverSim
NodeRecord Class Reference

#include <SimpleNodeEntry.h>

Inheritance diagram for NodeRecord:
BaseLocation

Public Member Functions

 NodeRecord ()
 ~NodeRecord ()
 NodeRecord (const NodeRecord &nodeRecord)
NodeRecordoperator= (const NodeRecord &nodeRecord)
bool operator== (const BaseLocation &rhs)
void debugOutput (int dim)
uint8_t getDim () const
- Public Member Functions inherited from BaseLocation
 BaseLocation ()
virtual ~BaseLocation ()

Static Public Member Functions

static void setDim (uint8_t dimension)

Public Attributes

double * coords

Static Public Attributes

static uint8_t dim

Detailed Description

Definition at line 39 of file SimpleNodeEntry.h.

Constructor & Destructor Documentation

NodeRecord::NodeRecord ( )

Definition at line 38 of file SimpleNodeEntry.cc.

{
coords = new double[dim];
}
NodeRecord::~NodeRecord ( )

Definition at line 43 of file SimpleNodeEntry.cc.

{
delete[] coords;
coords = NULL;
}
NodeRecord::NodeRecord ( const NodeRecord nodeRecord)

Definition at line 49 of file SimpleNodeEntry.cc.

{
coords = new double[dim];
for (uint32_t i = 0; i < dim; ++i)
coords[i] = nodeRecord.coords[i];
}

Member Function Documentation

void NodeRecord::debugOutput ( int  dim)
uint8_t NodeRecord::getDim ( ) const
inline

Definition at line 54 of file SimpleNodeEntry.h.

Referenced by SimpleNodeEntry::getDim(), and operator==().

{ return dim; };
NodeRecord & NodeRecord::operator= ( const NodeRecord nodeRecord)

Definition at line 56 of file SimpleNodeEntry.cc.

{
delete[] coords;
coords = new double[dim];
for (uint32_t i = 0; i < dim; ++i)
coords[i] = nodeRecord.coords[i];
return *this;
}
bool NodeRecord::operator== ( const BaseLocation rhs)
virtual

Implements BaseLocation.

Definition at line 67 of file SimpleNodeEntry.cc.

{
const NodeRecord* temp = dynamic_cast<const NodeRecord*>(&rhs);
if (this->getDim() != temp->getDim()) {
return false;
}
bool ret = true;
for (int i = 0; i < this->getDim(); i++) {
if (abs(this->coords[i] - temp->coords[i]) > 0.00000001){
ret = false;
}
}
return ret;
}
static void NodeRecord::setDim ( uint8_t  dimension)
inlinestatic

Member Data Documentation

uint8_t NodeRecord::dim
static

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