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

stilwaveformevent.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 STILWaveformEvent_H
00014 #define STILWaveformEvent_H
00015 
00016 
00017 #include "stilcom.h"               // Common library
00018 #include "stilblock.h"
00019 #include "stiltimeexpr.h"
00020 #include "stileventlist.h"
00021 #include "stilevent.h"
00022 #include "stilcomstr.h"
00023 
00024 #define POUND_SIGN -2
00025 #define UNDEFD_VAL -1
00026 
00027 //---------------------------------------------------------------------------
00034 //---------------------------------------------------------------------------
00035 class STILWaveformEvent : public STILEntity {
00036 
00037   // - Public members
00038   public:
00039     // - Default constructor
00040     STILWaveformEvent();
00041 
00042     // - Copy Constructor
00043     STILWaveformEvent(const STILWaveformEvent &);
00044 
00045     // - Destructor
00046     virtual ~STILWaveformEvent();
00047 
00048     // - Assignment operator
00049     STILWaveformEvent & operator=(const STILWaveformEvent &);
00050 
00051     // - Initialize/reset this object
00052     void init();
00053 
00054     // - Get/Set the time expression
00055     void setTimeExpr(const STILTimeExpr &arg);
00056     const STILTimeExpr* getTimeExpr() const;
00057 
00058     // - Get/Set a list of events corresponding to the time expression
00059     void setEventList(const STILEventList &);
00060     const STILEventList* getEventList() const;
00061 
00062     // - Get/Set an event number to correspond with this event
00063     void setEventNum(const LONG);
00064     LONG getEventNum() const;
00065 
00066     // - Set the subwaveformlabel associated with this object
00067     // (only available in Waveforms blocks)
00068     void setSubWaveformLabel(const sstring);
00069     sstring getSubWaveformLabel() const;
00070 
00071     // - Set the subwaveformnum associated with this object
00072     // (only available in Waveforms blocks)
00073     void setSubWaveformNum(const LONG);
00074     LONG getSubWaveformNum() const;
00075 
00076     // - Set the subwaveformrepeat associated with this object
00077     // (only available in Waveforms blocks)
00078     void setSubWaveformRepeat(const LONG);
00079     LONG getSubWaveformRepeat() const;
00080 
00081     // - Write this object out to a file
00082     virtual void write(FILE * pOutFile, LONG indentation=0) const;
00083 
00084 
00085   // - Private members
00086   private:
00087 
00088     STILTimeExpr m_timeExpr; //The time expr
00089 
00090     LONG   m_eventNum,        //event number
00091            m_repeat,           //repeat count
00092            m_SWFNum;          //subwaveform number, -1=uninit'd, -2=#
00093 
00094     sstring m_SWFLabel;
00095 
00096     //The list of events, (force, expect, compare, and unresolved events)
00097     STILEventList m_eventList;
00098 
00099 
00100 };
00101 
00102 // - Get/Set the time expression
00103 //--------------------------------------------------------------------------
00111 //--------------------------------------------------------------------------
00112 inline    void STILWaveformEvent::setTimeExpr(const STILTimeExpr &arg) { m_timeExpr = arg;   }
00113 
00114 //--------------------------------------------------------------------------
00122 //--------------------------------------------------------------------------
00123 inline    const STILTimeExpr* STILWaveformEvent::getTimeExpr() const         { return &m_timeExpr; }
00124 
00125 //--------------------------------------------------------------------------
00133 //--------------------------------------------------------------------------
00134 inline    const STILEventList* STILWaveformEvent::getEventList() const       { return &m_eventList; }
00135 
00136 //--------------------------------------------------------------------------
00144 //--------------------------------------------------------------------------
00145 inline    LONG STILWaveformEvent::getEventNum() const  { return m_eventNum; }
00146 
00147 //--------------------------------------------------------------------------
00155 //--------------------------------------------------------------------------
00156 inline    sstring STILWaveformEvent::getSubWaveformLabel() const         { return m_SWFLabel; }
00157 
00158 //--------------------------------------------------------------------------
00166 //--------------------------------------------------------------------------
00167     // - Set the subwaveformnum associated with this object
00168     // (only available in Waveforms blocks)
00169 inline    LONG STILWaveformEvent::getSubWaveformNum() const       { return m_SWFNum;  }
00170 
00171 //--------------------------------------------------------------------------
00179 //--------------------------------------------------------------------------
00180 inline    LONG STILWaveformEvent::getSubWaveformRepeat() const         { return m_repeat; }
00181 
00182 
00183 #endif

This page last updated on 6 Jul 2007

SourceForge.net Logo