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

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

#include <popinfovector.h>

Collaboration diagram for PopInfoVector:
Collaboration graph

Public Member Functions

 PopInfoVector ()
 This is the default PopInfoVector constructor. More...
 
 PopInfoVector (int sz, PopInfo initial)
 This is the PopInfoVector constructor for a specified size. More...
 
 PopInfoVector (const PopInfoVector &initial)
 This is the PopInfoVector constructor that creates a copy of an existing PopInfoVector. More...
 
 ~PopInfoVector ()
 This is the PopInfoVector destructor. More...
 
void resizeBlank (int addsize)
 This will add new blank (ie. NULL) entries to the vector. More...
 
void resize (PopInfo 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...
 
PopInfooperator[] (int pos)
 This will return the value of an element of the vector. More...
 
const PopInfooperator[] (int pos) const
 This will return the value of an element of the vector. More...
 
void Sum (const PopInfoVector *const Number, const ConversionIndex &CI)
 This function will sum the elements of an existing PopInfoVector, possibly allowing for the length grouping to be changed using a ConversionIndex. More...
 

Protected Attributes

PopInfov
 This is the vector of PopInfo values. More...
 
int size
 This is the size of the vector. More...
 

Detailed Description

This class implements a dynamic vector of PopInfo values.

Constructor & Destructor Documentation

◆ PopInfoVector() [1/3]

PopInfoVector::PopInfoVector ( )
inline

This is the default PopInfoVector constructor.

◆ PopInfoVector() [2/3]

PopInfoVector::PopInfoVector ( int  sz,
PopInfo  initial 
)

This is the PopInfoVector constructor for a specified size.

Parameters
szis the size of the vector to be created
initialis the initial value for all the entries of the vector

◆ PopInfoVector() [3/3]

PopInfoVector::PopInfoVector ( const PopInfoVector initial)

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

Parameters
initialis the PopInfoVector to copy

◆ ~PopInfoVector()

PopInfoVector::~PopInfoVector ( )

This is the PopInfoVector destructor.

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

Member Function Documentation

◆ Delete()

void PopInfoVector::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[]() [1/2]

PopInfo& PopInfoVector::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]

const PopInfo& PopInfoVector::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 PopInfoVector::resize ( PopInfo  value)

This will add one new entry to the vector.

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

◆ resizeBlank()

void PopInfoVector::resizeBlank ( int  addsize)

This will add new blank (ie. NULL) entries to the vector.

Parameters
addsizeis the number of blank entries that will be entered

◆ Size()

int PopInfoVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

◆ Sum()

void PopInfoVector::Sum ( const PopInfoVector *const  Number,
const ConversionIndex CI 
)

This function will sum the elements of an existing PopInfoVector, possibly allowing for the length grouping to be changed using a ConversionIndex.

Parameters
Numberis the PopInfoVector containing the elements to be summed
CIis the ConversionIndex to be used to convert from one length grouping to another

Member Data Documentation

◆ size

int PopInfoVector::size
protected

This is the size of the vector.

◆ v

PopInfo* PopInfoVector::v
protected

This is the vector of PopInfo values.


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