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

sc_fxnum_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_fxnum_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_FXNUM_OBSERVER_H
00037 #define SC_FXNUM_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_fxnum_observer;
00048 class sc_fxnum_fast_observer;
00049 
00050 // forward class declarations
00051 class sc_fxnum;
00052 class sc_fxnum_fast;
00053 
00054 
00055 #ifdef SC_ENABLE_OBSERVERS
00056 
00057 #define SC_FXNUM_OBSERVER_CONSTRUCT_(object)                                  \
00058     SC_OBSERVER_(object,sc_fxnum_observer*,construct)
00059 #define SC_FXNUM_OBSERVER_DESTRUCT_(object)                                   \
00060     SC_OBSERVER_(object,sc_fxnum_observer*,destruct)
00061 #define SC_FXNUM_OBSERVER_READ_(object)                                       \
00062     SC_OBSERVER_(object,sc_fxnum_observer*,read)
00063 #define SC_FXNUM_OBSERVER_WRITE_(object)                                      \
00064     SC_OBSERVER_(object,sc_fxnum_observer*,write)
00065 #define SC_FXNUM_OBSERVER_DEFAULT_                                            \
00066     SC_OBSERVER_DEFAULT_(sc_fxnum_observer)
00067 
00068 #define SC_FXNUM_FAST_OBSERVER_CONSTRUCT_(object)                             \
00069     SC_OBSERVER_(object,sc_fxnum_fast_observer*,construct)
00070 #define SC_FXNUM_FAST_OBSERVER_DESTRUCT_(object)                              \
00071     SC_OBSERVER_(object,sc_fxnum_fast_observer*,destruct)
00072 #define SC_FXNUM_FAST_OBSERVER_READ_(object)                                  \
00073     SC_OBSERVER_(object,sc_fxnum_fast_observer*,read)
00074 #define SC_FXNUM_FAST_OBSERVER_WRITE_(object)                                 \
00075     SC_OBSERVER_(object,sc_fxnum_fast_observer*,write)
00076 #define SC_FXNUM_FAST_OBSERVER_DEFAULT_                                       \
00077     SC_OBSERVER_DEFAULT_(sc_fxnum_fast_observer)
00078 
00079 #else
00080 
00081 #define SC_FXNUM_OBSERVER_CONSTRUCT_(object)
00082 #define SC_FXNUM_OBSERVER_DESTRUCT_(object)
00083 #define SC_FXNUM_OBSERVER_READ_(object)
00084 #define SC_FXNUM_OBSERVER_WRITE_(object)
00085 #define SC_FXNUM_OBSERVER_DEFAULT_
00086 
00087 #define SC_FXNUM_FAST_OBSERVER_CONSTRUCT_(object)
00088 #define SC_FXNUM_FAST_OBSERVER_DESTRUCT_(object)
00089 #define SC_FXNUM_FAST_OBSERVER_READ_(object)
00090 #define SC_FXNUM_FAST_OBSERVER_WRITE_(object)
00091 #define SC_FXNUM_FAST_OBSERVER_DEFAULT_
00092 
00093 #endif
00094 
00095 
00096 // ----------------------------------------------------------------------------
00097 //  CLASS : sc_fxnum_observer
00098 //
00099 //  Abstract base class for fixed-point types observers; arbitrary precision.
00100 // ----------------------------------------------------------------------------
00101 
00102 class sc_fxnum_observer
00103 {
00104 
00105 protected:
00106     
00107     sc_fxnum_observer() {}
00108     virtual ~sc_fxnum_observer() {}
00109 
00110 public:
00111 
00112     virtual void construct( const sc_fxnum& );
00113     virtual void  destruct( const sc_fxnum& );
00114     virtual void      read( const sc_fxnum& );
00115     virtual void     write( const sc_fxnum& );
00116 
00117     static sc_fxnum_observer* (*default_observer) ();
00118 
00119 };
00120 
00121 
00122 // ----------------------------------------------------------------------------
00123 //  CLASS : sc_fxnum_fast_observer
00124 //
00125 //  Abstract base class for fixed-point types observers; limited precision.
00126 // ----------------------------------------------------------------------------
00127 
00128 class sc_fxnum_fast_observer
00129 {
00130 
00131 protected:
00132     
00133     sc_fxnum_fast_observer() {}
00134     virtual ~sc_fxnum_fast_observer() {}
00135 
00136 public:
00137 
00138     virtual void construct( const sc_fxnum_fast& );
00139     virtual void  destruct( const sc_fxnum_fast& );
00140     virtual void      read( const sc_fxnum_fast& );
00141     virtual void     write( const sc_fxnum_fast& );
00142 
00143     static sc_fxnum_fast_observer* (*default_observer) ();
00144 
00145 };
00146 
00147 
00148 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
00149 
00150 // ----------------------------------------------------------------------------
00151 //  CLASS : sc_fxnum_observer
00152 //
00153 //  Abstract base class for fixed-point types observers; arbitrary precision.
00154 // ----------------------------------------------------------------------------
00155 
00156 inline
00157 void
00158 sc_fxnum_observer::construct( const sc_fxnum& )
00159 {}
00160 
00161 inline
00162 void
00163 sc_fxnum_observer::destruct( const sc_fxnum& )
00164 {}
00165 
00166 inline
00167 void
00168 sc_fxnum_observer::read( const sc_fxnum& )
00169 {}
00170 
00171 inline
00172 void
00173 sc_fxnum_observer::write( const sc_fxnum& )
00174 {}
00175 
00176 
00177 // ----------------------------------------------------------------------------
00178 //  CLASS : sc_fxnum_fast_observer
00179 //
00180 //  Abstract base class for fixed-point types observers; limited precision.
00181 // ----------------------------------------------------------------------------
00182 
00183 inline
00184 void
00185 sc_fxnum_fast_observer::construct( const sc_fxnum_fast& )
00186 {}
00187 
00188 inline
00189 void
00190 sc_fxnum_fast_observer::destruct( const sc_fxnum_fast& )
00191 {}
00192 
00193 inline
00194 void
00195 sc_fxnum_fast_observer::read( const sc_fxnum_fast& )
00196 {}
00197 
00198 inline
00199 void
00200 sc_fxnum_fast_observer::write( const sc_fxnum_fast& )
00201 {}
00202 
00203 } // namespace sc_dt
00204 
00205 
00206 #endif
00207 
00208 // Taf!

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