90     static void invalid_value( 
char );
 
   91     static void invalid_value( 
int );
 
   93     static bool to_value( 
char c )
 
   95             if( c != 
'0' && c != 
'1' ) {
 
   98             return ( c == 
'0' ? 
false : 
true );
 
  101     static bool to_value( 
int i )
 
  103             if( i != 0 && i != 1 ) {
 
  106             return ( i == 0 ? 
false : 
true );
 
  108     static bool to_value( 
bool b )
 
  111 #define DEFN_TO_VALUE_T(tp)              \ 
  112     static bool to_value( tp i )         \ 
  113        { return to_value( (int) i); } 
  121 #undef DEFN_TO_VALUE_T 
  134 #define DEFN_CTOR_T(tp)              \ 
  135     explicit sc_bit( tp a )          \ 
  136        : m_val( to_value(a) )       \ 
  137        { sc_deprecated_sc_bit(); } 
  150     explicit sc_bit( 
const sc_logic& a );  
 
  172         { m_val = b.m_val; 
return *
this; }
 
  174 #define DEFN_ASN_OP_T(op,tp) \ 
  175     sc_bit& operator op( tp b ) \ 
  176        { return ( *this op sc_bit( b ) ); } 
  177 #define DEFN_ASN_OP(op) \ 
  178     DEFN_ASN_OP_T(op,int) \ 
  179     DEFN_ASN_OP_T(op,bool) \ 
  180     DEFN_ASN_OP_T(op,char) 
  185     DEFN_ASN_OP_T(=,
long)
 
  186     DEFN_ASN_OP_T(=,
unsigned long)
 
  188     sc_bit& operator = ( const sc_logic& b );  
 
  194         { m_val = ( m_val && b.m_val ); 
return *
this; }
 
  197         { m_val = ( m_val || b.m_val ); 
return *
this; }
 
  200         { m_val = ( m_val != b.m_val ); 
return *
this; }
 
  214     operator bool ()
 const 
  227         { 
return ( m_val ? 
'1' : 
'0' ); }
 
  248         { m_val = ( ! m_val ); 
return *
this; }
 
  258     void print( ::std::ostream& os = ::std::cout )
 const 
  261     void scan( ::std::istream& = ::std::cin );
 
  270 #define DEFN_BIN_FUN_T(ret,fun,tp)          \ 
  271     inline ret fun( const sc_bit& a, tp b ) \ 
  272        { return fun(a, sc_bit(b) ); }      \ 
  273     inline ret fun( tp b, const sc_bit& a ) \ 
  274        { return fun( sc_bit(a), b ); } 
  276 #define DEFN_BIN_FUN(ret,fun) \ 
  277       DEFN_BIN_FUN_T(ret,fun,bool) \ 
  278       DEFN_BIN_FUN_T(ret,fun,char) \ 
  279       DEFN_BIN_FUN_T(ret,fun,int) 
  284     { 
return ( a.m_val == b.m_val ); }
 
  287     { 
return ( a.m_val != b.m_val ); }
 
  295     { 
return ( a == b ); }
 
  298     { 
return ( a != b ); }
 
  311        { 
return sc_bit( ! a.m_val ); }
 
  330         { 
return sc_bit( a.m_val && b.m_val ); }
 
  333         { 
return sc_bit( a.m_val || b.m_val ); }
 
  336         { 
return sc_bit( a.m_val != b.m_val ); }
 
  344     inline const sc_bit 
b_and ( const sc_bit& a, const sc_bit& b )
 
  359 #define DEFN_TRN_FUN_T(fun,tp)                                     \ 
  360     inline void fun( sc_bit& r, const sc_bit& a, tp b )            \ 
  361         { r = fun( a, sc_bit(b) ); }                               \ 
  362     inline void fun( sc_bit& r, tp a, const sc_bit& b )            \ 
  363         { r = fun( sc_bit(a), b ); } 
  365 #define DEFN_TRN_FUN(fun) \ 
  366     inline void fun( sc_bit& r, const sc_bit& a, const sc_bit& b ) \ 
  367         { r = fun( a , b ); }                                      \ 
  368     DEFN_TRN_FUN_T(fun,int)                                        \ 
  369     DEFN_TRN_FUN_T(fun,bool)                                       \ 
  370     DEFN_TRN_FUN_T(fun,char) 
  376 #undef DEFN_BIN_FUN_T 
  378 #undef DEFN_TRN_FUN_T 
#define DEFN_ASN_OP_T(op, tp)
 
friend const sc_bit operator|(const sc_bit &a, const sc_bit &b)
 
const sc_bit b_xor(const sc_bit &a, const sc_bit &b)
 
#define DEFN_TO_VALUE_T(tp)
 
const sc_bit b_not(const sc_bit &a)
 
const sc_bit operator|(const sc_bit &a, const sc_bit &b)
 
#define DEFN_TRN_FUN(fun)
 
const sc_bit operator^(const sc_bit &a, const sc_bit &b)
 
void sc_deprecated_sc_bit()
 
void scan(::std::istream &=::std::cin)
 
friend bool operator!=(const sc_bit &a, const sc_bit &b)
 
const sc_bit b_or(const sc_bit &a, const sc_bit &b)
 
uint64 const sc_uint_base int b
 
sc_bit & operator^=(const sc_bit &b)
 
friend const sc_bit operator^(const sc_bit &a, const sc_bit &b)
 
friend bool operator==(const sc_bit &a, const sc_bit &b)
 
bool operator!=(const sc_bit &a, const sc_bit &b)
 
bool operator==(const sc_bit &a, const sc_bit &b)
 
const sc_bit b_and(const sc_bit &a, const sc_bit &b)
 
inline::std::istream & operator>>(::std::istream &is, sc_bit &a)
 
void print(::std::ostream &os=::std::cout) const 
 
bool equal(const sc_bit &a, const sc_bit &b)
 
sc_bit & operator|=(const sc_bit &b)
 
bool not_equal(const sc_bit &a, const sc_bit &b)
 
#define DEFN_BIN_FUN(ret, fun)
 
inline::std::ostream & operator<<(::std::ostream &os, const sc_bit &a)
 
sc_bit & operator=(const sc_bit &b)
 
const sc_bit operator&(const sc_bit &a, const sc_bit &b)
 
friend const sc_bit operator~(const sc_bit &a)
 
friend const sc_bit operator&(const sc_bit &a, const sc_bit &b)