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

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

# Mers::Models::CCA::CCATransitions Class Reference

`#include <CCATransitions.h>`

Inheritance diagram for Mers::Models::CCA::CCATransitions:

[legend]
Collaboration diagram for Mers::Models::CCA::CCATransitions:

[legend]
List of all members.

## Public Types
typedef unsigned int | sizeType
typedef CCATransition * | pointer
typedef const CCATransition * | const_pointer
typedef CCATransitions | ContainerType
typedef Mers::Utils::Containers::IteratorTemplate< const_pointer, ContainerType > | const_iterator
typedef Mers::Utils::Containers::IteratorTemplate< pointer, ContainerType > | iterator
typedef const_iterator | ConstantIterator
typedef iterator | Iterator
## Public Member Functions
| CCATransitions (bool myOwnershipStatus)
| CCATransitions (const CCATransitions &other)
| ~CCATransitions ()
bool | empty () const
void | clear ()
Iterator | begin ()
ConstantIterator | begin () const
Iterator | end ()
ConstantIterator | end () const
const_iterator | insert_transition (const CCATransition &new_transition)
const_iterator | insert_transition_p (CCATransition *new_transition)
int | pushBack (CCATransition *data)
CCATransition * | popBack ()
void | print (std::ostream &out) const
bool | operator== (const CCATransitions &other) const
bool | operator!= (const CCATransitions &other) const
CCATransition *& | operator[] (int elementIndex)
CCATransition *& | operator[] (unsigned int elementIndex)
CCATransition const *& | operator[] (int elementIndex) const
CCATransition const *& | operator[] (unsigned int elementIndex) const
CCATransitions const & | operator= (CCATransitions const &other)
CCATransitions const & | operator+= (CCATransitions const &other)
CCATransitions const & | operator+= (CCATransition const &data)
## Protected Member Functions
void * | newElement (void const *element) const
bool | isEqual (void const *element1, void const *element2) const
## Protected Attributes
bool | hasReferences

## Detailed Description

This class contains a collection of CCATransitions

Author:
  Seung H. Chung

Definition at line 34 of file CCATransitions.h.

## Constructor & Destructor Documentation

CCATransitions::CCATransitions | ( | bool | myOwnershipStatus | ) |

Creates a new, empty array of CCA transitions

Parameters:

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

Definition at line 29 of file CCATransitions.cpp.

References hasReferences.

## Member Function Documentation

Iterator Mers::Models::CCA::CCATransitions::begin | ( |  | ) | `[inline]`

Returns a iterator that points to the first element of this array.

Returns:
  a iterator that starts this object

Reimplemented from Mers::Utils::Containers::ObjectArray.

Definition at line 78 of file CCATransitions.h.

Referenced by insert_transition(), insert_transition_p(), and rpAutomaton::rpAutomaton().

ConstantIterator Mers::Models::CCA::CCATransitions::begin | ( |  | ) | const`[inline]`

Returns a constant iterator that points to the first element of this array.

Returns:
  a constant iterator that starts this object

Reimplemented from Mers::Utils::Containers::ObjectArray.

Definition at line 88 of file CCATransitions.h.

Iterator Mers::Models::CCA::CCATransitions::end | ( |  | ) | `[inline]`

Returns a iterator that points just past the last element of this array.

Returns:
  a iterator that ends this object

Reimplemented from Mers::Utils::Containers::ObjectArray.

Definition at line 99 of file CCATransitions.h.

References Mers::Utils::Containers::DynamicArray::getLength().

Referenced by Mers::Models::CCA::CCAModel::addTransition(), Mers::Models::CCA::CCAState::insert_in_transition(), Mers::Models::CCA::CCAState::insert_out_transition(), insert_transition(), Mers::Models::CCA::CCAAutomaton::insert_transition(), Mers::Models::CCA::CCAAutomata::insert_transition(), and insert_transition_p().

Here is the call graph for this function:

ConstantIterator Mers::Models::CCA::CCATransitions::end | ( |  | ) | const`[inline]`

Returns a constant iterator that points just past the last element of this array.

Returns:
  a constant iterator that ends this object

Reimplemented from Mers::Utils::Containers::ObjectArray.

Definition at line 109 of file CCATransitions.h.

References Mers::Utils::Containers::DynamicArray::getLength().

Here is the call graph for this function:

CCATransitions::const_iterator CCATransitions::insert_transition_p | ( | CCATransition * | new_transition | ) |

Records a reference to the specified transition in this object. This object does not assume ownership of the object, but these pointers should not be mixed with the ones generated from insert_transition and clearAll should be called prior to destruction to ensure that the pointers stored in this object are in fact not deleted.

Parameters:

  | new_transition | the reference of the transition being inserted into this object.

Returns:
  end() if this operation failed or an interator that points to the entry of this transition.

Definition at line 83 of file CCATransitions.cpp.

References begin(), end(), Mers::Utils::Containers::DynamicArray::getLength(), hasReferences, operator[](), and pushBack().

Referenced by Mers::Models::CCA::CCAState::insert_in_transition(), and Mers::Models::CCA::CCAState::insert_out_transition().

Here is the call graph for this function:

int CCATransitions::pushBack | ( | CCATransition * | data | ) |

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.

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 99 of file CCATransitions.cpp.

References Mers::Utils::Containers::DynamicArray::getLength(), and Mers::Models::CCA::CCATransition::setUID().

Referenced by insert_transition(), and insert_transition_p().

Here is the call graph for this function:

CCATransition * CCATransitions::popBack | ( |  | ) |

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 from Mers::Utils::Containers::ObjectArray.

Definition at line 108 of file CCATransitions.cpp.

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

Prints out the CCA Transitions.

Parameters:

  | out | the ostream being written to

Reimplemented from Mers::Utils::Containers::DynamicArray.

Definition at line 117 of file CCATransitions.cpp.

References Mers::Utils::Containers::DynamicArray::printArray().

Here is the call graph for this function:

CCATransition *& CCATransitions::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 from Mers::Utils::Containers::ObjectArray.

Definition at line 143 of file CCATransitions.cpp.

Referenced by insert_transition_p().

CCATransition *& CCATransitions::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 from Mers::Utils::Containers::ObjectArray.

Definition at line 150 of file CCATransitions.cpp.

CCATransition const *& CCATransitions::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 from Mers::Utils::Containers::ObjectArray.

Definition at line 157 of file CCATransitions.cpp.

CCATransition const *& CCATransitions::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 from Mers::Utils::Containers::ObjectArray.

Definition at line 164 of file CCATransitions.cpp.

const CCATransitions & CCATransitions::operator= | ( | CCATransitions const & | other | ) |

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 171 of file CCATransitions.cpp.

const CCATransitions & CCATransitions::operator+= | ( | CCATransitions const & | other | ) |

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 179 of file CCATransitions.cpp.

const CCATransitions & CCATransitions::operator+= | ( | CCATransition const & | data | ) |

Appends a copy of the data to this array. This is the same as pushBack except the data here is copied first, so this object doesn't assume ownership of data.

Parameters:

  | data | the element being copied and added to this array.

Returns:
  this array.

Definition at line 187 of file CCATransitions.cpp.

void * CCATransitions::newElement | ( | void const * | element | ) | const`[protected, virtual]`

Creates and returns a new BaseModelAssignment that is a copy of the BaseModelAssignment element.

Parameters:

  | element | the element being copied.

Returns:
  the new BaseModelAssignment object that is a copy of element.

Reimplemented from Mers::Utils::Containers::ObjectArray.

Definition at line 197 of file CCATransitions.cpp.

References hasReferences.

Referenced by insert_transition().

bool CCATransitions::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 from Mers::Utils::Containers::ObjectArray.

Definition at line 207 of file CCATransitions.cpp.

## Member Data Documentation

bool Mers::Models::CCA::CCATransitions::hasReferences`[protected]`

this is true when this object contains references rather than owning the objects contained in this object

Definition at line 266 of file CCATransitions.h.

Referenced by CCATransitions(), insert_transition_p(), newElement(), and ~CCATransitions().

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

- /Users/fpy/titan-1-5-MBARI/Mers/Models/CCA/CCATransitions.h
- /Users/fpy/titan-1-5-MBARI/Mers/Models/CCA/CCATransitions.cpp