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

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

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #ifndef __CCATRANSITIONS__
    00015 #define __CCATRANSITIONS__
    00016
    00017 #ifdef _MSC_VER
    00018 #pragma warning( disable : 4786 )
    00019 #endif
    00020
    00021 #include <Mers/Utils/Containers/ObjectArray.h>
    00022
    00023 #include "CCATransition.h"
    00024
    00025 namespace Mers {
    00026         namespace Models {
    00027                 namespace CCA {
    00028
    00034                         class CCATransitions : public Mers::Utils::Containers::ObjectArray
    00035                         {
    00036                         public:
    00038                                 // Type Definitions & Constants
    00040                                 typedef unsigned int    sizeType;
    00042                                 // Constructors, Copy Constructors, & Destructors
    00044
    00051                                 CCATransitions(bool myOwnershipStatus);
    00052                                 CCATransitions(const CCATransitions &other);
    00053                                 ~CCATransitions();
    00054
    00056                                 // Iterators
    00058
    00059                                 typedef CCATransition * pointer;
    00060                                 typedef const CCATransition * const_pointer;
    00061                                 typedef CCATransitions ContainerType;
    00062                                 typedef Mers::Utils::Containers::IteratorTemplate<const_pointer, ContainerType> const_iterator;
    00063                                 typedef Mers::Utils::Containers::IteratorTemplate<pointer, ContainerType> iterator;
    00064                                 typedef const_iterator ConstantIterator;
    00065                                 typedef iterator Iterator;
    00066
    00068                                 // Public Function Members
    00070                                 bool                                    empty()                                                                         const;
    00071                                 void                                    clear();
    00072
    00078                                 Iterator begin()
    00079                                 {
    00080                                         return Iterator(this, 0);
    00081                                 }
    00088                                 ConstantIterator begin() const
    00089                                 {
    00090                                         return ConstantIterator((ContainerType *)this, 0);
    00091                                 }
    00092
    00099                                 Iterator         end()
    00100                                 {
    00101                                         return Iterator(this, getLength());
    00102                                 }
    00109                                 ConstantIterator end() const
    00110                                 {
    00111                                         return ConstantIterator((ContainerType *)this, getLength());
    00112                                 }
    00113
    00115                                 const_iterator                  insert_transition(const CCATransition &new_transition);
    00116
    00131                                 const_iterator insert_transition_p(CCATransition * new_transition);
    00132
    00144                                 int pushBack(CCATransition * data);
    00152                                 CCATransition * popBack();
    00153
    00154 #ifndef EMBEDDED
    00155
    00160                                 void print(std::ostream &out) const;
    00161 #endif
    00162
    00164                                 // Public Operators
    00166                                 bool                                    operator ==(const CCATransitions &other)                const;
    00167                                 bool                                    operator !=(const CCATransitions &other)                const;
    00168
    00177                                 CCATransition * & operator[](int elementIndex);
    00186                                 CCATransition * & operator[](unsigned int elementIndex);
    00195                                 CCATransition const * & operator[](int elementIndex) const;
    00204                                 CCATransition const * & operator[](unsigned int elementIndex) const;
    00205
    00215                                 CCATransitions const & operator =(CCATransitions const &other);
    00224                                 CCATransitions const & operator +=(CCATransitions const &other);
    00234                                 CCATransitions const & operator +=(CCATransition const &data);
    00235
    00236                         protected:
    00238                                 // Functions
    00240
    00250                                 void * newElement(void const * element) const;
    00261                                 bool isEqual(void const * element1, void const * element2) const;
    00262
    00263                         protected:
    00266                                 bool hasReferences;
    00267                         };
    00268                 }
    00269         }
    00270 }
    00271
    00272 #endif
    00273