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

_scv_introspection.h

Go to the documentation of this file.
00001 //  -*- C++ -*- <this line is for emacs to recognize it as C++ code>
00002 /*****************************************************************************
00003 
00004   The following code is derived, directly or indirectly, from the SystemC
00005   source code Copyright (c) 1996-2002 by all Contributors.
00006   All Rights reserved.
00007 
00008   The contents of this file are subject to the restrictions and limitations
00009   set forth in the SystemC Open Source License Version 2.3 (the "License");
00010   You may not use this file except in compliance with such restrictions and
00011   limitations. You may obtain instructions on how to receive a copy of the
00012   License at http://www.systemc.org/. Software distributed by Contributors
00013   under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
00014   ANY KIND, either express or implied. See the License for the specific
00015   language governing rights and limitations under the License.
00016 
00017  *****************************************************************************/
00018 
00019 /*****************************************************************************
00020 
00021   _scv_introspection.h -- The main implementation for the introspection
00022   facility.
00023 
00024   Original Authors (Cadence Design Systems, Inc):
00025   Norris Ip, Dean Shea, John Rose, Jasvinder Singh, William Paulsen,
00026   John Pierce, Rachida Kebichi, Ted Elkind, David Bailey
00027   2002-09-23
00028 
00029  *****************************************************************************/
00030 
00031 /*****************************************************************************
00032 
00033   MODIFICATION LOG - modifiers, enter your name, affiliation, date and
00034   changes you are making here.
00035 
00036       Name, Affiliation, Date:
00037   Description of Modification:
00038 
00039  *****************************************************************************/
00040 
00041 // ----------------------------------------
00042 // final definition of the extension classes for builtin C/C++ types
00043 // ----------------------------------------
00044 
00045 #if !( defined( __HP_aCC ) || defined(__linux__) )
00046 #define _SCV_OSTREAM(typename) \
00047  friend ostream& operator<<(ostream& os,                            \
00048            const scv_extensions< typename >& e) { \
00049     const_cast<scv_extensions< typename >& >(e).initialize(); \
00050     os << *e._get_instance(); return os; \
00051   }
00052 #else
00053 #define _SCV_OSTREAM(typename)
00054 #endif
00055 
00056 template<>
00057 class scv_extensions<bool>
00058   : public scv_extensions_base<bool> {
00059 public:
00060   scv_extensions<bool>& operator=(bool b)
00061     { *_get_instance() = b; trigger_value_change_cb(); return *this; }
00062   operator bool() const {
00063     const_cast<scv_extensions<bool> * >(this)->initialize();
00064     return *_get_instance();
00065   }
00066   _SCV_OSTREAM(bool)
00067   _SCV_PAREN_OPERATOR(typename)
00068 };
00069 
00070 #define _SCV_INTEGER_INTERFACE(typename) \
00071 public:                                                             \
00072   scv_extensions< typename >& operator=(const scv_extensions<typename>& i) { \
00073     *_get_instance() = *(i._get_instance()); trigger_value_change_cb(); return *this; \
00074   } \
00075   scv_extensions< typename >& operator=(typename i) { \
00076     *_get_instance() = i; trigger_value_change_cb(); return *this; \
00077   } \
00078   scv_extensions< typename >& operator+=(typename i) { \
00079     *_get_instance() += i; trigger_value_change_cb(); return *this; \
00080   } \
00081   scv_extensions< typename >& operator-=(typename i) { \
00082     *_get_instance() -= i; trigger_value_change_cb(); return *this; \
00083   } \
00084   scv_extensions< typename >& operator*=(typename i) { \
00085     *_get_instance() *= i; trigger_value_change_cb(); return *this; \
00086   } \
00087   scv_extensions< typename >& operator/=(typename i) { \
00088     *_get_instance() /= i; trigger_value_change_cb(); return *this; \
00089   } \
00090   scv_extensions< typename >& operator%=(typename i) { \
00091     *_get_instance() %= i; trigger_value_change_cb(); return *this; \
00092   } \
00093   scv_extensions< typename >& operator&=(typename i) { \
00094     *_get_instance() &= i; trigger_value_change_cb(); return *this; \
00095   } \
00096   scv_extensions< typename >& operator|=(typename i) { \
00097     *_get_instance() |= i; trigger_value_change_cb(); return *this; \
00098   } \
00099   scv_extensions< typename >& operator^=(typename i) { \
00100     *_get_instance() ^= i; trigger_value_change_cb(); return *this; \
00101   } \
00102   scv_extensions< typename >& operator<<=(typename i) { \
00103     *_get_instance() <<= i; trigger_value_change_cb(); return *this; \
00104   } \
00105   scv_extensions< typename >& operator>>=(typename i) { \
00106     *_get_instance() >>= i; trigger_value_change_cb(); return *this; \
00107   } \
00108   scv_extensions< typename >& operator++() { \
00109     ++*_get_instance(); trigger_value_change_cb(); return *this; \
00110   } \
00111   typename operator++(int) { \
00112     typename tmp = *_get_instance(); \
00113     ++*_get_instance(); trigger_value_change_cb(); return tmp; \
00114   } \
00115   scv_extensions< typename >& operator--() { \
00116     --*_get_instance(); trigger_value_change_cb(); return *this; \
00117   } \
00118   typename operator--(int) { \
00119     typename tmp = *_get_instance(); \
00120     --*_get_instance(); trigger_value_change_cb(); return tmp; \
00121   } \
00122   operator typename() const { \
00123     const_cast<scv_extensions< typename > * >(this)->initialize(); \
00124     return *_get_instance(); \
00125   } \
00126   _SCV_OSTREAM(typename) \
00127   _SCV_PAREN_OPERATOR(typename) \
00128 
00129 // for all C/C++ builtin integer types
00130 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00131 template<> \
00132 class scv_extensions< typename > \
00133   : public scv_extensions_base< typename > { \
00134   _SCV_INTEGER_INTERFACE(typename) \
00135 };
00136 
00137 _SCV_TAG_FINAL_COMPONENT(char)
00138 _SCV_TAG_FINAL_COMPONENT(unsigned char)
00139 _SCV_TAG_FINAL_COMPONENT(short)
00140 _SCV_TAG_FINAL_COMPONENT(unsigned short)
00141 _SCV_TAG_FINAL_COMPONENT(int)
00142 _SCV_TAG_FINAL_COMPONENT(unsigned int)
00143 _SCV_TAG_FINAL_COMPONENT(long)
00144 _SCV_TAG_FINAL_COMPONENT(unsigned long)
00145 _SCV_TAG_FINAL_COMPONENT(long long)
00146 _SCV_TAG_FINAL_COMPONENT(unsigned long long)
00147 
00148 #undef _SCV_TAG_FINAL_COMPONENT
00149 
00150 // for all C/C++ builtin floating point type types
00151 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00152 template<> \
00153 class scv_extensions< typename > \
00154   : public scv_extensions_base< typename > { \
00155 public:                                                            \
00156   scv_extensions< typename >& operator=(const scv_extensions<typename>& i) { \
00157     *_get_instance() = *(i._get_instance()); trigger_value_change_cb(); return *this; \
00158   }                                                                 \
00159   scv_extensions< typename >& operator=(typename i) { \
00160     *_get_instance() = i; trigger_value_change_cb(); return *this; \
00161   }                                                                \
00162   scv_extensions< typename >& operator+=(typename i) { \
00163     *_get_instance() += i; trigger_value_change_cb(); return *this; \
00164   }                                                                \
00165   scv_extensions< typename >& operator-=(typename i) { \
00166     *_get_instance() -= i; trigger_value_change_cb(); return *this; \
00167   }                                                                \
00168   scv_extensions< typename >& operator*=(typename i) { \
00169     *_get_instance() *= i; trigger_value_change_cb(); return *this; \
00170   }                                                                \
00171   scv_extensions< typename >& operator/=(typename i) { \
00172     *_get_instance() /= i; trigger_value_change_cb(); return *this; \
00173   }                                                                \
00174   operator typename() const { \
00175     const_cast<scv_extensions< typename > * >(this)->initialize(); \
00176     return *_get_instance(); \
00177   }                                                                \
00178   _SCV_OSTREAM(typename); \
00179   _SCV_PAREN_OPERATOR(typename); \
00180 }; \
00181 
00182 _SCV_TAG_FINAL_COMPONENT(float);
00183 _SCV_TAG_FINAL_COMPONENT(double);
00184 
00185 template<>
00186 class scv_extensions<string>
00187   : public scv_extensions_base<string> {
00188 public:
00189   scv_extensions< string >& operator=(const scv_extensions< string >& i) { \
00190     *_get_instance() = *(i._get_instance()); trigger_value_change_cb(); return *this; \
00191   }                                                                 \
00192   scv_extensions<string>& operator=(const string& s) {
00193     *_get_instance() = s; trigger_value_change_cb(); return *this; 
00194   }
00195   scv_extensions<string>& operator=(const char * s) {
00196     *_get_instance() = s; trigger_value_change_cb(); return *this; 
00197   }
00198 #ifdef SYSTEMC_H
00199   //  scv_extensions<string>& operator=(const sc_string& s) {
00200   //    *_get_instance() = s; trigger_value_change_cb(); return *this; 
00201   //  }
00202 #endif
00203   _SCV_OSTREAM(string);
00204 };
00205 
00206 #ifdef SYSTEMC_H
00207 template<>
00208 class scv_extensions<sc_string>
00209   : public scv_extensions_base<sc_string> {
00210 public:
00211   scv_extensions< sc_string >& operator=(const scv_extensions< sc_string >& i) { \
00212     *_get_instance() = *(i._get_instance()); trigger_value_change_cb(); return *this; \
00213   }                                                                 \
00214   scv_extensions<sc_string>& operator=(const sc_string& s) {
00215     *_get_instance() = s; trigger_value_change_cb(); return *this; 
00216   }
00217   scv_extensions<sc_string>& operator=(const char * s) {
00218     *_get_instance() = s; trigger_value_change_cb(); return *this; 
00219   }
00220   _SCV_OSTREAM(sc_string);
00221 };
00222 #endif
00223 
00224 #undef _SCV_TAG_FINAL_COMPONENT
00225 
00226 #undef _SCV_INTEGER_INTERFACE
00227 
00228 #define _SCV_INTEGER_INTERFACE(typename) \
00229 public:                                                            \
00230   scv_extensions< typename >& operator=(const scv_extensions< typename >& i) { \
00231     *this->_get_instance() = *(i._get_instance()); this->trigger_value_change_cb(); return *this; \
00232   }                                                                 \
00233   scv_extensions< typename >& operator=(typename i) { \
00234     *this->_get_instance() = i; this->trigger_value_change_cb(); return *this; \
00235   }                                                                \
00236   scv_extensions< typename >& operator+=(typename i) { \
00237     *this->_get_instance() += i; this->trigger_value_change_cb(); return *this; \
00238   }                                                                \
00239   scv_extensions< typename >& operator-=(typename i) { \
00240     *this->_get_instance() -= i; this->trigger_value_change_cb(); return *this; \
00241   }                                                                \
00242   scv_extensions< typename >& operator*=(typename i) { \
00243     *this->_get_instance() *= i; this->trigger_value_change_cb(); return *this; \
00244   }                                                                \
00245   scv_extensions< typename >& operator/=(typename i) { \
00246     *this->_get_instance() /= i; this->trigger_value_change_cb(); return *this; \
00247   }                                                                \
00248   scv_extensions< typename >& operator%=(typename i) { \
00249     *this->_get_instance() %= i; this->trigger_value_change_cb(); return *this; \
00250   }                                                                \
00251   scv_extensions< typename >& operator&=(typename i) { \
00252     *this->_get_instance() &= i; this->trigger_value_change_cb(); return *this; \
00253   }                                                                \
00254   scv_extensions< typename >& operator|=(typename i) { \
00255     *this->_get_instance() |= i; this->trigger_value_change_cb(); return *this; \
00256   }                                                                \
00257   scv_extensions< typename >& operator^=(typename i) { \
00258     *this->_get_instance() ^= i; this->trigger_value_change_cb(); return *this; \
00259   }                                                                \
00260   scv_extensions< typename >& operator<<=(typename i) { \
00261     *this->_get_instance() <<= i; this->trigger_value_change_cb(); return *this; \
00262   }                                                                \
00263   scv_extensions< typename >& operator>>=(typename i) { \
00264     *this->_get_instance() >>= i; this->trigger_value_change_cb(); return *this; \
00265   }                                                                \
00266   scv_extensions< typename >& operator++() { \
00267     ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; \
00268   }                                                                \
00269   typename operator++(int) { \
00270     typename tmp = *this->_get_instance(); \
00271     ++*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00272   }                                                                \
00273   scv_extensions< typename >& operator--() { \
00274     --*this->_get_instance(); this->trigger_value_change_cb(); return *this; \
00275   }                                                                \
00276   typename operator--(int) { \
00277     typename tmp = *this->_get_instance(); \
00278     --*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00279   }                                                                \
00280   operator typename() const { \
00281     const_cast<scv_extensions< typename > * >(this)->initialize(); \
00282     return *this->_get_instance(); \
00283   }                                                                \
00284   _SCV_OSTREAM(typename); \
00285   _SCV_PAREN_OPERATOR(typename); \
00286 
00287 
00288 // for all SystemC templated types
00289 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00290 template<int N> \
00291 class scv_extensions< typename > \
00292   : public scv_extensions_base< typename > { \
00293   _SCV_INTEGER_INTERFACE(typename); \
00294 };
00295 
00296 #ifdef TEST_NEST_TEMPLATE
00297 _SCV_TAG_FINAL_COMPONENT(test_uint<N> );
00298 #endif
00299 
00300 #ifdef SYSTEMC_H
00301 
00302 // _SCV_TAG_FINAL_COMPONENT(sc_fixed);
00303 // _SCV_TAG_FINAL_COMPONENT(sc_ufixed);
00304 
00305 #undef _SCV_TAG_FINAL_COMPONENT
00306 
00307 #define _SCV_IMPL { *this->_get_instance() = v; this->trigger_value_change_cb(); return *this; }
00308 #define _SCV_IMPL1 { *this->_get_instance() = *(v._get_instance()); this->trigger_value_change_cb(); return *this; }
00309 #define _SCV_IMPL2(op) { this->initialize(); *this->_get_instance() op v; this->trigger_value_change_cb(); return *this; }
00310 #define _SCV_IMPL3(op) { u.initialize(); v.initialize(); return *u._get_instance() op *v._get_instance(); }
00311 #define _SCV_IMPL4(op) { u.initialize(); return *u._get_instance() op v; }
00312 #define _SCV_IMPL5(op) { v.initialize(); return u op *v._get_instance(); }
00313 #define _SCV_MAP(return_type,method) return_type method() const { this->initialize(); return this->_get_instance()->method(); }
00314 
00315 #if SC_VERSION > 2000000
00316 using namespace sc_dt;
00317 #endif
00318 
00319 #define _SCV_BASE_ASSIGN(src_type) \
00320   return_type& operator=(src_type i) \
00321     { *this->_get_instance() = i; this->trigger_value_change_cb(); return *this; } \
00322 
00323 #define _SCV_SIGNED_SELFOP(op,src_type) \
00324   return_type& operator op (src_type i) \
00325     { this->initialize(); *this->_get_instance() += i; this->trigger_value_change_cb(); return *this; } \
00326 
00327 #define _SCV_SIGNED_SELFOPS(op) \
00328   _SCV_SIGNED_SELFOP(op,const sc_signed&) \
00329   _SCV_SIGNED_SELFOP(op,const sc_unsigned&) \
00330   _SCV_SIGNED_SELFOP(op,int64) \
00331   _SCV_SIGNED_SELFOP(op,uint64) \
00332   _SCV_SIGNED_SELFOP(op,long) \
00333   _SCV_SIGNED_SELFOP(op,unsigned long) \
00334   _SCV_SIGNED_SELFOP(op,int) \
00335   _SCV_SIGNED_SELFOP(op,unsigned int) \
00336   _SCV_SIGNED_SELFOP(op,const sc_int_base&) \
00337   _SCV_SIGNED_SELFOP(op,const sc_uint_base&) \
00338 
00339 #ifdef SC_INCLUDE_FX
00340 # define _SCV_INT_FX_ASSIGN() \
00341     _SCV_BASE_ASSIGN(const sc_fxval&) \
00342     _SCV_BASE_ASSIGN(const sc_fxval_fast&) \
00343     _SCV_BASE_ASSIGN(const sc_fxnum&) \
00344     _SCV_BASE_ASSIGN(const sc_fxnum_fast&)
00345 #else
00346 # define _SCV_INT_FX_ASSIGN()
00347 #endif
00348 
00349 #ifdef SC_DT_DEPRECATED
00350 # define _SCV_INT_DEPRECATED(typename) \
00351     _SCV_MAP(int,to_signed) \
00352     _SCV_MAP(unsigned,to_unsigned)
00353 #else
00354 # define _SCV_INT_DEPRECATED(typename)
00355 #endif
00356 
00357 #define _SCV_SIGNED_INTERFACE(typename) \
00358 public: \
00359   operator const typename&() const { this->initialize(); return *this->_get_instance(); } \
00360   typedef scv_extensions< typename > return_type; \
00361   return_type& operator=(const return_type& i) \
00362     { *this->_get_instance() = *(i._get_instance()); this->trigger_value_change_cb(); return *this; } \
00363   _SCV_BASE_ASSIGN(const sc_signed&) \
00364   _SCV_BASE_ASSIGN(const sc_signed_subref&) \
00365   _SCV_BASE_ASSIGN(const sc_unsigned&) \
00366   _SCV_BASE_ASSIGN(const sc_unsigned_subref&) \
00367   _SCV_BASE_ASSIGN(const char*) \
00368   _SCV_BASE_ASSIGN(int64) \
00369   _SCV_BASE_ASSIGN(uint64) \
00370   _SCV_BASE_ASSIGN(long) \
00371   _SCV_BASE_ASSIGN(unsigned long) \
00372   _SCV_BASE_ASSIGN(int) \
00373   _SCV_BASE_ASSIGN(unsigned int) \
00374   _SCV_BASE_ASSIGN(double) \
00375   _SCV_BASE_ASSIGN(const sc_int_base&) \
00376   _SCV_BASE_ASSIGN(const sc_uint_base&) \
00377   _SCV_BASE_ASSIGN(const sc_bv_base&) \
00378   _SCV_BASE_ASSIGN(const sc_lv_base&) \
00379   _SCV_INT_FX_ASSIGN() \
00380   return_type& operator++() \
00381     { ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; } \
00382   typename operator++(int) { \
00383     typename tmp = *this->_get_instance(); \
00384     ++*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00385   } \
00386   return_type& operator--() \
00387     { --*this->_get_instance(); this->trigger_value_change_cb(); return *this; } \
00388   typename operator--(int) { \
00389     typename tmp = *this->_get_instance(); \
00390     --*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00391   } \
00392   _SCV_MAP(int,to_int) \
00393   _SCV_MAP(unsigned int,to_uint) \
00394   _SCV_MAP(long,to_long) \
00395   _SCV_MAP(unsigned long,to_ulong) \
00396   _SCV_MAP(int64,to_int64) \
00397   _SCV_MAP(uint64,to_uint64) \
00398   _SCV_MAP(double,to_double) \
00399   _SCV_INT_DEPRECATED(typename) \
00400   const sc_string to_string(sc_numrep numrep=SC_DEC) const \
00401     { this->initialize(); return this->_get_instance()->to_string(numrep); } \
00402   const sc_string to_string(sc_numrep numrep, bool w_prefix) const \
00403     { this->initialize(); return this->_get_instance()->to_string(numrep,w_prefix); } \
00404   void scan( istream& is = cin ) \
00405     { this->_get_instance()->scan(is); this->trigger_value_change_cb(); } \
00406   void dump( ostream& os = cout ) const \
00407     { this->initialize(); this->_get_instance()->dump(os); } \
00408   _SCV_MAP(int,length) \
00409   _SCV_MAP(bool,iszero) \
00410   _SCV_MAP(bool,sign) \
00411   bool test(int i) const \
00412     { this->initialize(); return this->_get_instance()->test(i); } \
00413   void set(int i) \
00414     { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); } \
00415   void clear(int i) \
00416     { this->initialize(); this->_get_instance()->clear(i); this->trigger_value_change_cb(); } \
00417   void set(int i, bool v) \
00418     { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); } \
00419   void invert(int i) \
00420     { this->initialize(); this->_get_instance()->invert(i); this->trigger_value_change_cb(); } \
00421   void reverse() \
00422     { this->initialize(); this->_get_instance()->reverse(); this->trigger_value_change_cb(); } \
00423   void get_packed_rep(unsigned long *buf) const \
00424     { this->initialize(); this->_get_instance()->get_packed_rep(buf); } \
00425   void set_packed_rep(unsigned long *buf) \
00426     { this->initialize(); this->_get_instance()->set_packed_rep(buf); this->trigger_value_change_cb(); } \
00427   _SCV_SIGNED_SELFOPS(+=) \
00428   _SCV_SIGNED_SELFOPS(-=) \
00429   _SCV_SIGNED_SELFOPS(*=) \
00430   _SCV_SIGNED_SELFOPS(/=) \
00431   _SCV_SIGNED_SELFOPS(%=) \
00432   _SCV_SIGNED_SELFOPS(&=) \
00433   _SCV_SIGNED_SELFOPS(|=) \
00434   _SCV_SIGNED_SELFOPS(^=) \
00435   _SCV_SIGNED_SELFOPS(<<=) \
00436   _SCV_SIGNED_SELFOPS(>>=) \
00437   _SCV_OSTREAM(typename); \
00438   _SCV_PAREN_OPERATOR(typename); \
00439 
00440 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00441 template<> \
00442 class scv_extensions< typename > \
00443   : public scv_extensions_base< typename > { \
00444   _SCV_SIGNED_INTERFACE(typename) \
00445 };
00446 
00447 _SCV_TAG_FINAL_COMPONENT(sc_signed)
00448 _SCV_TAG_FINAL_COMPONENT(sc_unsigned)
00449 
00450 #undef _SCV_TAG_FINAL_COMPONENT
00451 
00452 #define _SCV_INT_BASE_SELFOPS(op) \
00453   _SCV_SIGNED_SELFOP(op,int64) \
00454   _SCV_SIGNED_SELFOP(op,uint64) \
00455   _SCV_SIGNED_SELFOP(op,long) \
00456   _SCV_SIGNED_SELFOP(op,unsigned long) \
00457   _SCV_SIGNED_SELFOP(op,int) \
00458   _SCV_SIGNED_SELFOP(op,unsigned int) \
00459   _SCV_SIGNED_SELFOP(op,const sc_int_base&) \
00460   _SCV_SIGNED_SELFOP(op,const sc_uint_base&) \
00461 
00462 #define _SCV_INT_BASE_INTERFACE(typename) \
00463 public: \
00464   operator const typename&() const { this->initialize(); return *this->_get_instance(); } \
00465   typedef scv_extensions< typename > return_type; \
00466   void invalid_length() const { this->initialize(); this->invalid_length(); } \
00467   void invalid_index(int i) const { this->initialize(); this->invalid_index(i); } \
00468   void invalid_range(int l, int r) const { this->initialize(); this->invalid_range(l,r); } \
00469   void check_length() const { this->initialize(); this->check_length(); } \
00470   void check_index(int i) const { this->initialize(); this->check_index(i); } \
00471   void check_range(int l, int r) const { this->initialize(); this->check_range(l,r); } \
00472   void extend_sign() { this->initialize(); this->extend_sign(); } \
00473   return_type& operator=(const return_type& i) \
00474     { *this->_get_instance() = *(i._get_instance()); this->trigger_value_change_cb(); return *this; } \
00475   _SCV_BASE_ASSIGN(int_type) \
00476   _SCV_BASE_ASSIGN(const sc_int_base&) \
00477   _SCV_BASE_ASSIGN(const sc_int_subref&) \
00478   _SCV_BASE_ASSIGN(const sc_signed&) \
00479   _SCV_BASE_ASSIGN(const sc_unsigned&) \
00480   _SCV_INT_FX_ASSIGN() \
00481   _SCV_BASE_ASSIGN(const sc_bv_base&) \
00482   _SCV_BASE_ASSIGN(const sc_lv_base&) \
00483   _SCV_BASE_ASSIGN(const char*) \
00484   _SCV_BASE_ASSIGN(unsigned long) \
00485   _SCV_BASE_ASSIGN(long) \
00486   _SCV_BASE_ASSIGN(unsigned int) \
00487   _SCV_BASE_ASSIGN(int) \
00488   _SCV_BASE_ASSIGN(uint64) \
00489   _SCV_BASE_ASSIGN(double) \
00490   _SCV_SIGNED_SELFOP(+=,int_type) \
00491   _SCV_SIGNED_SELFOP(-=,int_type) \
00492   _SCV_SIGNED_SELFOP(*=,int_type) \
00493   _SCV_SIGNED_SELFOP(/=,int_type) \
00494   _SCV_SIGNED_SELFOP(%=,int_type) \
00495   _SCV_SIGNED_SELFOP(&=,int_type) \
00496   _SCV_SIGNED_SELFOP(|=,int_type) \
00497   _SCV_SIGNED_SELFOP(^=,int_type) \
00498   _SCV_SIGNED_SELFOP(<<=,int_type) \
00499   _SCV_SIGNED_SELFOP(>>=,int_type) \
00500   return_type& operator++() \
00501     { ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; } \
00502   typename operator++(int) { \
00503     typename tmp = *this->_get_instance(); \
00504     ++*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00505   } \
00506   return_type& operator--() \
00507     { --*this->_get_instance(); this->trigger_value_change_cb(); return *this; } \
00508   typename operator--(int) { \
00509     typename tmp = *this->_get_instance(); \
00510     --*this->_get_instance(); this->trigger_value_change_cb(); return tmp; \
00511   } \
00512   bool test(int i) const \
00513     { this->initialize(); return this->_get_instance()->test(i); } \
00514   void set(int i) \
00515     { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); } \
00516   void set(int i, bool v) \
00517     { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); } \
00518   _SCV_MAP(int,length) \
00519   _SCV_MAP(bool,and_reduce) \
00520   _SCV_MAP(bool,nand_reduce) \
00521   _SCV_MAP(bool,or_reduce) \
00522   _SCV_MAP(bool,nor_reduce) \
00523   _SCV_MAP(bool,xor_reduce) \
00524   _SCV_MAP(bool,xnor_reduce) \
00525   operator int_type() const { return this->value(); } \
00526   _SCV_MAP(int_type,value) \
00527   _SCV_MAP(int,to_int) \
00528   _SCV_MAP(unsigned int,to_uint) \
00529   _SCV_MAP(long,to_long) \
00530   _SCV_MAP(unsigned long,to_ulong) \
00531   _SCV_MAP(int64,to_int64) \
00532   _SCV_MAP(uint64,to_uint64) \
00533   _SCV_MAP(double,to_double) \
00534   const sc_string to_string(sc_numrep numrep=SC_DEC) const \
00535     { this->initialize(); return this->_get_instance()->to_string(numrep); } \
00536   const sc_string to_string(sc_numrep numrep, bool w_prefix) const \
00537     { this->initialize(); return this->_get_instance()->to_string(numrep,w_prefix); } \
00538   void scan( istream& is = cin ) \
00539     { this->_get_instance()->scan(is); this->trigger_value_change_cb(); } \
00540   _SCV_OSTREAM(typename); \
00541   _SCV_PAREN_OPERATOR(typename); \
00542 
00543 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00544 template<> \
00545 class scv_extensions< typename > \
00546   : public scv_extensions_base< typename > { \
00547   _SCV_INT_BASE_INTERFACE(typename) \
00548 };
00549 
00550 _SCV_TAG_FINAL_COMPONENT(sc_int_base)
00551 _SCV_TAG_FINAL_COMPONENT(sc_uint_base)
00552 
00553 #undef _SCV_TAG_FINAL_COMPONENT
00554 
00555 #define _SCV_BIT_BASE_INTERFACE(typename) \
00556 public: \
00557   operator const typename&() const { this->initialize(); return *this->_get_instance(); } \
00558   typedef scv_extensions< typename > return_type; \
00559   return_type& operator=(const return_type& i) \
00560     { *this->_get_instance() = *(i._get_instance()); this->trigger_value_change_cb(); return *this; } \
00561   _SCV_BASE_ASSIGN(const typename&) \
00562   template <class X> \
00563   _SCV_BASE_ASSIGN(const sc_proxy<X>&) \
00564   _SCV_BASE_ASSIGN(const char*) \
00565   _SCV_BASE_ASSIGN(const bool*) \
00566   _SCV_BASE_ASSIGN(const sc_logic*) \
00567   _SCV_BASE_ASSIGN(const sc_unsigned&) \
00568   _SCV_BASE_ASSIGN(const sc_signed&) \
00569   _SCV_BASE_ASSIGN(const sc_uint_base&) \
00570   _SCV_BASE_ASSIGN(const sc_int_base&) \
00571   _SCV_BASE_ASSIGN(unsigned long) \
00572   _SCV_BASE_ASSIGN(long) \
00573   _SCV_BASE_ASSIGN(unsigned int) \
00574   _SCV_BASE_ASSIGN(int) \
00575   _SCV_BASE_ASSIGN(uint64) \
00576   _SCV_BASE_ASSIGN(int64) \
00577   _SCV_MAP(int,length) \
00578   _SCV_MAP(int,size) \
00579   sc_logic_value_t get_bit(int i) const \
00580     { this->initialize(); return this->_get_instance()->get_bit(i); } \
00581   void set_bit(int i, sc_logic_value_t v) \
00582     { this->initialize(); this->_get_instance()->set_bit(i,v); this->trigger_value_change_cb(); } \
00583   unsigned long get_word(int i) const \
00584     { this->initialize(); return this->_get_instance()->get_word(i); } \
00585   void set_word(int i, unsigned long w) \
00586     { this->initialize(); this->_get_instance()->set_word(i,w); this->trigger_value_change_cb(); } \
00587   unsigned long get_cword(int i) const \
00588     { this->initialize(); return this->_get_instance()->get_cword(i); } \
00589   void set_cword(int i, unsigned long w) \
00590     { this->initialize(); this->_get_instance()->set_cword(i,w); this->trigger_value_change_cb(); } \
00591   void clean_tail() \
00592     { this->initialize(); this->_get_instance()->clean_tail(); this->trigger_value_change_cb(); } \
00593   _SCV_MAP(bool,is_01) \
00594   _SCV_OSTREAM(typename); \
00595   _SCV_PAREN_OPERATOR(typename); \
00596 
00597 #define _SCV_TAG_FINAL_COMPONENT(typename) \
00598 template<> \
00599 class scv_extensions< typename > \
00600   : public scv_extensions_base< typename > { \
00601   _SCV_BIT_BASE_INTERFACE(typename) \
00602 };
00603 
00604 _SCV_TAG_FINAL_COMPONENT(sc_lv_base)
00605 _SCV_TAG_FINAL_COMPONENT(sc_bv_base)
00606 
00607 #undef _SCV_TAG_FINAL_COMPONENT
00608 
00609 
00610 // sc_uint and sc_int are exactly the same as 
00611 template<int W>
00612 class scv_extensions< sc_uint<W> >
00613   : public scv_extensions_base< sc_uint<W> > {
00614 public:
00615   _SCV_PAREN_OPERATOR(sc_uint<W>);
00616 public:
00617   typedef scv_extensions< sc_uint<W> > return_type;
00618 
00619   return_type& operator=(const return_type& v) _SCV_IMPL1
00620   // from class sc_uint
00621 #ifndef _SCV_INTROSPECTION_ONLY
00622   return_type& operator = (uint_type                    v) _SCV_IMPL
00623 #endif
00624   return_type& operator = (const sc_uint_base&          v) _SCV_IMPL
00625 #ifndef _SCV_INTROSPECTION_ONLY
00626   return_type& operator = (const sc_uint_subref&        v) _SCV_IMPL
00627 #endif
00628 //for 2.0.1beta, remove sc_uint_concat usage
00629 #if SC_VERSION < 2000001
00630 #ifndef _SCV_INTROSPECTION_ONLY
00631   template<class T1, class T2>
00632     return_type& operator = (const sc_uint_concat<T1,T2>& v) _SCV_IMPL
00633 #endif
00634 #endif
00635   return_type& operator = (const sc_signed&             v) _SCV_IMPL
00636   return_type& operator = (const sc_unsigned&           v) _SCV_IMPL
00637 #ifdef SC_INCLUDE_FX
00638   return_type& operator = ( const sc_fxval&             v) _SCV_IMPL
00639   return_type& operator = ( const sc_fxval_fast&        v) _SCV_IMPL
00640   return_type& operator = ( const sc_fxnum&             v) _SCV_IMPL
00641   return_type& operator = ( const sc_fxnum_fast&        v) _SCV_IMPL
00642 #endif
00643   return_type& operator = ( const sc_bv_base&           v) _SCV_IMPL
00644   return_type& operator = ( const sc_lv_base&           v) _SCV_IMPL 
00645 #ifndef _SCV_INTROSPECTION_ONLY
00646   return_type& operator += (uint_type v) _SCV_IMPL2(+=)
00647   return_type& operator -= (uint_type v) _SCV_IMPL2(-=)
00648   return_type& operator *= (uint_type v) _SCV_IMPL2(*=)
00649   return_type& operator /= (uint_type v) _SCV_IMPL2(/=) 
00650   return_type& operator %= (uint_type v) _SCV_IMPL2(%=)
00651   return_type& operator &= (uint_type v) _SCV_IMPL2(&=)
00652   return_type& operator |= (uint_type v) _SCV_IMPL2(|=)
00653   return_type& operator ^= (uint_type v) _SCV_IMPL2(^=)
00654   return_type& operator <<= (uint_type v) _SCV_IMPL2(<<=)
00655   return_type& operator >>= (uint_type v) _SCV_IMPL2(>>=)
00656 #endif
00657 
00658   return_type& operator ++ () // prefix
00659   { this->initialize(); ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00660   const return_type operator ++ (int) // postfix
00661   { this->initialize(); sc_uint<W> tmp = *this->_get_instance()++; this->trigger_value_change_cb(); return tmp; }
00662   return_type& operator -- () // prefix
00663   { this->initialize(); --*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00664   const return_type operator -- (int) // postfix 
00665   { this->initialize(); sc_uint<W> tmp = *this->_get_instance()--; this->trigger_value_change_cb(); return tmp; }
00666 
00667   // from class sc_uint_base
00668 #ifndef _SCV_INTROSPECTION_ONLY
00669   operator uint_type() const { this->initialize(); return this->_get_instance()->operator uint_type(); }
00670 #endif
00671 
00672   _SCV_MAP(int,bitwidth);
00673   _SCV_MAP(int,length);
00674   _SCV_MAP(unsigned int,to_uint);
00675   _SCV_MAP(int,to_int);
00676   _SCV_MAP(uint64,to_uint64);
00677   _SCV_MAP(int64,to_int64);
00678 #ifndef _32BIT_
00679   _SCV_MAP(long,long_low);
00680   _SCV_MAP(long,long_high);
00681 #endif
00682   bool test(int i) const { this->initialize(); return this->_get_instance()->test(i); }
00683   void set(int i) { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); }
00684   void set(int i, bool v) { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); }
00685   // sc_uint_bitref operator [] (int i)
00686   bool operator [] (int i) const { this->initialize(); return this->_get_instance()->operator [](i); }
00687   //  sc_uint_subref range(int left, int right); 
00688 #ifndef _SCV_INTROSPECTION_ONLY
00689   uint_type range(int left, int right) const { this->initialize(); return this->_get_instance()->range(left,right); }
00690 #endif
00691 
00692   // operator ==, !=, <, <=, >, >= should be handled by uint_type();
00693   // operator +, -, etc. as well.
00694 
00695   //  void print( ostream& os ) const { this->initialize(); this->_get_instance()->print(os); }
00696 };
00697 
00698 template<int W>
00699 class scv_extensions< sc_int<W> >
00700   : public scv_extensions_base< sc_int<W> > {
00701 public:
00702     _SCV_PAREN_OPERATOR(sc_int<W>);
00703 public:
00704   typedef scv_extensions< sc_int<W> > return_type;
00705 
00706   return_type& operator=(const return_type& v) _SCV_IMPL1
00707   // from class sc_int
00708 #ifndef _SCV_INTROSPECTION_ONLY
00709   return_type& operator = (int_type                     v) _SCV_IMPL
00710 #endif
00711   return_type& operator = (const sc_int_base&           v) _SCV_IMPL
00712 #ifndef _SCV_INTROSPECTION_ONLY
00713   return_type& operator = (const sc_int_subref&         v) _SCV_IMPL
00714 #endif
00715 //for 2.0.1beta, remove sc_int_concat usage
00716 #if SC_VERSION < 2000001
00717 #ifndef _SCV_INTROSPECTION_ONLY
00718   template<class T1, class T2>
00719   return_type& operator = (const sc_int_concat<T1,T2>&  v) _SCV_IMPL
00720 #endif
00721 #endif
00722   return_type& operator = (const sc_signed&             v) _SCV_IMPL
00723   return_type& operator = (const sc_unsigned&           v) _SCV_IMPL
00724 #ifdef SC_INCLUDE_FX
00725   return_type& operator = ( const sc_fxval&             v) _SCV_IMPL
00726   return_type& operator = ( const sc_fxval_fast&        v) _SCV_IMPL
00727   return_type& operator = ( const sc_fxnum&             v) _SCV_IMPL
00728   return_type& operator = ( const sc_fxnum_fast&        v) _SCV_IMPL
00729 #endif
00730   return_type& operator = ( const sc_bv_base&           v) _SCV_IMPL
00731   return_type& operator = ( const sc_lv_base&           v) _SCV_IMPL 
00732 #ifndef _SCV_INTROSPECTION_ONLY
00733   return_type& operator += (int_type v) _SCV_IMPL2(+=)
00734   return_type& operator -= (int_type v) _SCV_IMPL2(-=)
00735   return_type& operator *= (int_type v) _SCV_IMPL2(*=)
00736   return_type& operator /= (int_type v) _SCV_IMPL2(/=) 
00737   return_type& operator %= (int_type v) _SCV_IMPL2(%=)
00738   return_type& operator &= (int_type v) _SCV_IMPL2(&=)
00739   return_type& operator |= (int_type v) _SCV_IMPL2(|=)
00740   return_type& operator ^= (int_type v) _SCV_IMPL2(^=)
00741   return_type& operator <<= (int_type v) _SCV_IMPL2(<<=)
00742   return_type& operator >>= (int_type v) _SCV_IMPL2(>>=)
00743 #endif
00744   
00745   return_type& operator ++ () // prefix
00746   { this->initialize(); ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00747   const return_type operator ++ (int) // postfix
00748   { this->initialize(); sc_int<W> tmp = *this->_get_instance()++; this->trigger_value_change_cb(); return tmp; }
00749   return_type& operator -- () // prefix
00750   { this->initialize(); --*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00751   const return_type operator -- (int) // postfix 
00752   { this->initialize(); sc_int<W> tmp = *this->_get_instance()--; this->trigger_value_change_cb(); return tmp; }
00753 
00754   // from class sc_int_base
00755 #ifndef _SCV_INTROSPECTION_ONLY
00756   operator int_type() const { this->initialize(); return this->_get_instance()->operator int_type(); }
00757 #endif
00758 
00759   _SCV_MAP(int,bitwidth);
00760   _SCV_MAP(int,length);
00761   _SCV_MAP(unsigned int,to_uint);
00762   _SCV_MAP(int,to_int);
00763   _SCV_MAP(uint64,to_uint64);
00764   _SCV_MAP(int64,to_int64);
00765 #ifndef _32BIT_
00766   _SCV_MAP(long,long_low);
00767   _SCV_MAP(long,long_high);
00768 #endif
00769   bool test(int i) const { this->initialize(); return this->_get_instance()->test(i); }
00770   void set(int i) { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); }
00771   void set(int i, bool v) { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); }
00772   // sc_int_bitref operator [] (int i)
00773   bool operator [] (int i) const { this->initialize(); return this->_get_instance()->operator [](i); }
00774   //  sc_int_subref range(int left, int right); 
00775 #ifndef _SCV_INTROSPECTION_ONLY
00776   int_type range(int left, int right) const { this->initialize(); return this->_get_instance()->range(left,right); }
00777 #endif
00778 
00779   // operator ==, !=, <, <=, >, >= should be handled by int_type();
00780   // operator +, -, etc. as well.
00781 
00782   //  void print( ostream& os ) const { this->initialize(); this->_get_instance()->print(os); }
00783 };
00784 
00785 // sc_biguint and sc_bigint are exactly the same.
00786 // need to add &=, etc.
00787 template<int W>
00788 class scv_extensions< sc_biguint<W> >
00789   : public scv_extensions_base< sc_biguint<W> > {
00790 public:
00791     _SCV_PAREN_OPERATOR(sc_biguint<W>);
00792 public:
00793   typedef scv_extensions< sc_biguint<W> > return_type;
00794 
00795   return_type& operator=(const return_type& v) _SCV_IMPL1
00796   return_type& operator=(const sc_biguint<W>&      v) _SCV_IMPL
00797   return_type& operator=(const sc_unsigned&        v) _SCV_IMPL
00798 #ifndef _SCV_INTROSPECTION_ONLY
00799   return_type& operator=(const sc_unsigned_subref& v) _SCV_IMPL
00800 #endif
00801   return_type& operator=(const sc_signed&          v) _SCV_IMPL
00802 #ifndef _SCV_INTROSPECTION_ONLY
00803   return_type& operator=(const sc_signed_subref&   v) _SCV_IMPL
00804 #endif
00805   return_type& operator=(const char*               v) _SCV_IMPL 
00806   return_type& operator=(int64                     v) _SCV_IMPL
00807   return_type& operator=(uint64                    v) _SCV_IMPL
00808   return_type& operator=(long                      v) _SCV_IMPL
00809   return_type& operator=(unsigned long             v) _SCV_IMPL
00810   return_type& operator=(int                       v) _SCV_IMPL 
00811   return_type& operator=(unsigned int              v) _SCV_IMPL 
00812   return_type& operator=(double                    v) _SCV_IMPL
00813   return_type& operator=( const sc_bv_base&        v) _SCV_IMPL
00814   return_type& operator=( const sc_lv_base&        v) _SCV_IMPL
00815   return_type& operator=( const sc_int_base&       v) _SCV_IMPL
00816   return_type& operator=( const sc_uint_base&      v) _SCV_IMPL
00817 #ifdef SC_INCLUDE_FX
00818   return_type& operator = ( const sc_fxval& v ) _SCV_IMPL
00819   return_type& operator = ( const sc_fxval_fast& v ) _SCV_IMPL
00820   return_type& operator = ( const sc_fxnum& v ) _SCV_IMPL
00821   return_type& operator = ( const sc_fxnum_fast& v ) _SCV_IMPL
00822 #endif
00823   return_type& operator += (const sc_signed&    v) _SCV_IMPL2(+=) 
00824   return_type& operator += (const sc_unsigned&  v) _SCV_IMPL2(+=) 
00825   return_type& operator += (int64               v) _SCV_IMPL2(+=) 
00826   return_type& operator += (uint64              v) _SCV_IMPL2(+=) 
00827   return_type& operator += (long                v) _SCV_IMPL2(+=) 
00828   return_type& operator += (unsigned long       v) _SCV_IMPL2(+=) 
00829   return_type& operator += (int                 v) _SCV_IMPL2(+=) 
00830   return_type& operator += (unsigned int        v) _SCV_IMPL2(+=) 
00831   return_type& operator += (const sc_int_base&  v) _SCV_IMPL2(+=)
00832   return_type& operator += (const sc_uint_base& v) _SCV_IMPL2(+=)
00833 
00834   return_type& operator -= (const sc_signed&    v) _SCV_IMPL2(-=) 
00835   return_type& operator -= (const sc_unsigned&  v) _SCV_IMPL2(-=) 
00836   return_type& operator -= (int64               v) _SCV_IMPL2(-=) 
00837   return_type& operator -= (uint64              v) _SCV_IMPL2(-=) 
00838   return_type& operator -= (long                v) _SCV_IMPL2(-=) 
00839   return_type& operator -= (unsigned long       v) _SCV_IMPL2(-=) 
00840   return_type& operator -= (int                 v) _SCV_IMPL2(-=) 
00841   return_type& operator -= (unsigned int        v) _SCV_IMPL2(-=) 
00842   return_type& operator -= (const sc_int_base&  v) _SCV_IMPL2(-=)
00843   return_type& operator -= (const sc_uint_base& v) _SCV_IMPL2(-=)
00844 
00845   return_type& operator *= (const sc_signed&    v) _SCV_IMPL2(*=) 
00846   return_type& operator *= (const sc_unsigned&  v) _SCV_IMPL2(*=) 
00847   return_type& operator *= (int64               v) _SCV_IMPL2(*=) 
00848   return_type& operator *= (uint64              v) _SCV_IMPL2(*=) 
00849   return_type& operator *= (long                v) _SCV_IMPL2(*=) 
00850   return_type& operator *= (unsigned long       v) _SCV_IMPL2(*=) 
00851   return_type& operator *= (int                 v) _SCV_IMPL2(*=) 
00852   return_type& operator *= (unsigned int        v) _SCV_IMPL2(*=) 
00853   return_type& operator *= (const sc_int_base&  v) _SCV_IMPL2(*=)
00854   return_type& operator *= (const sc_uint_base& v) _SCV_IMPL2(*=)
00855 
00856   return_type& operator /= (const sc_signed&    v) _SCV_IMPL2(/=) 
00857   return_type& operator /= (const sc_unsigned&  v) _SCV_IMPL2(/=) 
00858   return_type& operator /= (int64               v) _SCV_IMPL2(/=) 
00859   return_type& operator /= (uint64              v) _SCV_IMPL2(/=) 
00860   return_type& operator /= (long                v) _SCV_IMPL2(/=) 
00861   return_type& operator /= (unsigned long       v) _SCV_IMPL2(/=) 
00862   return_type& operator /= (int                 v) _SCV_IMPL2(/=) 
00863   return_type& operator /= (unsigned int        v) _SCV_IMPL2(/=) 
00864   return_type& operator /= (const sc_int_base&  v) _SCV_IMPL2(/=)
00865   return_type& operator /= (const sc_uint_base& v) _SCV_IMPL2(/=)
00866 
00867   return_type& operator %= (const sc_signed&    v) _SCV_IMPL2(%=) 
00868   return_type& operator %= (const sc_unsigned&  v) _SCV_IMPL2(%=) 
00869   return_type& operator %= (int64               v) _SCV_IMPL2(%=) 
00870   return_type& operator %= (uint64              v) _SCV_IMPL2(%=) 
00871   return_type& operator %= (long                v) _SCV_IMPL2(%=) 
00872   return_type& operator %= (unsigned long       v) _SCV_IMPL2(%=) 
00873   return_type& operator %= (int                 v) _SCV_IMPL2(%=) 
00874   return_type& operator %= (unsigned int        v) _SCV_IMPL2(%=) 
00875   return_type& operator %= (const sc_int_base&  v) _SCV_IMPL2(%=)
00876   return_type& operator %= (const sc_uint_base& v) _SCV_IMPL2(%=)
00877 
00878   return_type& operator &= (const sc_signed&    v) _SCV_IMPL2(&=) 
00879   return_type& operator &= (const sc_unsigned&  v) _SCV_IMPL2(&=) 
00880   return_type& operator &= (int64               v) _SCV_IMPL2(&=) 
00881   return_type& operator &= (uint64              v) _SCV_IMPL2(&=) 
00882   return_type& operator &= (long                v) _SCV_IMPL2(&=) 
00883   return_type& operator &= (unsigned long       v) _SCV_IMPL2(&=) 
00884   return_type& operator &= (int                 v) _SCV_IMPL2(&=) 
00885   return_type& operator &= (unsigned int        v) _SCV_IMPL2(&=) 
00886   return_type& operator &= (const sc_int_base&  v) _SCV_IMPL2(&=)
00887   return_type& operator &= (const sc_uint_base& v) _SCV_IMPL2(&=)
00888 
00889   return_type& operator |= (const sc_signed&    v) _SCV_IMPL2(|=) 
00890   return_type& operator |= (const sc_unsigned&  v) _SCV_IMPL2(|=) 
00891   return_type& operator |= (int64               v) _SCV_IMPL2(|=) 
00892   return_type& operator |= (uint64              v) _SCV_IMPL2(|=) 
00893   return_type& operator |= (long                v) _SCV_IMPL2(|=) 
00894   return_type& operator |= (unsigned long       v) _SCV_IMPL2(|=) 
00895   return_type& operator |= (int                 v) _SCV_IMPL2(|=) 
00896   return_type& operator |= (unsigned int        v) _SCV_IMPL2(|=) 
00897   return_type& operator |= (const sc_int_base&  v) _SCV_IMPL2(|=)
00898   return_type& operator |= (const sc_uint_base& v) _SCV_IMPL2(|=)
00899 
00900   return_type& operator ^= (const sc_signed&    v) _SCV_IMPL2(^=) 
00901   return_type& operator ^= (const sc_unsigned&  v) _SCV_IMPL2(^=) 
00902   return_type& operator ^= (int64               v) _SCV_IMPL2(^=) 
00903   return_type& operator ^= (uint64              v) _SCV_IMPL2(^=) 
00904   return_type& operator ^= (long                v) _SCV_IMPL2(^=) 
00905   return_type& operator ^= (unsigned long       v) _SCV_IMPL2(^=) 
00906   return_type& operator ^= (int                 v) _SCV_IMPL2(^=) 
00907   return_type& operator ^= (unsigned int        v) _SCV_IMPL2(^=) 
00908   return_type& operator ^= (const sc_int_base&  v) _SCV_IMPL2(^=)
00909   return_type& operator ^= (const sc_uint_base& v) _SCV_IMPL2(^=)
00910 
00911   return_type& operator <<= (const sc_signed&    v) _SCV_IMPL2(<<=) 
00912   return_type& operator <<= (const sc_unsigned&  v) _SCV_IMPL2(<<=) 
00913   return_type& operator <<= (int64               v) _SCV_IMPL2(<<=) 
00914   return_type& operator <<= (uint64              v) _SCV_IMPL2(<<=) 
00915   return_type& operator <<= (long                v) _SCV_IMPL2(<<=) 
00916   return_type& operator <<= (unsigned long       v) _SCV_IMPL2(<<=) 
00917   return_type& operator <<= (int                 v) _SCV_IMPL2(<<=) 
00918   return_type& operator <<= (unsigned int        v) _SCV_IMPL2(<<=) 
00919   return_type& operator <<= (const sc_int_base&  v) _SCV_IMPL2(<<=)
00920   return_type& operator <<= (const sc_uint_base& v) _SCV_IMPL2(<<=)
00921 
00922   return_type& operator >>= (const sc_signed&    v) _SCV_IMPL2(>>=) 
00923   return_type& operator >>= (const sc_unsigned&  v) _SCV_IMPL2(>>=) 
00924   return_type& operator >>= (int64               v) _SCV_IMPL2(>>=) 
00925   return_type& operator >>= (uint64              v) _SCV_IMPL2(>>=) 
00926   return_type& operator >>= (long                v) _SCV_IMPL2(>>=) 
00927   return_type& operator >>= (unsigned long       v) _SCV_IMPL2(>>=) 
00928   return_type& operator >>= (int                 v) _SCV_IMPL2(>>=) 
00929   return_type& operator >>= (unsigned int        v) _SCV_IMPL2(>>=) 
00930   return_type& operator >>= (const sc_int_base&  v) _SCV_IMPL2(>>=)
00931   return_type& operator >>= (const sc_uint_base& v) _SCV_IMPL2(>>=)
00932 
00933   return_type& operator ++ ()
00934   { this->initialize(); ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00935   const sc_unsigned operator ++ (int)
00936   { this->initialize(); sc_biguint<W> tmp = *this->_get_instance()++; this->trigger_value_change_cb(); return tmp; }
00937   return_type& operator -- ()
00938   { this->initialize(); --*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
00939   const sc_unsigned operator -- (int)
00940   { this->initialize(); sc_biguint<W> tmp = *this->_get_instance()--; this->trigger_value_change_cb(); return tmp; }
00941   //  sc_unsigned_bitref operator [] (int i)
00942   const bool operator [] (int i) const
00943   { this->initialize(); return this->_get_instance()->operator [](i); }
00944   const sc_unsigned range(int i, int j) const
00945   { this->initialize(); return this->_get_instance()->range(i,j); }
00946   //  sc_unsigned_subref operator () (int i, int j) 
00947   const sc_unsigned operator () (int i, int j) const
00948   { this->initialize(); return this->_get_instance()->operator ()(i,j); }
00949 
00950   sc_string to_string(sc_numrep base = SC_DEC, bool formatted = false) const
00951   { this->initialize(); return this->_get_instance()->to_string(base,formatted); }
00952   sc_string to_string(int base, bool formatted = false) const
00953   { this->initialize(); return this->_get_instance()->to_string(base,formatted); }
00954 
00955   _SCV_MAP(int64,to_int64);  
00956   _SCV_MAP(uint64,to_uint64);  
00957   _SCV_MAP(long,to_long);  
00958   _SCV_MAP(unsigned long,to_ulong);
00959   _SCV_MAP(unsigned long,to_unsigned_long);
00960   _SCV_MAP(int,to_int);
00961   _SCV_MAP(int,to_signed);
00962   _SCV_MAP(unsigned int,to_uint);
00963   _SCV_MAP(unsigned int,to_unsigned);
00964   _SCV_MAP(unsigned int,to_unsigned_int);
00965   _SCV_MAP(double,to_double);
00966   //  void print() const { this->initialize(); this->_get_instance()->print(); }
00967   //  void print(ostream &os) const { this->initialize(); this->_get_instance()->print(os); }
00968   void dump() const { this->initialize(); this->_get_instance()->dump(); };
00969   void dump(ostream &os) const { this->initialize(); this->_get_instance()->dump(os); };
00970   _SCV_MAP(int,length);
00971   _SCV_MAP(bool,iszero);
00972   _SCV_MAP(bool,sign);
00973   bool test(int i) const { this->initialize(); return this->_get_instance()->test(i); }
00974   void set(int i) { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); }
00975   void clear(int i) { this->initialize(); this->_get_instance()->clear(i); this->trigger_value_change_cb(); }
00976   void set(int i, bool v) { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); }
00977   void invert(int i) { this->initialize(); this->_get_instance()->invert(i); this->trigger_value_change_cb(); }
00978   void reverse() { this->initialize(); this->_get_instance()->reverse(); this->trigger_value_change_cb(); }
00979   void get_packed_rep(unsigned long *buf) const { this->initialize(); this->_get_instance()->get_packet_ref(buf); }
00980   void set_packed_rep(unsigned long *buf) { this->_get_instance()->get_packet_ref(buf); this->trigger_value_change_cb(); }
00981 
00982   operator const sc_unsigned&() const { this->initialize(); return *this->_get_instance(); }
00983 };
00984 
00985 template<int W>
00986 class scv_extensions< sc_bigint<W> >
00987   : public scv_extensions_base< sc_bigint<W> > {
00988 public:
00989     _SCV_PAREN_OPERATOR(sc_bigint<W>);
00990 public:
00991   typedef scv_extensions< sc_bigint<W> > return_type;
00992 
00993   return_type& operator=(const return_type& v) _SCV_IMPL1
00994   return_type& operator=(const sc_bigint<W>&       v) _SCV_IMPL
00995   return_type& operator=(const sc_unsigned&        v) _SCV_IMPL
00996 #ifndef _SCV_INTROSPECTION_ONLY
00997   return_type& operator=(const sc_unsigned_subref& v) _SCV_IMPL
00998 #endif
00999   return_type& operator=(const sc_signed&          v) _SCV_IMPL
01000 #ifndef _SCV_INTROSPECTION_ONLY
01001   return_type& operator=(const sc_signed_subref&   v) _SCV_IMPL
01002 #endif
01003   return_type& operator=(const char*               v) _SCV_IMPL 
01004   return_type& operator=(int64                     v) _SCV_IMPL
01005   return_type& operator=(uint64                    v) _SCV_IMPL
01006   return_type& operator=(long                      v) _SCV_IMPL
01007   return_type& operator=(unsigned long             v) _SCV_IMPL
01008   return_type& operator=(int                       v) _SCV_IMPL 
01009   return_type& operator=(unsigned int              v) _SCV_IMPL 
01010   return_type& operator=(double                    v) _SCV_IMPL
01011   return_type& operator=( const sc_bv_base&        v) _SCV_IMPL
01012   return_type& operator=( const sc_lv_base&        v) _SCV_IMPL
01013   return_type& operator=( const sc_int_base&       v) _SCV_IMPL
01014   return_type& operator=( const sc_uint_base&      v) _SCV_IMPL
01015 #ifdef SC_INCLUDE_FX
01016   return_type& operator = ( const sc_fxval& v ) _SCV_IMPL
01017   return_type& operator = ( const sc_fxval_fast& v ) _SCV_IMPL
01018   return_type& operator = ( const sc_fxnum& v ) _SCV_IMPL
01019   return_type& operator = ( const sc_fxnum_fast& v ) _SCV_IMPL
01020 #endif
01021 
01022   return_type& operator += (const sc_signed&    v) _SCV_IMPL2(+=) 
01023   return_type& operator += (const sc_unsigned&  v) _SCV_IMPL2(+=) 
01024   return_type& operator += (int64               v) _SCV_IMPL2(+=) 
01025   return_type& operator += (uint64              v) _SCV_IMPL2(+=) 
01026   return_type& operator += (long                v) _SCV_IMPL2(+=) 
01027   return_type& operator += (unsigned long       v) _SCV_IMPL2(+=) 
01028   return_type& operator += (int                 v) _SCV_IMPL2(+=) 
01029   return_type& operator += (unsigned int        v) _SCV_IMPL2(+=) 
01030   return_type& operator += (const sc_int_base&  v) _SCV_IMPL2(+=)
01031   return_type& operator += (const sc_uint_base& v) _SCV_IMPL2(+=)
01032 
01033   return_type& operator -= (const sc_signed&    v) _SCV_IMPL2(-=) 
01034   return_type& operator -= (const sc_unsigned&  v) _SCV_IMPL2(-=) 
01035   return_type& operator -= (int64               v) _SCV_IMPL2(-=) 
01036   return_type& operator -= (uint64              v) _SCV_IMPL2(-=) 
01037   return_type& operator -= (long                v) _SCV_IMPL2(-=) 
01038   return_type& operator -= (unsigned long       v) _SCV_IMPL2(-=) 
01039   return_type& operator -= (int                 v) _SCV_IMPL2(-=) 
01040   return_type& operator -= (unsigned int        v) _SCV_IMPL2(-=) 
01041   return_type& operator -= (const sc_int_base&  v) _SCV_IMPL2(-=)
01042   return_type& operator -= (const sc_uint_base& v) _SCV_IMPL2(-=)
01043 
01044   return_type& operator *= (const sc_signed&    v) _SCV_IMPL2(*=) 
01045   return_type& operator *= (const sc_unsigned&  v) _SCV_IMPL2(*=) 
01046   return_type& operator *= (int64               v) _SCV_IMPL2(*=) 
01047   return_type& operator *= (uint64              v) _SCV_IMPL2(*=) 
01048   return_type& operator *= (long                v) _SCV_IMPL2(*=) 
01049   return_type& operator *= (unsigned long       v) _SCV_IMPL2(*=) 
01050   return_type& operator *= (int                 v) _SCV_IMPL2(*=) 
01051   return_type& operator *= (unsigned int        v) _SCV_IMPL2(*=) 
01052   return_type& operator *= (const sc_int_base&  v) _SCV_IMPL2(*=)
01053   return_type& operator *= (const sc_uint_base& v) _SCV_IMPL2(*=)
01054 
01055   return_type& operator /= (const sc_signed&    v) _SCV_IMPL2(/=) 
01056   return_type& operator /= (const sc_unsigned&  v) _SCV_IMPL2(/=) 
01057   return_type& operator /= (int64               v) _SCV_IMPL2(/=) 
01058   return_type& operator /= (uint64              v) _SCV_IMPL2(/=) 
01059   return_type& operator /= (long                v) _SCV_IMPL2(/=) 
01060   return_type& operator /= (unsigned long       v) _SCV_IMPL2(/=) 
01061   return_type& operator /= (int                 v) _SCV_IMPL2(/=) 
01062   return_type& operator /= (unsigned int        v) _SCV_IMPL2(/=) 
01063   return_type& operator /= (const sc_int_base&  v) _SCV_IMPL2(/=)
01064   return_type& operator /= (const sc_uint_base& v) _SCV_IMPL2(/=)
01065 
01066   return_type& operator %= (const sc_signed&    v) _SCV_IMPL2(%=) 
01067   return_type& operator %= (const sc_unsigned&  v) _SCV_IMPL2(%=) 
01068   return_type& operator %= (int64               v) _SCV_IMPL2(%=) 
01069   return_type& operator %= (uint64              v) _SCV_IMPL2(%=) 
01070   return_type& operator %= (long                v) _SCV_IMPL2(%=) 
01071   return_type& operator %= (unsigned long       v) _SCV_IMPL2(%=) 
01072   return_type& operator %= (int                 v) _SCV_IMPL2(%=) 
01073   return_type& operator %= (unsigned int        v) _SCV_IMPL2(%=) 
01074   return_type& operator %= (const sc_int_base&  v) _SCV_IMPL2(%=)
01075   return_type& operator %= (const sc_uint_base& v) _SCV_IMPL2(%=)
01076 
01077   return_type& operator &= (const sc_signed&    v) _SCV_IMPL2(&=) 
01078   return_type& operator &= (const sc_unsigned&  v) _SCV_IMPL2(&=) 
01079   return_type& operator &= (int64               v) _SCV_IMPL2(&=) 
01080   return_type& operator &= (uint64              v) _SCV_IMPL2(&=) 
01081   return_type& operator &= (long                v) _SCV_IMPL2(&=) 
01082   return_type& operator &= (unsigned long       v) _SCV_IMPL2(&=) 
01083   return_type& operator &= (int                 v) _SCV_IMPL2(&=) 
01084   return_type& operator &= (unsigned int        v) _SCV_IMPL2(&=) 
01085   return_type& operator &= (const sc_int_base&  v) _SCV_IMPL2(&=)
01086   return_type& operator &= (const sc_uint_base& v) _SCV_IMPL2(&=)
01087 
01088   return_type& operator |= (const sc_signed&    v) _SCV_IMPL2(|=) 
01089   return_type& operator |= (const sc_unsigned&  v) _SCV_IMPL2(|=) 
01090   return_type& operator |= (int64               v) _SCV_IMPL2(|=) 
01091   return_type& operator |= (uint64              v) _SCV_IMPL2(|=) 
01092   return_type& operator |= (long                v) _SCV_IMPL2(|=) 
01093   return_type& operator |= (unsigned long       v) _SCV_IMPL2(|=) 
01094   return_type& operator |= (int                 v) _SCV_IMPL2(|=) 
01095   return_type& operator |= (unsigned int        v) _SCV_IMPL2(|=) 
01096   return_type& operator |= (const sc_int_base&  v) _SCV_IMPL2(|=)
01097   return_type& operator |= (const sc_uint_base& v) _SCV_IMPL2(|=)
01098 
01099   return_type& operator ^= (const sc_signed&    v) _SCV_IMPL2(^=) 
01100   return_type& operator ^= (const sc_unsigned&  v) _SCV_IMPL2(^=) 
01101   return_type& operator ^= (int64               v) _SCV_IMPL2(^=) 
01102   return_type& operator ^= (uint64              v) _SCV_IMPL2(^=) 
01103   return_type& operator ^= (long                v) _SCV_IMPL2(^=) 
01104   return_type& operator ^= (unsigned long       v) _SCV_IMPL2(^=) 
01105   return_type& operator ^= (int                 v) _SCV_IMPL2(^=) 
01106   return_type& operator ^= (unsigned int        v) _SCV_IMPL2(^=) 
01107   return_type& operator ^= (const sc_int_base&  v) _SCV_IMPL2(^=)
01108   return_type& operator ^= (const sc_uint_base& v) _SCV_IMPL2(^=)
01109 
01110   return_type& operator <<= (const sc_signed&    v) _SCV_IMPL2(<<=) 
01111   return_type& operator <<= (const sc_unsigned&  v) _SCV_IMPL2(<<=) 
01112   return_type& operator <<= (int64               v) _SCV_IMPL2(<<=) 
01113   return_type& operator <<= (uint64              v) _SCV_IMPL2(<<=) 
01114   return_type& operator <<= (long                v) _SCV_IMPL2(<<=) 
01115   return_type& operator <<= (unsigned long       v) _SCV_IMPL2(<<=) 
01116   return_type& operator <<= (int                 v) _SCV_IMPL2(<<=) 
01117   return_type& operator <<= (unsigned int        v) _SCV_IMPL2(<<=) 
01118   return_type& operator <<= (const sc_int_base&  v) _SCV_IMPL2(<<=)
01119   return_type& operator <<= (const sc_uint_base& v) _SCV_IMPL2(<<=)
01120 
01121   return_type& operator >>= (const sc_signed&    v) _SCV_IMPL2(>>=) 
01122   return_type& operator >>= (const sc_unsigned&  v) _SCV_IMPL2(>>=) 
01123   return_type& operator >>= (int64               v) _SCV_IMPL2(>>=) 
01124   return_type& operator >>= (uint64              v) _SCV_IMPL2(>>=) 
01125   return_type& operator >>= (long                v) _SCV_IMPL2(>>=) 
01126   return_type& operator >>= (unsigned long       v) _SCV_IMPL2(>>=) 
01127   return_type& operator >>= (int                 v) _SCV_IMPL2(>>=) 
01128   return_type& operator >>= (unsigned int        v) _SCV_IMPL2(>>=) 
01129   return_type& operator >>= (const sc_int_base&  v) _SCV_IMPL2(>>=)
01130   return_type& operator >>= (const sc_uint_base& v) _SCV_IMPL2(>>=)
01131 
01132   return_type& operator ++ ()
01133   { this->initialize(); ++*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
01134   const sc_unsigned operator ++ (int)
01135   { this->initialize(); sc_bigint<W> tmp = *this->_get_instance()++; this->trigger_value_change_cb(); return tmp; }
01136   return_type& operator -- ()
01137   { this->initialize(); --*this->_get_instance(); this->trigger_value_change_cb(); return *this; }
01138   const sc_unsigned operator -- (int)
01139   { this->initialize(); sc_bigint<W> tmp = *this->_get_instance()--; this->trigger_value_change_cb(); return tmp; }
01140   //  sc_unsigned_bitref operator [] (int i)
01141   const bool operator [] (int i) const
01142   { this->initialize(); return this->_get_instance()->operator [](i); }
01143   const sc_unsigned range(int i, int j) const
01144   { this->initialize(); return this->_get_instance()->range(i,j); }
01145   //  sc_unsigned_subref operator () (int i, int j) 
01146   const sc_unsigned operator () (int i, int j) const
01147   { this->initialize(); return this->_get_instance()->operator ()(i,j); }
01148 
01149   sc_string to_string(sc_numrep base = SC_DEC, bool formatted = false) const
01150   { this->initialize(); return this->_get_instance()->to_string(base,formatted); }
01151   sc_string to_string(int base, bool formatted = false) const
01152   { this->initialize(); return this->_get_instance()->to_string(base,formatted); }
01153 
01154   _SCV_MAP(int64,to_int64);  
01155   _SCV_MAP(uint64,to_uint64);  
01156   _SCV_MAP(long,to_long);  
01157   _SCV_MAP(unsigned long,to_ulong);
01158   _SCV_MAP(unsigned long,to_unsigned_long);
01159   _SCV_MAP(int,to_int);
01160   _SCV_MAP(int,to_signed);
01161   _SCV_MAP(unsigned int,to_uint);
01162   _SCV_MAP(unsigned int,to_unsigned);
01163   _SCV_MAP(unsigned int,to_unsigned_int);
01164   _SCV_MAP(double,to_double);
01165   //  void print() const { this->initialize(); this->_get_instance()->print(); }
01166   //  void print(ostream &os) const { this->initialize(); this->_get_instance()->print(os); }
01167   void dump() const { this->initialize(); this->_get_instance()->dump(); };
01168   void dump(ostream &os) const { this->initialize(); this->_get_instance()->dump(os); };
01169   _SCV_MAP(int,length);
01170   _SCV_MAP(bool,iszero);
01171   _SCV_MAP(bool,sign);
01172   bool test(int i) const { this->initialize(); return this->_get_instance()->test(i); }
01173   void set(int i) { this->initialize(); this->_get_instance()->set(i); this->trigger_value_change_cb(); }
01174   void clear(int i) { this->initialize(); this->_get_instance()->clear(i); this->trigger_value_change_cb(); }
01175   void set(int i, bool v) { this->initialize(); this->_get_instance()->set(i,v); this->trigger_value_change_cb(); }
01176   void invert(int i) { this->initialize(); this->_get_instance()->invert(i); this->trigger_value_change_cb(); }
01177   void reverse() { this->initialize(); this->_get_instance()->reverse(); this->trigger_value_change_cb(); }
01178   void get_packed_rep(unsigned long *buf) const { this->initialize(); this->_get_instance()->get_packet_ref(buf); }
01179   void set_packed_rep(unsigned long *buf) { this->_get_instance()->get_packet_ref(buf); this->trigger_value_change_cb(); }
01180 
01181   operator const sc_signed&() const { this->initialize(); return *this->_get_instance(); }
01182 };
01183 
01184 template<>
01185 class scv_extensions< sc_bit >
01186   : public scv_extensions_base< sc_bit > {
01187 public:
01188     _SCV_PAREN_OPERATOR(sc_bit);
01189 public:
01190   typedef scv_extensions< sc_bit > return_type;
01191 
01192   return_type& operator=(const return_type& v) _SCV_IMPL1 
01193   return_type& operator = ( const sc_bit& v ) _SCV_IMPL
01194   return_type& operator = ( int v ) _SCV_IMPL
01195   return_type& operator = ( bool v ) _SCV_IMPL
01196   return_type& operator = ( char v ) _SCV_IMPL
01197   //for 2.0.1beta, assignment from sc_logic to bit is not available
01198 #if SC_VERSION < 2000001
01199   return_type& operator = ( const sc_logic& v ) _SCV_IMPL
01200 #endif
01201   return_type& operator &= ( const sc_bit& v ) _SCV_IMPL2(&=)
01202   return_type& operator &= ( int v ) _SCV_IMPL2(&=)
01203   return_type& operator &= ( bool v ) _SCV_IMPL2(&=)
01204   return_type& operator &= ( char v ) _SCV_IMPL2(&=)
01205   return_type& operator |= ( const sc_bit& v ) _SCV_IMPL2(|=)
01206   return_type& operator |= ( int v ) _SCV_IMPL2(|=)
01207   return_type& operator |= ( bool v ) _SCV_IMPL2(|=)
01208   return_type& operator |= ( char v ) _SCV_IMPL2(|=)
01209   return_type& operator ^= ( const sc_bit& v ) _SCV_IMPL2(^=)
01210   return_type& operator ^= ( int v ) _SCV_IMPL2(^=)
01211   return_type& operator ^= ( bool v ) _SCV_IMPL2(^=)
01212   return_type& operator ^= ( char v ) _SCV_IMPL2(^=)
01213   _SCV_MAP(bool,to_bool);
01214   _SCV_MAP(char,to_char);
01215   //  void print( ostream& os) const { this->initialize(); return this->_get_instance()->print(os); }
01216   operator const sc_bit&() const { this->initialize(); return *this->_get_instance(); }
01217 };
01218 
01219 template<>
01220 class scv_extensions< sc_logic >
01221   : public scv_extensions_base< sc_logic > {
01222 public:
01223     _SCV_PAREN_OPERATOR(sc_logic);
01224 public:
01225   typedef scv_extensions< sc_logic > return_type;
01226 
01227   return_type& operator=(const return_type& v) _SCV_IMPL1
01228   //for 2.0.1beta, sc_logic::Log_enum is changed to sc_dt::sc_logic_value_t
01229 #if SC_VERSION < 2000001
01230   return_type& operator = ( sc_logic::Log_enum v ) _SCV_IMPL
01231 #else
01232   return_type& operator = ( sc_dt::sc_logic_value_t v ) _SCV_IMPL
01233 #endif
01234   return_type& operator = ( const sc_logic& v ) _SCV_IMPL
01235   return_type& operator = ( char v ) _SCV_IMPL
01236   //for 2.0.1beta, no sc_logic::operator=(long)
01237 #if SC_VERSION < 2000001
01238   return_type& operator = ( long v ) _SCV_IMPL
01239 #endif
01240   return_type& operator = ( int v ) _SCV_IMPL
01241   return_type& operator = ( bool v ) _SCV_IMPL
01242   return_type& operator &= ( const sc_logic& v ) _SCV_IMPL2(&=)
01243   return_type& operator |= ( const sc_logic& v ) _SCV_IMPL2(|=)
01244   return_type& operator ^= ( const sc_logic& v ) _SCV_IMPL2(^=)
01245   //for 2.0.1beta, sc_logic::negate() is removed
01246 #if SC_VERSION < 2000001
01247   return_type& negate() { this->initialize(); this->_get_instance()->negate(); this->trigger_value_change_cb(); return *this; }
01248 #endif
01249   bool operator == ( const sc_logic& r ) const { this->initialize(); return *this->_get_instance() == r; }
01250   bool operator == ( char r ) const { this->initialize(); return *this->_get_instance() == r; }
01251   bool operator != ( const sc_logic& r ) const { this->initialize(); return *this->_get_instance() != r; }
01252   bool operator != ( char r ) const { this->initialize(); return *this->_get_instance() != r; }
01253   //for 2.0.1beta, sc_logic::operator! is removed
01254 #if SC_VERSION < 2000001
01255   sc_logic operator ! () { this->initialize(); return !*this->_get_instance(); }
01256 #endif
01257   _SCV_MAP(char,to_char);
01258   //for 2.0.1beta, sc_logic::to_long() is removed
01259 #if SC_VERSION < 2000001
01260   _SCV_MAP(long,to_long);
01261 #endif
01262   _SCV_MAP(bool,is_01);
01263   //for 2.0.1beta, check_01 is changed to invalid_01 and is now private
01264 #if SC_VERSION < 2000001
01265   _SCV_MAP(void,check_01);
01266 #endif
01267   _SCV_MAP(bool,to_bool);
01268   //  void print( ostream& os ) const { this->initialize(); this->_get_instance()->print(os); }
01269 
01270   operator const sc_logic&() const { this->initialize(); return *this->_get_instance(); }
01271 };
01272 
01273 template<int W>
01274 class scv_extensions< sc_bv<W> >
01275   : public scv_extensions_base< sc_bv<W> > {
01276 public:
01277     _SCV_PAREN_OPERATOR(sc_bv<W>);
01278   operator const sc_bv<W>&() const { this->initialize(); return *this->_get_instance(); }
01279 public:
01280   typedef scv_extensions< sc_bv<W> > return_type;
01281 
01282   sc_bv_base* clone() { return this->_get_instance()->clone(); /* don't clone randomization status */ }
01283   return_type& operator=(const return_type& v) _SCV_IMPL1
01284   //  template<class T> return_type& operator=(const sc_proxy<T>&