Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

sc_fxval_observer.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003   The following code is derived, directly or indirectly, from the SystemC
00004   source code Copyright (c) 1996-2004 by all Contributors.
00005   All Rights reserved.
00006 
00007   The contents of this file are subject to the restrictions and limitations
00008   set forth in the SystemC Open Source License Version 2.3 (the "License");
00009   You may not use this file except in compliance with such restrictions and
00010   limitations. You may obtain instructions on how to receive a copy of the
00011   License at http://www.systemc.org/. Software distributed by Contributors
00012   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00013   ANY KIND, either express or implied. See the License for the specific
00014   language governing rights and limitations under the License.
00015 
00016  *****************************************************************************/
00017 
00018 /*****************************************************************************
00019 
00020   sc_fxval_observer.h - 
00021 
00022   Original Author: Martin Janssen, Synopsys, Inc.
00023 
00024  *****************************************************************************/
00025 
00026 /*****************************************************************************
00027 
00028   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00029   changes you are making here.
00030 
00031       Name, Affiliation, Date:
00032   Description of Modification:
00033 
00034  *****************************************************************************/
00035 
00036 #ifndef SC_FXVAL_OBSERVER_H
00037 #define SC_FXVAL_OBSERVER_H
00038 
00039 
00040 #include "systemc/datatypes/fx/sc_fxdefs.h"
00041 
00042 
00043 namespace sc_dt
00044 {
00045 
00046 // classes defined in this module
00047 class sc_fxval_observer;
00048 class sc_fxval_fast_observer;
00049 
00050 // forward class declarations
00051 class sc_fxval;
00052 class sc_fxval_fast;
00053 
00054 
00055 #ifdef SC_ENABLE_OBSERVERS
00056 
00057 #define SC_FXVAL_OBSERVER_CONSTRUCT_(object)                                  \
00058     SC_OBSERVER_(object,sc_fxval_observer*,construct)
00059 #define SC_FXVAL_OBSERVER_DESTRUCT_(object)                                   \
00060     SC_OBSERVER_(object,sc_fxval_observer*,destruct)
00061 #define SC_FXVAL_OBSERVER_READ_(object)                                       \
00062     SC_OBSERVER_(object,sc_fxval_observer*,read)
00063 #define SC_FXVAL_OBSERVER_WRITE_(object)                                      \
00064     SC_OBSERVER_(object,sc_fxval_observer*,write)
00065 #define SC_FXVAL_OBSERVER_DEFAULT_                                            \
00066     SC_OBSERVER_DEFAULT_(sc_fxval_observer)
00067 
00068 #define SC_FXVAL_FAST_OBSERVER_CONSTRUCT_(object)                             \
00069     SC_OBSERVER_(object,sc_fxval_fast_observer*,construct)
00070 #define SC_FXVAL_FAST_OBSERVER_DESTRUCT_(object)                              \
00071     SC_OBSERVER_(object,sc_fxval_fast_observer*,destruct)
00072 #define SC_FXVAL_FAST_OBSERVER_READ_(object)                                  \
00073     SC_OBSERVER_(object,sc_fxval_fast_observer*,read)
00074 #define SC_FXVAL_FAST_OBSERVER_WRITE_(object)                                 \
00075     SC_OBSERVER_(object,sc_fxval_fast_observer*,write)
00076 #define SC_FXVAL_FAST_OBSERVER_DEFAULT_                                       \
00077     SC_OBSERVER_DEFAULT_(sc_fxval_fast_observer)
00078 
00079 #else
00080 
00081 #define SC_FXVAL_OBSERVER_CONSTRUCT_(object)
00082 #define SC_FXVAL_OBSERVER_DESTRUCT_(object)
00083 #define SC_FXVAL_OBSERVER_READ_(object)
00084 #define SC_FXVAL_OBSERVER_WRITE_(object)
00085 #define SC_FXVAL_OBSERVER_DEFAULT_
00086 
00087 #define SC_FXVAL_FAST_OBSERVER_CONSTRUCT_(object)
00088 #define SC_FXVAL_FAST_OBSERVER_DESTRUCT_(object)
00089 #define SC_FXVAL_FAST_OBSERVER_READ_(object)
00090 #define SC_FXVAL_FAST_OBSERVER_WRITE_(object)
00091 #define SC_FXVAL_FAST_OBSERVER_DEFAULT_
00092 
00093 #endif
00094 
00095 
00096 // ----------------------------------------------------------------------------
00097 //  CLASS : sc_fxval_observer
00098 //
00099 //  Abstract base class for fixed-point value type observers;
00100 //  arbitrary precision.
00101 // ----------------------------------------------------------------------------
00102 
00103 class sc_fxval_observer
00104 {
00105 
00106 protected:
00107     
00108     sc_fxval_observer() {}
00109     virtual ~sc_fxval_observer() {}
00110 
00111 public:
00112 
00113     virtual void construct( const sc_fxval& );
00114     virtual void  destruct( const sc_fxval& );
00115     virtual void      read( const sc_fxval& );
00116     virtual void     write( const sc_fxval& );
00117 
00118     static sc_fxval_observer* (*default_observer) ();
00119 
00120 };
00121 
00122 
00123 // ----------------------------------------------------------------------------
00124 //  CLASS : sc_fxval_fast_observer
00125 //
00126 //  Abstract base class for fixed-point value type observers;
00127 //  limited precision.
00128 // ----------------------------------------------------------------------------
00129 
00130 class sc_fxval_fast_observer
00131 {
00132 
00133 protected:
00134     
00135     sc_fxval_fast_observer() {}
00136     virtual ~sc_fxval_fast_observer() {}
00137 
00138 public:
00139 
00140     virtual void construct( const sc_fxval_fast& );
00141     virtual void  destruct( const sc_fxval_fast& );
00142     virtual void      read( const sc_fxval_fast& );
00143     virtual void     write( const sc_fxval_fast& );
00144 
00145     static sc_fxval_fast_observer* (*default_observer) ();
00146 
00147 };
00148 
00149 
00150 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
00151 
00152 // ----------------------------------------------------------------------------
00153 //  CLASS : sc_fxval_observer
00154 //
00155 //  Abstract base class for fixed-point value type observers;
00156 //  arbitrary precision.
00157 // ----------------------------------------------------------------------------
00158 
00159 inline
00160 void
00161 sc_fxval_observer::construct( const sc_fxval& )
00162 {}
00163 
00164 inline
00165 void
00166 sc_fxval_observer::destruct( const sc_fxval& )
00167 {}
00168 
00169 inline
00170 void
00171 sc_fxval_observer::read( const sc_fxval& )
00172 {}
00173 
00174 inline
00175 void
00176 sc_fxval_observer::write( const sc_fxval& )
00177 {}
00178 
00179 
00180 // ----------------------------------------------------------------------------
00181 //  CLASS : sc_fxval_fast_observer
00182 //
00183 //  Abstract base class for fixed-point value type observers;
00184 //  limited precision.
00185 // ----------------------------------------------------------------------------
00186 
00187 inline
00188 void
00189 sc_fxval_fast_observer::construct( const sc_fxval_fast& )
00190 {}
00191 
00192 inline
00193 void
00194 sc_fxval_fast_observer::destruct( const sc_fxval_fast& )
00195 {}
00196 
00197 inline
00198 void
00199 sc_fxval_fast_observer::read( const sc_fxval_fast& )
00200 {}
00201 
00202 inline
00203 void
00204 sc_fxval_fast_observer::write( const sc_fxval_fast& )
00205 {}
00206 
00207 } // namespace sc_dt
00208 
00209 
00210 #endif
00211 
00212 // Taf!

Generated on Fri Jan 14 08:29:02 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18