- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Utils::Containers::DynamicArray Class Reference

`#include <DynamicArray.h>`

Inheritance diagram for Mers::Utils::Containers::DynamicArray:

[legend]
Collaboration diagram for Mers::Utils::Containers::DynamicArray:

[legend]
List of all members.

## Public Types
enum | DynamicArrayType { AssignmentArray = 0, ClauseArray = 1, DomainArray = 2, ValueArray = 3, VariableArray = 4, GIEntryArray = 5, IntegerArray = 6, oObjectArray = 7, oHCAAutomatonArray = 8, oHCATransitionArray = 9, oMarkedAutomatonArray = 10, oHCAFunctionCallArray = 11, oObjectQueue = 12, oGIStateHeap = 13, oDynamicArrayTemplate = 14, DAVariableArrayArray = 15, oEstimateHeap = 16, DAHBFIGImplicantHeap = 17, oDynamicStackTemplate = 18 }
## Public Member Functions
| DynamicArray (DynamicArrayType myType, bool myOwnershipStatus, BaseModelObject::ObjectType myObjectType=BaseModelObject::BMDynamicArray)
virtual | ~DynamicArray ()
DynamicArrayType | getDynamicArrayType () const
void | setOwnershipFlag (bool myOwnershipStatus)
void | makeEmpty ()
int | resize (unsigned int newSize)
virtual unsigned int | getLength () const
unsigned int | size () const
virtual bool | isEmpty () const
void * | find (char const *elementName)
void const * | find (char const *elementName) const
void *& | peekBack ()
void const *& | peekBack () const
void | erase (unsigned int elementIndex)
void *& | operator[] (int elementIndex)
void *& | operator[] (unsigned int elementIndex)
void const *& | operator[] (int elementIndex) const
void const *& | operator[] (unsigned int elementIndex) const
void | print (std::ostream &out) const
virtual void | printArray (std::ostream &out, char const *seperator, bool skipNULL=true)
virtual void | printArray (std::ostream &out, char const *seperator, bool skipNULL=true) const
## Static Public Member Functions
static char const * | dynamicArrayTypeToString (DynamicArrayType daType)
## Protected Member Functions
| DynamicArray (DynamicArray const &other)
void | deleteAll ()
void | clearAll ()
virtual void | printElement (std::ostream &out, void const *element) const =0
virtual void | deleteElement (void *element) const =0
virtual void * | newElement (void const *element) const =0
virtual bool | foundMatch (char const *elementName, void const *element) const
virtual bool | isEqual (void const *element1, void const *element2) const
virtual void | destroy ()
virtual int | copy (DynamicArray const &other)
int | grow ()
int | shrink ()
int | pushBack (void *data)
void * | popBack ()
void | insert (unsigned int elementIndex, void *data)
DynamicArray const & | operator= (DynamicArray const &other)
DynamicArray const & | operator+= (DynamicArray const &other)
DynamicArray const & | operator+= (void const *other)
bool | operator== (DynamicArray const &other) const
bool | operator!= (DynamicArray const &other) const
## Protected Attributes
DynamicArrayType const | dynamicArrayType
| The Dynamic Array type.
unsigned int | mSize
| Current number of elements in array.
unsigned int | maxSize
| Current capacity of array.
void ** | array
| the dynamic array of objects
bool | ownsElements
| The current ownership flag. Defaults to false.

## Detailed Description

A dynamic resizeable array. It will adjust its size to fit the data present using an O(1) algorithm. It also does runtime array bounds checking this is a base class and must be implemented for a specific task through a derived class.

Definition at line 31 of file DynamicArray.h.

## Member Enumeration Documentation

enum Mers::Utils::Containers::DynamicArray::DynamicArrayType

The DynamicArray type. All arrays that inherit from this should define their own type. The types are numbered to ensure that each enumerated value keeps the same value on various platforms, as the integer value is stored in some file types

##########
## NOTE ##
##########

If you add a type, add it to the dynamicArrayTypeToString() function as well.

Definition at line 48 of file DynamicArray.h.

## Constructor & Destructor Documentation

DynamicArray::DynamicArray | ( | DynamicArrayType | myType,
|  | bool | myOwnershipStatus,
|  | BaseModelObject::ObjectType | myObjectType = `BaseModelObject::BMDynamicArray` |
| ) |  |  |

Creates a new, empty array

Parameters:

  | myType | the object type of this dynamic array
  | myOwnershipStatus | the ownership status. If true, this object owns the array objects it contains and should delete them upon being deleted.
  | myObjectType | the Base Model Object type of the dynamic array

Definition at line 27 of file DynamicArray.cpp.

References array, maxSize, mSize, and ownsElements.

Referenced by Mers::Models::Base::BaseModelAssignmentArray::operator==().

DynamicArray::~DynamicArray | ( |  | ) | `[virtual]`

Destroys the array

Definition at line 41 of file DynamicArray.cpp.

References array.

DynamicArray::DynamicArray | ( | DynamicArray const & | other | ) | `[protected]`

Creates a new array with a copy of the contents from the other array. This can be an expensive operation.

Parameters:

  | other | the array whos contents are copied

Definition at line 367 of file DynamicArray.cpp.

References array, maxSize, mSize, and ownsElements.

## Member Function Documentation

char const * DynamicArray::dynamicArrayTypeToString | ( | DynamicArrayType | daType | ) | `[static]`

returns a static string that represents the DynamicArrayType

Parameters:

  | daType | the DynamicArrayType that is being converted into a string

Returns:
  the string representation of the DynamicArrayType

Definition at line 53 of file DynamicArray.cpp.

Referenced by Mers::Utils::Containers::DynamicHeap::insert().

DynamicArray::DynamicArrayType DynamicArray::getDynamicArrayType | ( |  | ) | const

Returns the dynamic array type of this object

Returns:
  the dynamic array type of this object

Definition at line 99 of file DynamicArray.cpp.

References dynamicArrayType.

Referenced by Mers::Executives::DeductiveController::Command::CommandDispatcher::addConnection(), Mers::Models::Base::BaseModelAssignmentArray::BaseModelAssignmentArray(), Mers::Models::Base::BaseModelClauseArray::BaseModelClauseArray(), Mers::Models::Base::BaseModelDomainArray::BaseModelDomainArray(), Mers::Models::Base::BaseModelValueArray::BaseModelValueArray(), Mers::Models::Base::BaseModelVariableArray::BaseModelVariableArray(), Mers::Models::Base::BaseModelVariableArrayArray::BaseModelVariableArrayArray(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::DynamicArrayTemplate(), Mers::Utils::Containers::DynamicHeap::insert(), Mers::Utils::Containers::IntegerArray::IntegerArray(), Mers::Executives::DeductiveController::Command::CommandDispatcher::issueCommand(), and Mers::Utils::Containers::ObjectArray::ObjectArray().

void DynamicArray::setOwnershipFlag | ( | bool | myOwnershipStatus | ) |

Sets the ownership status of this array. If true, this array owns all the elements of the array, if false, this array does not own the elements and should not delete them when the array is deleted.

Parameters:

  | myOwnershipStatus | the new ownership status. If true, this object owns the array objects it contains and should delete them upon being deleted.

Definition at line 106 of file DynamicArray.cpp.

References ownsElements.

void DynamicArray::makeEmpty | ( |  | ) |

If this object owns all the elements in the object, calls deleteAll, otherwise it calls clearAll. Either way, the array will be empty, and memory will be cleaned up as necessary.

Definition at line 113 of file DynamicArray.cpp.

References clearAll(), deleteAll(), and ownsElements.

Referenced by Mers::Models::Base::BaseModel::addDomain(), Mers::Utils::Containers::StackTemplate< Data >::clear(), Mers::Models::CCA::CCAVariables::clear(), Mers::Models::CCA::CCATransitions::clear(), Mers::Models::CCA::CCAStates::clear(), Mers::Models::CCA::CCASentence::clear(), Mers::Models::CCA::CCADomains::clear(), Mers::Models::CCA::CCAClause::clear(), Mers::Models::CCA::CCAAutomata::clear(), Mers::Models::CCA::CCAAssignments::clear(), Mers::Models::CCA::CCAState::clear_in_transitionPtrs(), Mers::Models::CCA::CCAState::clear_out_transitionPtrs(), Mers::Solvers::Entailment::GI::GoalInterpreter::clearGoal(), copy(), Mers::Models::CCA::createSimpleTechsat21Model(), Mers::Models::CCA::createValveDriverModel(), destroy(), Mers::Models::CCA::CCAModel::destroy(), Mers::Models::Base::BaseModel::destroy(), Mers::Solvers::SAT::ValidSAT::VSATNode::evaluate(), Mers::Generators::BFIG::BFIGGenerator::generateBestImplicant(), Mers::Models::Base::BaseModel::newDomain(), Mers::Solvers::SAT::ValidSAT::VSATNode::propagate(), Mers::Estimation::Discrete::ModeEstimatorBase::releaseMemoryAndNormalize(), Mers::Generators::BFIG::BFIG::restart(), Mers::Models::CCA::CCAState::set_constraint(), Mers::Generators::BFIG::BFIGGenerator::sortBMVariables(), Mers::Solvers::SAT::ISAT::ISATTester::tryAssignment(), Mers::Generators::BFIG::BFIG::~BFIG(), Mers::Generators::BFIG::BFIGImplicantHeap::~BFIGImplicantHeap(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::~DynamicArrayTemplate(), Mers::Utils::Containers::IntegerArray::~IntegerArray(), Mers::Executives::DeductiveController::Rtapi::ME::ME_rtapi::~ME_rtapi(), and Mers::Utils::Containers::StackTemplate< Data >::~StackTemplate().

Here is the call graph for this function:

int DynamicArray::resize | ( | unsigned int | newSize | ) |

resizes the array to the specified size. If the array is shrinking, elements at the end of the array are deleted. If the array is growing, the new elements are initialized to NULL resizing to a size of 0 will delete all memory used by this object

Parameters:

  | newSize | the new size of the array.

Returns:
  0 on success, a positive if there was a problem with allocating the space

Definition at line 147 of file DynamicArray.cpp.

References array, deleteElement(), maxSize, mSize, and ownsElements.

Referenced by Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::addGuardAssign(), copy(), Mers::Solvers::SAT::GATSAT::NUGatsatFactory::createGatsat(), Mers::Utils::Containers::DynamicQueue::DynamicQueue(), Mers::Utils::Containers::DynamicQueue::enqueue(), Mers::Solvers::Entailment::GI::GoalInterpreter::GoalInterpreter(), operator+=(), Mers::Solvers::SAT::ValidSAT::VSATNode::propagate(), Mers::Executives::DeductiveController::Rtapi::ME::ME_rtapi::registerCommandListener(), Mers::Executives::DeductiveController::Command::CommandDispatcher::setModel(), Mers::Generators::BFIG::BFIGGenerator::sortBMVariables(), and Mers::Solvers::SAT::ValidSAT::VSATNode::VSATNode().

Here is the call graph for this function:

unsigned int DynamicArray::getLength | ( |  | ) | const`[virtual]`

returns the current length of the array. The set of valid array indexes are between 0 and (length - 1), inclusive; the same as a standard C array.

Returns:
  the array length.

Reimplemented in Mers::Utils::Containers::DynamicQueue.

Definition at line 197 of file DynamicArray.cpp.

References mSize.

Referenced by Mers::Generators::BFIG::BFIGGenerator::addConflict(), Mers::Generators::BFIG::BFIG::addConflict(), Mers::Generators::BFIG::BFIGGenerator::addConflicts(), Mers::Executives::DeductiveController::Command::CommandDispatcher::addConnection(), Mers::Solvers::SAT::ValidSAT::VSATNode::addConstraint(), Mers::Models::Base::BaseModel::addDomain(), Mers::Solvers::SAT::ISAT::ISATTester::addDomainConstraints(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::addGuardAssign(), Mers::Models::Base::BaseModel::addVariable(), Mers::Solvers::SAT::ValidSAT::VSATNode::adjustValidAssignment(), Mers::Generators::BFIG::BFIGAssignment::alternateValues(), Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE::BFBSE(), Mers::Generators::BFIG::BFIGGenerator::BFIGGenerator(), Mers::Generators::BFIG::BFIGGenerator::bfindBMVariable(), Mers::Estimation::Discrete::MEObjectiveFunction::calculatePropagationUtility(), Mers::Models::CCA::CCAAutomaton::CCAAutomaton(), Mers::Models::Base::BaseModelDomain::copy(), Mers::Models::Base::BaseModel::copy(), Mers::Estimation::Discrete::MEObjectiveFunction::determineOptimisticAssignmentValues(), Mers::Utils::Containers::ObjectArray::end(), Mers::Utils::Containers::IntegerArray::end(), Mers::Utils::Containers::StackTemplate< Data >::end(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::end(), Mers::Models::CCA::CCATransitions::end(), Mers::Models::CCA::CCAStates::end(), Mers::Models::CCA::CCASentence::end(), Mers::Models::CCA::CCAAutomata::end(), Mers::Models::Base::BaseModelVariableArrayArray::end(), Mers::Models::Base::BaseModelVariableArray::end(), Mers::Models::Base::BaseModelValueArray::end(), Mers::Models::Base::BaseModelDomainArray::end(), Mers::Models::Base::BaseModelClauseArray::end(), Mers::Models::Base::BaseModelAssignmentArray::end(), Mers::Generators::BFIG::BFIG::enqueueImplicant(), Mers::Solvers::SAT::ValidSAT::VSATNode::evaluate(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::extractTransitionsFromCCA(), Mers::Solvers::SAT::GATSAT::GATSAT::findSatisfyingSolution(), Mers::Solvers::SAT::GATSAT::GATSAT::findUnsatisfyingSolution(), Mers::Solvers::Entailment::GI::GoalInterpreter::generateGoalState(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::generateTrajectories(), Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE::generateTrajectories(), Mers::Estimation::Discrete::Dissent::getAntecedentLength(), Mers::Estimation::Discrete::CompiledTransition::getAntecedentLength(), Mers::Estimation::Discrete::Estimate::getAssignmentByUID(), Mers::Generators::BFIG::BFIGGenerator::getBFIGVariable(), Mers::Generators::BFIG::BFIGVariable::getDomainSize(), Mers::Generators::BFIG::BFIGVariable::getDomainTotalSize(), Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getEstimateFaultTransitions(), Mers::Estimation::Discrete::ProbabilityRules::Rule::getNumberSatisfied(), Mers::Generators::BFIG::BFIGObjectiveFunction::getUtility(), Mers::Models::Base::BaseModelIntegerDomain::getValue(), Mers::Models::Base::BaseModelDoubleDomain::getValue(), Mers::Solvers::Entailment::GI::GoalInterpreter::GoalInterpreter(), Mers::Executives::DeductiveController::DCInterface::init(), tut::BFIGHelper::initBFIGVariables(), Mers::Models::CCA::CCAAutomata::insert_automaton(), Mers::Models::CCA::CCATransitions::insert_transition_p(), Mers::Solvers::SAT::ISAT::ISATTester::ISATTester(), Mers::Executives::DeductiveController::Command::CommandDispatcher::issueCommand(), tut::BMHelper::loadAssignments(), tut::BFIGHelper::loadAssignments(), tut::BMHelper::loadClause(), tut::BMHelper::loadModelData(), Mers::Models::CCA::Io::Mof::MOFReader::loadMOFFromString(), tut::BMHelper::loadVariable(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::ModeEstimator(), Mers::Models::Base::BaseModel::newDomain(), Mers::Generators::BFIG::BFIGVariable::nullDomain(), operator+=(), Mers::Models::Base::BaseModelDoubleDomain::operator+=(), Mers::Estimation::Discrete::ProbabilityRules::operator<<(), Mers::Estimation::Discrete::operator<<(), Mers::Models::Base::BaseModelSentence::print(), Mers::Models::Base::BaseModelClause::print(), printArray(), Mers::Solvers::SAT::ValidSAT::VSATNode::propagate(), Mers::Models::CCA::CCATransitions::pushBack(), Mers::Models::CCA::CCAStates::pushBack(), Mers::Models::CCA::CCAAutomata::pushBack(), Mers::Models::Base::BaseModelValueArray::pushBack(), Mers::Models::Base::BaseModelDoubleDomain::pushBack(), Mers::Executives::DeductiveController::Rtapi::ME::ME_rtapi::queue_command(), Mers::Executives::DeductiveController::Rtapi::ME::ME_rtapi::queue_start_command_and_time(), Mers::Executives::DeductiveController::Rtapi::ME::ME_rtapi::registerCommandListener(), Mers::Estimation::Discrete::ProbabilityRules::Rule::reset(), rpAutomaton::rpAutomaton(), rpCCAutomata::rpCCAutomata(), rpInterface::rpInterface(), Mers::Estimation::Discrete::ProbabilityRules::Rule::Rule(), Mers::Models::Base::Io::Mof::BaseModelReader::saveBaseModel(), Mers::Models::CCA::Io::Mof::MOFReader::saveCCAModel(), Mers::Executives::DeductiveController::DCInterface::setExecutionInterface(), Mers::Executives::DeductiveController::Command::CommandDispatcher::setModel(), Mers::Utils::Containers::StackTemplate< Data >::size(), size(), Mers::Generators::BFIG::BFIGGenerator::sortBMVariables(), Mers::Executives::DeductiveController::TaskFactory::TaskFactory(), tut::BFIGGeneratorTester::testBFIG(), Mers::Solvers::SAT::GATSAT::unit_tests::GatsatTester::testGATSAT(), Mers::Generators::BFIG::BFIGVariable::toString(), Mers::Solvers::SAT::ValidSAT::ValidSAT::tryAssignment(), Mers::Solvers::SAT::ISAT::ISATTester::tryAssignment(), Mers::Solvers::Entailment::GI::GoalInterpreter::updateCurrentState(), Mers::Solvers::Entailment::GI::GoalInterpreter::updateGoal(), Mers::Solvers::Entailment::GI::GoalInterpreter::updateReachableStates(), Mers::Solvers::SAT::ValidSAT::ValidSAT::ValidSAT(), Mers::Solvers::SAT::ValidSAT::VSATNode::VSATNode(), Mers::Solvers::SAT::ValidSAT::VSATVariable::VSATVariable(), Mers::Models::CCA::Io::Mof::MOFReader::writeConstraint(), Mers::Models::CCA::Io::Mof::MOFReader::writeText002(), and Mers::Models::CCA::Io::Mof::MOFReader::writeTextConstraint().

unsigned int Mers::Utils::Containers::DynamicArray::size | ( |  | ) | const`[inline]`

returns the current length of the array. The set of valid array indexes are between 0 and (length - 1), inclusive; the same as a standard C array.

Returns:
  the array length.

Reimplemented in Mers::Utils::Containers::StackTemplate< Data >.

Definition at line 157 of file DynamicArray.h.

References getLength().

Referenced by Mers::Solvers::SAT::GATSAT::NUGatsatFactory::createGatsat(), Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getEstimateFaultTransitions(), Mers::Executives::DeductiveController::DCInterface::getValue(), tut::BMHelper::getVariableSubset(), TestSuiteParser::probTest(), TestSuiteParser::test(), Mers::Solvers::SAT::GATSAT::unit_tests::GatsatTester::testGATSAT(), and Mers::Solvers::SAT::ISAT::ISATTester::tryAssignment().

Here is the call graph for this function:

bool DynamicArray::isEmpty | ( |  | ) | const`[virtual]`

returns true if a call to getLength() would return 0

Returns:
  true if the array length is currently 0

Reimplemented in Mers::Utils::Containers::DynamicQueue.

Definition at line 204 of file DynamicArray.cpp.

References mSize.

Referenced by Mers::Generators::BFIG::BFIG::addConflict(), Mers::Solvers::SAT::ISAT::ISATTester::addDomainConstraints(), Mers::Utils::Containers::StackTemplate< Data >::empty(), Mers::Models::CCA::CCAVariables::empty(), Mers::Models::CCA::CCATransitions::empty(), Mers::Models::CCA::CCAStates::empty(), Mers::Models::CCA::CCASentence::empty(), Mers::Models::CCA::CCADomains::empty(), Mers::Models::CCA::CCAClause::empty(), Mers::Models::CCA::CCAAutomata::empty(), Mers::Models::CCA::CCAAssignments::empty(), Mers::Solvers::Entailment::GI::GoalInterpreter::generateGoalState(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::generateTrajectories(), Mers::Estimation::Discrete::CompiledME::CompiledModeEstimator::generateTrajectories(), and Mers::Generators::BFIG::BFIG::getBestImplicant().

void * DynamicArray::find | ( | char const * | elementName | ) |

finds the element with the specified name and returns it, if found. The search has the same limitations as the derived class's foundMatch() function

Parameters:

  | elementName | the name of the element being sought

Returns:
  the element, if found, or NULL if an element with a matching name could not be found

Reimplemented in Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, and Mers::Models::Base::BaseModelVariableArrayArray.

Definition at line 211 of file DynamicArray.cpp.

References array, foundMatch(), and mSize.

Here is the call graph for this function:

void const * DynamicArray::find | ( | char const * | elementName | ) | const

finds the element with the specified name and returns it, if found. The search has the same limitations as the derived class's foundMatch() function

Parameters:

  | elementName | the name of the element being sought

Returns:
  the element, if found, or NULL if an element with a matching name could not be found

Reimplemented in Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, and Mers::Models::Base::BaseModelVariableArrayArray.

Definition at line 224 of file DynamicArray.cpp.

References array, foundMatch(), and mSize.

Here is the call graph for this function:

void *& DynamicArray::peekBack | ( |  | ) |

returns a handle to the last element of the array.

Returns:
  the last element, as requested, or NULL.

Reimplemented in Mers::Models::Base::BaseModelAssignmentArray.

Definition at line 237 of file DynamicArray.cpp.

References array, and mSize.

Referenced by Mers::Utils::Containers::StackTemplate< Data >::top().

void const *& DynamicArray::peekBack | ( |  | ) | const

returns a handle to the last element of the array.

Returns:
  the last element, as requested, or NULL.

Reimplemented in Mers::Models::Base::BaseModelAssignmentArray.

Definition at line 249 of file DynamicArray.cpp.

References array, and mSize.

void DynamicArray::erase | ( | unsigned int | elementIndex | ) |

Deletes the element at the specified index.

Parameters:

  | elementIndex | the index that the item should be deleted.

Definition at line 261 of file DynamicArray.cpp.

References array, deleteElement(), mSize, ownsElements, and popBack().

Here is the call graph for this function:

void *& DynamicArray::operator[] | ( | int | elementIndex | ) |

retrieves the element at the specified index and returns it

Parameters:

  | elementIndex | location of the element to be accessed

Returns:
  the element requested if index is in range, otherwise it returns NULL

Reimplemented in Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 320 of file DynamicArray.cpp.

References mSize.

Referenced by Mers::Utils::Containers::ObjectArray::operator[](), Mers::Utils::Containers::IntegerArray::operator[](), Mers::Utils::Containers::StackTemplate< Data >::operator[](), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::operator[](), and operator[]().

void *& DynamicArray::operator[] | ( | unsigned int | elementIndex | ) |

retrieves the element at the specified index and returns it

Parameters:

  | elementIndex | location of the element to be accessed

Returns:
  the element requested if index is in range, otherwise it returns NULL

Reimplemented in Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 284 of file DynamicArray.cpp.

References array, and mSize.

void const *& DynamicArray::operator[] | ( | int | elementIndex | ) | const

retrieves the element at the specified index and returns it

Parameters:

  | elementIndex | location of the element to be accessed

Returns:
  the element requested if index is in range, otherwise it returns NULL

Reimplemented in Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 338 of file DynamicArray.cpp.

References mSize, and operator[]().

Here is the call graph for this function:

void const *& DynamicArray::operator[] | ( | unsigned int | elementIndex | ) | const

retrieves the element at the specified index and returns it

Parameters:

  | elementIndex | location of the element to be accessed

Returns:
  the element requested if index is in range, otherwise it returns NULL

Reimplemented in Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 302 of file DynamicArray.cpp.

References array, and mSize.

void DynamicArray::print | ( | std::ostream & | out | ) | const`[virtual]`

Prints out the Dynamic Array by calling printArray(out, "\\n"), causing the elements to be row seperated Derived classes should overide this function if they want to change the seperator

Parameters:

  | out | the ostream being written to

Implements Mers::Utils::Lang::BaseModelObject.

Reimplemented in Mers::Models::Base::BaseModelClause, Mers::Models::Base::BaseModelDomain, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelIntegerDomain, Mers::Models::Base::BaseModelSentence, Mers::Models::Base::BaseModelStringDomain, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, and Mers::Utils::Containers::IntegerArray.

Definition at line 358 of file DynamicArray.cpp.

References printArray().

Here is the call graph for this function:

void DynamicArray::printArray | ( | std::ostream & | out,
|  | char const * | seperator,
|  | bool | skipNULL = `true` |
| ) |  |  | `[virtual]`

Prints out the Dynamic Array as a sequence of elements. It sperates each element with seperator. each element is printed by calling printElement()

Parameters:

  | out | the ostream being written to
  | seperator | the seperator used between each element
  | skipNULL | set this to true to have printArray print print "NULL Pointer" and not call printElement for all null pointers. Set to false to have printArray always call printElement

Definition at line 389 of file DynamicArray.cpp.

Referenced by Mers::Solvers::SAT::ValidSAT::VSATNode::evaluate(), Mers::Solvers::SAT::GATSAT::GATSAT::findUnsatisfyingSolution(), Mers::Utils::Containers::IntegerArray::print(), print(), Mers::Solvers::Entailment::GI::GoalInterpreter::print(), Mers::Models::CCA::CCAVariables::print(), Mers::Models::CCA::CCATransitions::print(), Mers::Models::CCA::CCAStates::print(), Mers::Models::CCA::CCAAutomata::print(), Mers::Models::Base::BaseModelStringDomain::print(), Mers::Models::Base::BaseModelSentence::print(), Mers::Models::Base::BaseModelDomain::print(), Mers::Models::Base::BaseModelClause::print(), Mers::Solvers::Entailment::GI::GoalInterpreter::showVariables(), Mers::Solvers::SAT::GATSAT::unit_tests::GatsatTester::testGATSAT(), Mers::Solvers::SAT::ValidSAT::ValidSAT::tryAssignment(), and Mers::Solvers::SAT::ISAT::ISATTester::tryAssignment().

void DynamicArray::printArray | ( | std::ostream & | out,
|  | char const * | seperator,
|  | bool | skipNULL = `true` |
| ) |  |  | const`[virtual]`

Prints out the Dynamic Array as a sequence of elements. It sperates each element with seperator. each element is printed by calling printElement()

Parameters:

  | out | the ostream being written to
  | seperator | the seperator used between each element
  | skipNULL | set this to true to have printArray print print "NULL Pointer" and not call printElement for all null pointers. Set to false to have printArray always call printElement

Definition at line 397 of file DynamicArray.cpp.

References array, getLength(), and printElement().

Here is the call graph for this function:

void DynamicArray::deleteAll | ( |  | ) | `[protected]`

Destroys the array by deleting all the elements within the array as its length is shrunk to zero

Definition at line 123 of file DynamicArray.cpp.

References array, deleteElement(), maxSize, and mSize.

Referenced by makeEmpty().

Here is the call graph for this function:

void DynamicArray::clearAll | ( |  | ) | `[protected]`

Removes all the elements from the array but does not delete any of them - only do this with arrays that have references to other values instead of copies or there will be a memory leak

Definition at line 140 of file DynamicArray.cpp.

References mSize.

Referenced by makeEmpty(), and Mers::Models::CCA::CCATransitions::~CCATransitions().

virtual void Mers::Utils::Containers::DynamicArray::printElement | ( | std::ostream & | out,
|  | void const * | element |
| ) |  |  | const`[protected, pure virtual]`

Prints the element of this array to the ostream out. This is called by the DynamicArray::operator<< for each element being printed Derived classes overide this function to provide proper printing of the elements within the array

Parameters:

  | out | the stream being printed to
  | element | the element being printed

Implemented in Mers::Estimation::Discrete::EstimateHeap, Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::ObjectQueue, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Referenced by copy(), operator+=(), Mers::Utils::Containers::DynamicQueue::printArray(), and printArray().

virtual void Mers::Utils::Containers::DynamicArray::deleteElement | ( | void * | element | ) | const`[protected, pure virtual]`

Called when an element should be deleted because it's storage space is being deleted. This function deletes the element

Parameters:

  | element | the array entry to delete

Implemented in Mers::Estimation::Discrete::EstimateHeap, Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::ObjectQueue, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Referenced by deleteAll(), erase(), pushBack(), resize(), and shrink().

virtual void* Mers::Utils::Containers::DynamicArray::newElement | ( | void const * | element | ) | const`[protected, pure virtual]`

Creates and returns a new array object that is a copy of the element passed in.

Parameters:

  | element | the element being copied

Returns:
  the new array object that is a copy of element

Implemented in Mers::Estimation::Discrete::EstimateHeap, Mers::Generators::BFIG::BFIGImplicantHeap, Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelDoubleDomain, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::ObjectQueue, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Referenced by copy(), and operator+=().

bool DynamicArray::foundMatch | ( | char const * | elementName,
|  | void const * | element |
| ) |  |  | const`[protected, virtual]`

Returns true if the specified element has the same name as elementName. This default routine always returns false. Derived classes should define an apropriate function.

Parameters:

  | elementName | the name of the object being sought
  | element | the element that is being queried

Returns:
  true if the element has the name elementName

Reimplemented in Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, and Mers::Models::Base::BaseModelVariableArrayArray.

Definition at line 430 of file DynamicArray.cpp.

Referenced by find().

bool DynamicArray::isEqual | ( | void const * | element1,
|  | void const * | element2 |
| ) |  |  | const`[protected, virtual]`

returns true if the two elements are equal. This default function returns true if the pointers are the same.

Parameters:

  | element1 | the first element in the comparison
  | element2 | the second element in the comparison

Returns:
  true if they are the equal and false if they are not equal

Reimplemented in Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::StackTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 439 of file DynamicArray.cpp.

Referenced by operator==().

void DynamicArray::destroy | ( |  | ) | `[protected, virtual]`

Deletes all the elements in the array, setting up the array for a copy, destructor or fresh start. Derived classes should ensure this function is called as well DynamicArray::destroy();

Reimplemented in Mers::Models::Base::BaseModelDomain.

Definition at line 446 of file DynamicArray.cpp.

References makeEmpty().

Referenced by Mers::Models::Base::BaseModelDomain::destroy(), Mers::Models::Base::BaseModelAssignmentArray::~BaseModelAssignmentArray(), Mers::Models::Base::BaseModelClauseArray::~BaseModelClauseArray(), Mers::Models::Base::BaseModelDomainArray::~BaseModelDomainArray(), Mers::Models::Base::BaseModelValueArray::~BaseModelValueArray(), Mers::Models::Base::BaseModelVariableArray::~BaseModelVariableArray(), Mers::Models::Base::BaseModelVariableArrayArray::~BaseModelVariableArrayArray(), and Mers::Utils::Containers::ObjectArray::~ObjectArray().

Here is the call graph for this function:

int DynamicArray::copy | ( | DynamicArray const & | other | ) | `[protected, virtual]`

copies the contents of the other dynamic array to the current array. This involves calls to newElement for copying the objects and destruction of the data in the current array.

Parameters:

  | other | the dynamic array being copied to this dynamic array

Returns:
  0 on success or a positive number if the copy failed

Definition at line 453 of file DynamicArray.cpp.

References array, makeEmpty(), mSize, newElement(), ownsElements, printElement(), and resize().

Referenced by Mers::Models::Base::BaseModelAssignmentArray::BaseModelAssignmentArray(), Mers::Models::Base::BaseModelClauseArray::BaseModelClauseArray(), Mers::Models::Base::BaseModelDomainArray::BaseModelDomainArray(), Mers::Models::Base::BaseModelValueArray::BaseModelValueArray(), Mers::Models::Base::BaseModelVariableArray::BaseModelVariableArray(), Mers::Models::Base::BaseModelVariableArrayArray::BaseModelVariableArrayArray(), Mers::Models::Base::BaseModelSentence::copy(), Mers::Models::Base::BaseModelDomain::copy(), Mers::Models::Base::BaseModelClause::copy(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::DynamicArrayTemplate(), Mers::Utils::Containers::IntegerArray::IntegerArray(), Mers::Utils::Containers::ObjectArray::ObjectArray(), and operator=().

Here is the call graph for this function:

int DynamicArray::grow | ( |  | ) | `[protected]`

Doubles the maximum array size, unless it's zero, at which point it creates an array of size 1

Returns:
  0 on success or non-zero if the size failed to be changed

Definition at line 502 of file DynamicArray.cpp.

References array, maxSize, and mSize.

Referenced by pushBack().

int DynamicArray::shrink | ( |  | ) | `[protected]`

Halves the maximum array size, unless it's <= 2, at which point it does nothing

Returns:
  0 on success or non-zero if the size failed to be changed this procedure returns 0 if the current maxSize is <= 2 and does nothing

Definition at line 533 of file DynamicArray.cpp.

References array, deleteElement(), maxSize, mSize, and ownsElements.

Referenced by popBack().

Here is the call graph for this function:

int DynamicArray::pushBack | ( | void * | data | ) | `[protected]`

Adds a data element to the end of the array, allocating space if necessary for it to fit. This object assumes ownership of data object and will delete it when this object is destroyed, if appropriate.

Parameters:

  | data | pointer to the data being added

Returns:
  0 on success or a positive number if the data could not be added

Definition at line 572 of file DynamicArray.cpp.

References array, deleteElement(), grow(), maxSize, mSize, and ownsElements.

Referenced by Mers::Utils::Containers::DynamicHeap::insert(), insert(), operator+=(), Mers::Utils::Containers::StackTemplate< Data >::push(), Mers::Utils::Containers::IntegerArray::pushBack(), and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::pushBack().

Here is the call graph for this function:

void * DynamicArray::popBack | ( |  | ) | `[protected]`

returns the last element of the array and removes it from the array, also reduces the size of the array should it fall below 1/4 full

Returns:
  the data element at the end of the current array

Reimplemented in Mers::Models::Base::BaseModelAssignmentArray, Mers::Models::Base::BaseModelClauseArray, Mers::Models::Base::BaseModelDomainArray, Mers::Models::Base::BaseModelValueArray, Mers::Models::Base::BaseModelVariableArray, Mers::Models::Base::BaseModelVariableArrayArray, Mers::Models::CCA::CCAAutomata, Mers::Models::CCA::CCASentence, Mers::Models::CCA::CCAStates, Mers::Models::CCA::CCATransitions, Mers::Models::CCA::CCAVariables, Mers::Utils::Containers::DynamicArrayTemplate< Data >, Mers::Utils::Containers::IntegerArray, Mers::Utils::Containers::ObjectArray, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Models::Base::BaseModelAssignmentArray >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyNode >, Mers::Utils::Containers::DynamicArrayTemplate< DependencyHyperedge >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::ParameterLiteral >, Mers::Utils::Containers::DynamicArrayTemplate< Mers::Solvers::SAT::ValidSAT::VSATVariable >, and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >.

Definition at line 589 of file DynamicArray.cpp.

References array, maxSize, mSize, and shrink().

Referenced by erase(), Mers::Utils::Containers::DynamicHeap::getFirst(), Mers::Utils::Containers::StackTemplate< Data >::pop(), Mers::Utils::Containers::ObjectArray::popBack(), Mers::Utils::Containers::IntegerArray::popBack(), and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::popBack().

Here is the call graph for this function:

void DynamicArray::insert | ( | unsigned int | elementIndex,
|  | void * | data |
| ) |  |  | `[protected]`

Inserts a new element at the specified index.

Parameters:

  | elementIndex | the index that the item should be inserted at
  | data | the data being inserted

Definition at line 607 of file DynamicArray.cpp.

References array, mSize, and pushBack().

Referenced by Mers::Utils::Containers::IntegerArray::insert(), and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::insert().

Here is the call graph for this function:

DynamicArray const & DynamicArray::operator= | ( | DynamicArray const & | other | ) | `[protected]`

copies the data from the other array to this array. This can be expensive for long arrays. The origional data in this array is destroyed.

Parameters:

  | other | the array supplying the data for this array

Returns:
  the other array

Definition at line 620 of file DynamicArray.cpp.

References copy().

Referenced by Mers::Utils::Containers::ObjectArray::operator=(), Mers::Utils::Containers::IntegerArray::operator=(), and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::operator=().

Here is the call graph for this function:

DynamicArray const & DynamicArray::operator+= | ( | DynamicArray const & | other | ) | `[protected]`

appends a copy of the data from the other array to this array. This can be expensive for long arrays.

Parameters:

  | other | the array supplying the data for this array

Returns:
  this array

Definition at line 634 of file DynamicArray.cpp.

References array, getLength(), mSize, newElement(), ownsElements, printElement(), and resize().

Referenced by Mers::Utils::Containers::ObjectArray::operator+=(), Mers::Utils::Containers::IntegerArray::operator+=(), and Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::operator+=().

Here is the call graph for this function:

DynamicArray const & DynamicArray::operator+= | ( | void const * | other | ) | `[protected]`

appends a copy of the data from the other array to this array. This can be expensive for long arrays.

Parameters:

  | other | the array supplying the data for this array

Returns:
  this array

Definition at line 680 of file DynamicArray.cpp.

References newElement(), ownsElements, and pushBack().

Here is the call graph for this function:

bool DynamicArray::operator== | ( | DynamicArray const & | other | ) | const`[protected]`

Returns true if the two arrays have all the same elements in the same order

Parameters:

  | other | the array being compared to this array

Returns:
  true if the two arrays have the same elements in the same order

Definition at line 704 of file DynamicArray.cpp.

References array, isEqual(), and mSize.

Referenced by Mers::Utils::Containers::ObjectArray::operator!=(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::operator!=(), operator!=(), Mers::Utils::Containers::ObjectArray::operator==(), Mers::Utils::Containers::DynamicArrayTemplate< Mers::Executives::DeductiveController::Command::CommandDispatcherEntry::Parameter >::operator==(), and Mers::Models::Base::BaseModelValueArray::operator==().

Here is the call graph for this function:

bool DynamicArray::operator!= | ( | DynamicArray const & | other | ) | const`[protected]`

Returns false if the two arrays have all the same elements in the same order

Parameters:

  | other | the array being compared to this array

Returns:
  false if the two arrays have the same elements in the same order

Definition at line 718 of file DynamicArray.cpp.

References operator==().

Referenced by Mers::Models::Base::BaseModelValueArray::operator!=().

Here is the call graph for this function:

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

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Containers/DynamicArray.h
- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Containers/DynamicArray.cpp