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