Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

stilsignallist.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright (c) 2006 International Business Machines Corporation
00003  * All rights reserved. This program and the accompanying materials
00004  * are made available under the terms of the Common Public License v1.0
00005  * which accompanies this distribution, and is available at
00006  * http://www.opensource.org/licenses/cpl1.0.php
00007  *
00008  * Contributors:
00009  *    Douglas Sprague, Joel Wheeler - initial API and implementation
00010  *
00011  *****************************************************************************/
00012 
00013 #ifndef STILSignalList_H
00014 #define STILSignalList_H
00015 
00016 #include "stilcom.h"
00017 #include "stilsignal.h"
00018 #include "stilcomstr.h"
00019 
00020 //---------------------------------------------------------------------------
00024 //---------------------------------------------------------------------------
00025 class STILSignalList {
00026 
00027  public:
00028   // - Default Constructor to create and initialize a STILSignalList object
00029   STILSignalList();
00030 
00031   // - Copy Constructor
00032   STILSignalList(const STILSignalList &);
00033 
00034   // - Destructor which frees storage associated with the STILSignalList
00035   virtual ~STILSignalList();
00036 
00037   // - The assignment operator
00038   STILSignalList &  operator=(const STILSignalList &);
00039 
00040   // - Return values off of the list by subscripting
00041   const STILSignal & operator[](const LONG&) const;
00042   const STILSignal & getSignal(const LONG) const;
00043 
00044   // - Put two lists together
00045   STILSignalList operator+(const STILSignalList &);
00046 
00047   // - Concatenate a list
00048   STILSignalList & operator+=(const STILSignalList &);
00049 
00050   // - Take a list of items out of another list
00051   STILSignalList operator-(const STILSignalList &);
00052 
00053   // - Take a list of items out of current list
00054   STILSignalList & operator-=(const STILSignalList &);
00055 
00056   // - Initialize this object
00057   void  init();
00058 
00059   // - Get the number of items on the list
00060   LONG getCount() const;
00061 
00062   // - Get the text of the original sigref expression this list came from
00063   void           setSigRefText(const sstring & srt);
00064   const sstring & getSigRefText() const;
00065 
00066   // - Add a Signal to the list
00067   bool addSignal(const STILSignal&);
00068 
00069   // - print the list
00070   void print(void);
00071 
00072   // - Set the base attributes of each signal on the list to those pointed to
00073   // - by the SignalBlock pointer
00074   void  resetBaseAttr (const STILSignalBlock*);
00075 
00076  private:
00077  // - Remove a signal from the list
00078   bool removeSignal(const STILSignal&);
00079 
00080   std::vector<STILSignal> m_sigList;
00081   sstring                 m_sigRefText;    // text of original sig-ref-expr
00082 };
00083 
00084 //--------------------------------------------------------------------------
00092 //--------------------------------------------------------------------------
00093 inline LONG STILSignalList::getCount() const { return m_sigList.size(); }
00094 
00095 //--------------------------------------------------------------------------
00103 //--------------------------------------------------------------------------
00104 inline void STILSignalList::setSigRefText(const sstring & srt) { m_sigRefText = srt; }
00105 
00106 //--------------------------------------------------------------------------
00114 //--------------------------------------------------------------------------
00115 inline const sstring & STILSignalList::getSigRefText() const { return m_sigRefText; }
00116 #endif

This page last updated on 6 Jul 2007

SourceForge.net Logo