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

# /Users/fpy/titan-1-5-MBARI/Mers/Models/CCA/CCAVariables.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 __CCAVARIABLES__
    00015 #define __CCAVARIABLES__
    00016
    00017 #ifdef _MSC_VER
    00018 #pragma warning( disable : 4786 )
    00019 #endif
    00020
    00021 #include <Mers/Models/Base/BaseModelVariableArray.h>
    00022
    00023 #include <Mers/Utils/Lang/String.h>
    00024
    00025 #include "CCAVariable.h"
    00026
    00027 namespace Mers {
    00028         namespace Models {
    00029                 namespace CCA {
    00030
    00036                         class CCAVariables : public Mers::Models::Base::BaseModelVariableArray
    00037                         {
    00038                         public:
    00040                                 // Type Definitions & Constants
    00042                                 typedef unsigned int    sizeType;
    00044                                 // Constructors, Copy Constructors, & Destructors
    00046
    00054                                 CCAVariables(bool myOwnershipStatus);
    00055                                 CCAVariables(const CCAVariables &other);
    00056                                 ~CCAVariables();
    00057
    00059                                 // Public Function Members
    00061
    00062                                 bool                                            empty()                                                                                                 const;
    00063                                 void                                            clear();
    00064                                 CCAVariable & front();
    00065                                 CCAVariable const & front() const;
    00066                                 CCAVariable & back();
    00067                                 CCAVariable const & back() const;
    00068
    00070                                 const_iterator                  insert_variable(const CCAVariable &new_variable);
    00071                                 const CCAVariable *        variable_p(unsigned int variableUID)        const;
    00072                                 const CCAVariable *             variable_p(const Mers::Utils::Lang::String &variable_name)              const;
    00073
    00085                                 int pushBack(CCAVariable * data);
    00093                                 CCAVariable * popBack();
    00094
    00095 #ifndef EMBEDDED
    00096
    00101                                 void print(std::ostream &out) const;
    00102 #endif
    00103
    00105                                 // Public Operators
    00107                                 bool                                    operator ==(const CCAVariables &other)                  const;
    00108                                 bool                                    operator !=(const CCAVariables &other)                  const;
    00109
    00118                                 CCAVariable * & operator[](int elementIndex);
    00127                                 CCAVariable * & operator[](unsigned int elementIndex);
    00136                                 CCAVariable const * & operator[](int elementIndex) const;
    00145                                 CCAVariable const * & operator[](unsigned int elementIndex) const;
    00146
    00156                                 CCAVariables const & operator =(CCAVariables const &other);
    00165                                 CCAVariables const & operator +=(CCAVariables const &other);
    00175                                 CCAVariables const & operator +=(CCAVariable const &data);
    00176
    00177                         protected:
    00179                                 // Functions
    00181
    00191                                 void * newElement(void const * element) const;
    00202                                 bool isEqual(void const * element1, void const * element2) const;
    00203                         };
    00204                 }
    00205         }
    00206 }
    00207
    00208 #endif