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