afl::ddf::Property Class Reference

#include <property.h>

List of all members.

Public Types

typedef PropertyIterator iterator

Public Member Functions

 Property (PropertySet *parent)
 Property (const Property &toCopy)
Propertyoperator= (const Property &toCopy)
 ~Property ()
void init (size_t rows=1, size_t cols=1, size_t epochs=1)
void resize (size_t rows=1, size_t cols=1, size_t epochs=1)
void resize (const Geometry *geom)
const GeometrygetGeometry () const
iterator begin ()
iterator end ()
iterator push_back ()
void pop_back ()
size_t size () const
Nodeoperator[] (size_t index)
const Nodeoperator[] (size_t index) const
PropertyIterator erase (const PropertyIterator &toErase)
void insert (const PropertyIterator &toInsert)
const NodegetMax () const
const NodegetMin () const
void save (const std::string &path) const
void load (const std::string &path)


Detailed Description

class Property describes a quantity for multiple nodes and at different times


Member Typedef Documentation

typedef PropertyIterator afl::ddf::Property::iterator
 

an iterator that iterates over all the nodes in the property


Constructor & Destructor Documentation

afl::ddf::Property::Property PropertySet parent  ) 
 

constructs a property

Parameters:
parent the set this property belongs to

afl::ddf::Property::Property const Property toCopy  ) 
 

copy constructor

Parameters:
toCopy the property to copy

afl::ddf::Property::~Property  ) 
 

destructor


Member Function Documentation

iterator afl::ddf::Property::begin  ) 
 

the first iterator

Returns:
an iterator to the first node

iterator afl::ddf::Property::end  ) 
 

the one-past-the-end iterator for this property

Returns:
an iterator to the one-after-the-last node

PropertyIterator afl::ddf::Property::erase const PropertyIterator toErase  ) 
 

erases a node from the property

Parameters:
toErase the node to erase
Returns:
an iterator pointing to the next node after the erased node

const Geometry* afl::ddf::Property::getGeometry  )  const
 

Returns:
the geometry of the property. If the property is variable geometry the geometry object returned will reflect that.

const Node* afl::ddf::Property::getMax  )  const
 

returns the highest value stored anywhere in this property if no values are stored, this returns ddf::MAX_DATA

const Node* afl::ddf::Property::getMin  )  const
 

Returns:
the highest value stored anywhere in this property if no values are stored, this returns ddf::MAX_DATA

void afl::ddf::Property::init size_t  rows = 1,
size_t  cols = 1,
size_t  epochs = 1
 

sets the structure of this property and makes it a fixed geometry

Parameters:
rows the number of rows to hold
cols the number of cols to hold
epochs the number of time steps to hold
Exceptions:
GeometryException if the property is not empty

void afl::ddf::Property::insert const PropertyIterator toInsert  ) 
 

inserts a node in the middle of the property

Parameters:
toInsert an iterator pointing at the node that will come right after the new node. After the insertion toInsert will point to the new node

void afl::ddf::Property::load const std::string &  path  ) 
 

loads the property from the HDF5 file.

Parameters:
path the path to the ddf directory

Property& afl::ddf::Property::operator= const Property toCopy  ) 
 

assignment operator

Parameters:
toCopy the peroperty to copy
Returns:
a reference to this

const Node& afl::ddf::Property::operator[] size_t  index  )  const
 

Returns:
a constant reference to the indexed node.
using an index that is one larger than the last index is treated like any other access outside of bounds.
Parameters:
index 
Exceptions:
IndexOutOfBoundsException if index is greater than the last index (>= size)

Node& afl::ddf::Property::operator[] size_t  index  ) 
 

Returns:
a reference to the indexed node.
using an index that is one larger than the last index will implicitly cause a push_back and will return a reference to the new node.
Parameters:
index 
Exceptions:
IndexOutOfBoundsException if index is strictly greater than the size index (> size)

void afl::ddf::Property::pop_back  ) 
 

removes the last property

iterator afl::ddf::Property::push_back  ) 
 

creates a new node returns a reference to it

Returns:
an iterator pointing at the new node

void afl::ddf::Property::resize const Geometry geom  ) 
 

sets a new structure for this property. The values stored in the nodes are going to be kept as much as possible. If an aspect of the geometry became smaller then values stored in the clipped portions will be lost. If an aspect of the geometry became larger then it will be initialised to 0.

Parameters:
geom the new geometry of the nodes

void afl::ddf::Property::resize size_t  rows = 1,
size_t  cols = 1,
size_t  epochs = 1
 

sets a new structure for this property. The values stored in the nodes are going to be kept as much as possible. If an aspect of the geometry became smaller then values stored in the clipped portions will be lost. If an aspect of the geometry became larger then it will be initialised to 0.

Parameters:
rows the new number of rows to hold
cols the new number of cols to hold
epochs the new number of time steps to hold
Exceptions:
GeometryException if the property is not initialised

void afl::ddf::Property::save const std::string &  path  )  const
 

saves the property as a HDF5 file

Parameters:
path the path to the file to create

size_t afl::ddf::Property::size  )  const
 

the number of nodes in the property


The documentation for this class was generated from the following file:
Generated on Fri Dec 22 07:17:52 2006 for afl by  doxygen 1.4.6