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

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

#include <tagptrvector.h>

Collaboration diagram for TagPtrVector:
Collaboration graph

Public Member Functions

 TagPtrVector ()
 This is the default TagPtrVector constructor. More...
 
 TagPtrVector (const TagPtrVector &initial)
 This is the TagPtrVector constructor that creates a copy of an existing TagPtrVector. More...
 
 ~TagPtrVector ()
 This is the TagPtrVector destructor. More...
 
void resize (Tags *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...
 
Tags *& operator[] (int pos)
 This will return the value of an element of the vector. More...
 
Tags *const & operator[] (int pos) const
 This will return the value of an element of the vector. More...
 
void updateTags (const TimeClass *const TimeInfo)
 This function will update all the elements of the vector for the current timestep. More...
 
void deleteTags (const TimeClass *const TimeInfo)
 This function will delete all the tagging experiments from the vector that have expired for the current timestep. More...
 
void deleteAllTags ()
 This function will delete all the tagging experiments from the vector. More...
 
void deleteAll ()
 This function will delete all the elements of the vector. More...
 

Protected Attributes

Tags ** v
 This is the vector of Tags values. More...
 
int size
 This is the size of the vector. More...
 

Detailed Description

This class implements a dynamic vector of Tags values.

Constructor & Destructor Documentation

◆ TagPtrVector() [1/2]

TagPtrVector::TagPtrVector ( )
inline

This is the default TagPtrVector constructor.

◆ TagPtrVector() [2/2]

TagPtrVector::TagPtrVector ( const TagPtrVector initial)

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

Parameters
initialis the TagPtrVector to copy

◆ ~TagPtrVector()

TagPtrVector::~TagPtrVector ( )

This is the TagPtrVector destructor.

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

Member Function Documentation

◆ Delete()

void TagPtrVector::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

◆ deleteAll()

void TagPtrVector::deleteAll ( )

This function will delete all the elements of the vector.

◆ deleteAllTags()

void TagPtrVector::deleteAllTags ( )

This function will delete all the tagging experiments from the vector.

◆ deleteTags()

void TagPtrVector::deleteTags ( const TimeClass *const  TimeInfo)

This function will delete all the tagging experiments from the vector that have expired for the current timestep.

Parameters
TimeInfois the TimeClass for the current model

◆ operator[]() [1/2]

Tags*& TagPtrVector::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]

Tags* const& TagPtrVector::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 TagPtrVector::resize ( Tags value)

This will add one new entry to the vector.

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

◆ Size()

int TagPtrVector::Size ( ) const
inline

This will return the size of the vector.

Returns
the size of the vector

◆ updateTags()

void TagPtrVector::updateTags ( const TimeClass *const  TimeInfo)

This function will update all the elements of the vector for the current timestep.

Parameters
TimeInfois the TimeClass for the current model

Member Data Documentation

◆ size

int TagPtrVector::size
protected

This is the size of the vector.

◆ v

Tags** TagPtrVector::v
protected

This is the vector of Tags values.


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