00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
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
00047 class sc_fxnum_observer;
00048 class sc_fxnum_fast_observer;
00049
00050
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
00098
00099
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
00124
00125
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
00149
00150
00151
00152
00153
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
00179
00180
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 }
00204
00205
00206 #endif
00207
00208