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 STILWaveformTable_H 00014 #define STILWaveformTable_H 00015 00016 00017 #include "stilcom.h" // Common library 00018 #include "stilcomstr.h" 00019 #include "stilblock.h" 00020 #include "stiltimeexpr.h" 00021 #include "stiltimingwaveformref.h" 00022 #include "stilsubwaveforms.h" 00023 #include "stilwaveforms.h" 00024 00025 #include <list> 00026 00027 //--------------------------------------------------------------------------- 00033 //--------------------------------------------------------------------------- 00034 class STILWaveformTable : public STILBlock { 00035 00036 // - Public members 00037 public: 00038 // - Default constructor 00039 STILWaveformTable(); 00040 00041 // - Copy Constructor 00042 STILWaveformTable(const STILWaveformTable &); 00043 00044 // - Destructor 00045 virtual ~STILWaveformTable(); 00046 00047 // - Assignment operator 00048 STILWaveformTable & operator=(const STILWaveformTable &); 00049 00050 // - Initialize/reset this object 00051 void init(const sstring&); 00052 00053 // - Write this object out to a file 00054 virtual void write(FILE * pOutFile, LONG indentation=0) const; 00055 00056 00057 // - Get/Set the period of the waveform table 00058 void setPeriod(const STILTimeExpr &per); 00059 const STILTimeExpr& getPeriod() const ; 00060 00061 00062 // - Get/Set the period resource tag of the waveform table (1450.3 addition) 00063 void setPeriodResourceTag(const sstring & tag); 00064 const sstring & getPeriodResourceTag() const; 00065 00066 // - Add an inherit waveformtable reference 00067 void addInheritWaveformTable(const sstring); 00068 void addInheritWaveformTable(const STILTimingWaveformRef &); 00069 00070 // - Get/Set the subwaveforms block of this object (optional) 00071 void setSubWaveforms(const STILSubWaveforms &); 00072 const STILSubWaveforms * getSubWaveforms(); 00073 00074 // - Get/Set the waveforms block of this object (not optional) 00075 void setWaveforms(const STILWaveforms &); 00076 const STILWaveforms * getWaveforms(); 00077 00078 00079 // - Private members 00080 private: 00081 void updateEntityList(); //when there are some members in here 00082 00083 // Expression for the time period of this waveform 00084 STILTimeExpr m_period; 00085 00086 // Period resource tag value 00087 sstring m_periodResourceTag; 00088 00089 // Reference to inherited waveform table 00090 std::list<STILTimingWaveformRef> m_inhWFTList; 00091 00092 // Subwaveforms block 00093 STILSubWaveforms m_swfs; 00094 00095 // Waveforms block 00096 STILWaveforms m_wfs; 00097 00098 }; 00099 00100 00101 //-------------------------------------------------------------------------- 00109 //------------------------------------------------------------------------- 00110 inline const STILTimeExpr& STILWaveformTable::getPeriod() const { return m_period; } 00111 00112 //-------------------------------------------------------------------------- 00120 //------------------------------------------------------------------------- 00121 inline const sstring & STILWaveformTable::getPeriodResourceTag() const { return m_periodResourceTag; } 00122 00123 //-------------------------------------------------------------------------- 00131 //------------------------------------------------------------------------- 00132 inline const STILSubWaveforms * STILWaveformTable::getSubWaveforms() { return &m_swfs; } 00133 00134 //-------------------------------------------------------------------------- 00142 //------------------------------------------------------------------------- 00143 inline const STILWaveforms * STILWaveformTable::getWaveforms() { return &m_wfs; } 00144 00145 00146 #endif