Gadget
Public Member Functions | Protected Attributes | List of all members
ParameterVector Class Reference

This class implements a dynamic vector of Parameter values. More...

#include <parametervector.h>

Collaboration diagram for ParameterVector:
Collaboration graph

Public Member Functions

 ParameterVector ()
 This is the default ParameterVector constructor. More...
 
 ParameterVector (int sz)
 This is the ParameterVector constructor for a specified size. More...
 
 ParameterVector (const ParameterVector &initial)
 This is the ParameterVector constructor that creates a copy of an existing ParameterVector. More...
 
 ~ParameterVector ()
 This is the ParameterVector destructor. More...
 
void resize (Parameter &value)
 This will add one new entry to the vector. More...
 
void Delete (int pos)
 This will delete an entry from the vector. More...
 
int Size () const
 This will return the size of the vector. More...
 
Parameteroperator[] (int pos)
 This will return the value of an element of the vector. More...
 
Parameter const & operator[] (int pos) const
 This will return the value of an element of the vector. More...
 
ParameterVectoroperator= (const ParameterVector &pv)
 This operator will set the vector equal to an existing ParameterVector. More...
 

Protected Attributes

Parameterv
 This is the vector of Parameter values. More...
 
int size
 This is the size of the vector. More...
 

Detailed Description

This class implements a dynamic vector of Parameter values.

Constructor & Destructor Documentation

◆ ParameterVector() [1/3]

ParameterVector::ParameterVector ( )
inline

This is the default ParameterVector constructor.

◆ ParameterVector() [2/3]

ParameterVector::ParameterVector ( int  sz)

This is the ParameterVector constructor for a specified size.

Parameters
szis the size of the vector to be created
Note
The elements of the vector will all be created, and set to zero

◆ ParameterVector() [3/3]

ParameterVector::ParameterVector ( const ParameterVector initial)

This is the ParameterVector constructor that creates a copy of an existing ParameterVector.

Parameters
initialis the ParameterVector to copy

◆ ~ParameterVector()

ParameterVector::~ParameterVector ( )

This is the ParameterVector destructor.

Note
This will free all the memory allocated to all the elements of the vector

Member Function Documentation

◆ Delete()

void ParameterVector::Delete ( int  pos)

This will delete an entry from the vector.

Parameters
posis the element of the vector to be deleted
Note
This will free the memory allocated to the deleted element of the vector

◆ operator=()

ParameterVector & ParameterVector::operator= ( const ParameterVector pv)

This operator will set the vector equal to an existing ParameterVector.

Parameters
pvis the ParameterVector to copy

◆ operator[]() [1/2]

Parameter& ParameterVector::operator[] ( int  pos)
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ operator[]() [2/2]

Parameter const& ParameterVector::operator[] ( int  pos) const
inline

This will return the value of an element of the vector.

Parameters
posis the element of the vector to be returned
Returns
the value of the specified element

◆ resize()

void ParameterVector::resize ( Parameter value)

This will add one new entry to the vector.

Parameters
valueis the value that will be entered for the new entry

◆ Size()

int ParameterVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

Member Data Documentation

◆ size

int ParameterVector::size
protected

This is the size of the vector.

◆ v

Parameter* ParameterVector::v
protected

This is the vector of Parameter values.


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