hyperarray Class Reference

Class to store an arbitrary sized array of hyperpoints. More...

#include <libhyperpoint.hpp>

List of all members.

Public Member Functions

 hyperarray (xsd__int size)
 Constructs hyperarray and allocates memory for 'size' hyperpoints.
 hyperarray (const hyperarray &array)
 Copy constructor.
virtual xsd__int size () const
 Returns dimension of the hyperarray.
virtual void initialize (int size)
 Initialize the hyperarray to hold a given number of hyperpoints.
virtual void reset (void)
 Free up any allocated storage for hyperpoints and reset size to ZERO.
virtual hyperpointoperator[] (xsd__int i) const
 The [] operator.
virtual hyperpoint operator() (xsd__int i) const
 The () operator.
virtual hyperarrayoperator= (const hyperarray &array)
 The = operator.
virtual void print () const
 Print content of hyperarray to std::cout.
virtual void print (std::ostream &printstream) const
 Print content of hyperarray to std::ostream.

Public Attributes

hyperpoint__ptr
xsd__int __size

Detailed Description

Class to store an arbitrary sized array of hyperpoints.

Intended for transmission of an arbitrary sized list of points e.g.: plan_along() or get_path()

Definition at line 119 of file libhyperpoint.hpp.


Constructor & Destructor Documentation

hyperarray::hyperarray ( xsd__int  size  ) 

Constructs hyperarray and allocates memory for 'size' hyperpoints.

Parameters:
[in] size dimension of the hyperarray

Definition at line 197 of file libhyperpoint.cpp.

hyperarray::hyperarray ( const hyperarray array  ) 

Copy constructor.

Definition at line 203 of file libhyperpoint.cpp.


Member Function Documentation

void hyperarray::initialize ( int  size  )  [virtual]

Initialize the hyperarray to hold a given number of hyperpoints.

Usually used when hyperarray was created with empty constructor of after it has been reset()

Parameters:
size number of hyperpoints to be stored in the hyperarray

Definition at line 249 of file libhyperpoint.cpp.

hyperpoint hyperarray::operator() ( xsd__int  i  )  const [virtual]

The () operator.

Returns the hyperpoint at a particular index into the hyperarray. Use when contents have to be read, without modification.

Parameters:
[in] i Index into the hyperpoint. Starts from 0 and goes till size() - 1

Definition at line 232 of file libhyperpoint.cpp.

hyperarray & hyperarray::operator= ( const hyperarray array  )  [virtual]

The = operator.

Resets the hyperarray and then makes it a copy of the hyperarray on the RHS of the = sign

Definition at line 237 of file libhyperpoint.cpp.

hyperpoint & hyperarray::operator[] ( xsd__int  i  )  const [virtual]

The [] operator.

Returns a reference to the contents of the hyperarray. Used when modifying the contents, like setting them to a value.

Parameters:
[in] i Index into the hyperarray. Starts from 0 and goes till size() - 1

Definition at line 227 of file libhyperpoint.cpp.

void hyperarray::print ( std::ostream &  printstream  )  const [virtual]

Print content of hyperarray to std::ostream.

Parameters:
[in] printstream the stream to which the hyperarray values will be printed

Definition at line 287 of file libhyperpoint.cpp.

void hyperarray::print ( void   )  const [virtual]

Print content of hyperarray to std::cout.

Definition at line 274 of file libhyperpoint.cpp.

void hyperarray::reset ( void   )  [virtual]

Free up any allocated storage for hyperpoints and reset size to ZERO.

Definition at line 259 of file libhyperpoint.cpp.

int hyperarray::size (  )  const [virtual]

Returns dimension of the hyperarray.

Returns:
number of hyperpoints in hyperarray

Definition at line 222 of file libhyperpoint.cpp.


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

Generated on Thu Dec 10 12:57:44 2009 for Libhyperpoint by  doxygen 1.6.1