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

stilpatternburstblock.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 STILPatternBurstBlock_H
00014 #define STILPatternBurstBlock_H
00015 
00016 #include "stilcom.h"             // Common
00017 #include "stilcomstr.h"
00018 #include "stilblock.h"           // STIL Block common base class
00019 #include "stilterminations.h"    // STILTermination class
00020 
00021 #include <list>
00022 
00023 
00024 //---------------------------------------------------------------------------
00039 //---------------------------------------------------------------------------
00040 class STILPatternBurstBlock : public STILBlock {
00041 
00042   // - Global std::ostream << operator as friend to output STILPatternBurstBlock object
00043   friend std::ostream& operator<<( std::ostream &os, const STILPatternBurstBlock &);
00044 
00045   public:
00046 
00047     enum PAT_TERMINATION {
00048                TERMINATION_UNDEFINED = 0,
00049                TERMINATION_HIGH      = 1,
00050                TERMINATION_LOW       = 2,
00051                TERMINATION_OFF       = 3,
00052                TERMINATION_UNKNOWN   = 4
00053     };
00054 
00055 // Dont think this is necessary anymore with introduction of STILTerminations (JW-11/19/99)
00056 //    struct  TERMINATION_STRUCT {
00057 //               sstring                TerminationExprString;
00058 //            // expr_tree             TerminationExpr;
00059 //               PAT_TERMINATION       Termination;
00060 //    };
00061 
00062     // - Default Constructor
00063     STILPatternBurstBlock();
00064 
00065     // - Constructor given a STILEntity::Type
00066     STILPatternBurstBlock(STILEntity::Type t);
00067 
00068     // - Copy Constructor
00069     STILPatternBurstBlock(const   STILPatternBurstBlock &);
00070 
00071     // - Destructor which frees storage associated to a STILPatternBurstBlock object
00072     virtual ~STILPatternBurstBlock();
00073 
00074     // - Assignment operator
00075     STILPatternBurstBlock & operator=(const STILPatternBurstBlock &);
00076 
00077     // - Member function to initialize a PatternBurstBlock object
00078     void init();
00079 
00080     // - Member function to write the PatternBurst block
00081     virtual void write(FILE * pOutFile, LONG indentation=0) const;
00082 
00083     // - Member functions to set/get the Start label
00084     void setStart(const sstring & label);
00085 
00086     // - Member functions to set/get the Stop label
00087     void setStop(const sstring & label);
00088 
00089     // - Member functions to set a SignalGroup domain name
00090     // Was previously setSignalGroups_ref, still refers to SignalGroupsRef
00091     void addSignalGroups(const sstring & name);
00092 
00093     // - Member functions to set a MacroDefs domain name
00094     // Was previously setMacroDefs_ref, still refers to MacroDefsRef
00095     void addMacroDefs(const sstring & name);
00096 
00097     // - Member functions to set a Procedure domain name
00098     // Was previously setProcedures_ref, still refers to ProceduresRef
00099     void addProcedures(const sstring & name);
00100 
00101     // - Member functions to set/get a ScanStructures domain name
00102     // Was previously setScanStructures_ref, still refers to ScanStructuresRef
00103     void addScanStructures(const sstring & name);
00104 
00105     // - Member function to add a Termination definitions
00106     void addTermination(const STILTerminations&);
00107 
00108     private:
00109     //**********************************************************************
00110     //**********************************************************************
00111     // Note: data elements are inherited from STILBlock                    *
00112     //**********************************************************************
00113     //**********************************************************************
00114 
00115     // - Memeber function to update the entity list
00116     void updateEntityList();
00117 
00118     protected: // may be accessed from STILPatternBurst
00119     // List of STILTerminations
00120     std::list<STILTerminations> m_termsList;
00121 
00122 }; // end STILPatternBurstBlock class
00123 
00124 
00125 // Inline functions
00126 
00127 //--------------------------------------------------------------------------
00135 //--------------------------------------------------------------------------
00136 inline void STILPatternBurstBlock::setStart(const sstring & name) {
00137   addEntity(Start,"Start",name);
00138 }
00139 
00140 //--------------------------------------------------------------------------
00148 //--------------------------------------------------------------------------
00149 inline void STILPatternBurstBlock::setStop(const sstring & name) {
00150   addEntity(Stop,"Stop",name);
00151 }
00152 
00153 //--------------------------------------------------------------------------
00161 //--------------------------------------------------------------------------
00162 inline void STILPatternBurstBlock::addSignalGroups(const sstring & name) {
00163   addEntity(SignalGroupsRef,"SignalGroups",name);
00164 }
00165 
00166 //--------------------------------------------------------------------------
00174 //--------------------------------------------------------------------------
00175 inline void STILPatternBurstBlock::addMacroDefs(const sstring & name) {
00176   addEntity(MacroDefsRef,"MacroDefs",name);
00177 }
00178 
00179 //--------------------------------------------------------------------------
00187 //--------------------------------------------------------------------------
00188 inline void STILPatternBurstBlock::addProcedures(const sstring & name) {
00189   addEntity(ProceduresRef,"Procedures",name);
00190 }
00191 
00192 //--------------------------------------------------------------------------
00200 //--------------------------------------------------------------------------
00201 inline void STILPatternBurstBlock::addScanStructures(const sstring & name) {
00202   addEntity(ScanStructuresRef,"ScanStructures",name);
00203 }
00204 
00205 #endif
00206 

This page last updated on 6 Jul 2007

SourceForge.net Logo