クラス sc_dt::sc_fxval

#include <sc_fxval.h>

すべてのメンバ一覧

Public メソッド

 sc_fxval (scfx_rep *)
 sc_fxval (sc_fxval_observer *=0)
 sc_fxval (int, sc_fxval_observer *=0)
 sc_fxval (unsigned int, sc_fxval_observer *=0)
 sc_fxval (long, sc_fxval_observer *=0)
 sc_fxval (unsigned long, sc_fxval_observer *=0)
 sc_fxval (double, sc_fxval_observer *=0)
 sc_fxval (const char *, sc_fxval_observer *=0)
 sc_fxval (const sc_fxval &, sc_fxval_observer *=0)
 sc_fxval (const sc_fxval_fast &, sc_fxval_observer *=0)
 sc_fxval (const sc_fxnum &, sc_fxval_observer *=0)
 sc_fxval (const sc_fxnum_fast &, sc_fxval_observer *=0)
 sc_fxval (int64, sc_fxval_observer *=0)
 sc_fxval (uint64, sc_fxval_observer *=0)
 sc_fxval (const sc_int_base &, sc_fxval_observer *=0)
 sc_fxval (const sc_uint_base &, sc_fxval_observer *=0)
 sc_fxval (const sc_signed &, sc_fxval_observer *=0)
 sc_fxval (const sc_unsigned &, sc_fxval_observer *=0)
 ~sc_fxval ()
const scfx_repget_rep () const
void set_rep (scfx_rep *)
const sc_fxval operator- () const
const sc_fxvaloperator+ () const
 DECL_BIN_OP_T (/, int64) DECL_BIN_OP_T(/
uint64 DECL_BIN_OP_T (/, const sc_int_base &) DECL_BIN_OP_T(/
uint64 const sc_uint_baseDECL_BIN_OP_T (/, const sc_signed &) friend const sc_fxval operator<< (const sc_fxval &
const sc_fxval operator++ (int)
const sc_fxval operator-- (int)
sc_fxvaloperator++ ()
sc_fxvaloperator-- ()
 operator double () const
short to_short () const
unsigned short to_ushort () const
int to_int () const
unsigned int to_uint () const
long to_long () const
unsigned long to_ulong () const
int64 to_int64 () const
uint64 to_uint64 () const
float to_float () const
double to_double () const
const std::string to_string () const
const std::string to_string (sc_numrep) const
const std::string to_string (sc_numrep, bool) const
const std::string to_string (sc_fmt) const
const std::string to_string (sc_numrep, sc_fmt) const
const std::string to_string (sc_numrep, bool, sc_fmt) const
const std::string to_dec () const
const std::string to_bin () const
const std::string to_oct () const
const std::string to_hex () const
bool is_neg () const
bool is_zero () const
bool is_nan () const
bool is_inf () const
bool is_normal () const
bool rounding_flag () const
void print (::std::ostream &=::std::cout) const
void scan (::std::istream &=::std::cin)
void dump (::std::ostream &=::std::cout) const
bool get_bit (int) const

Public 変数

uint64 const sc_uint_baseint

Protected メソッド

sc_fxval_observerobserver () const
sc_fxval_observerlock_observer () const
void unlock_observer (sc_fxval_observer *) const
void get_type (int &, int &, sc_enc &) const
const sc_fxval quantization (const scfx_params &, bool &) const
const sc_fxval overflow (const scfx_params &, bool &) const

Private 変数

scfx_repm_rep
sc_fxval_observerm_observer

フレンド

class sc_fxnum
void neg (sc_fxval &, const sc_fxval &)
const sc_fxval operator/ (const sc_fxval &, const sc_fxval &)
const sc_fxval operator>> (const sc_fxval &, int)
void lshift (sc_fxval &, const sc_fxval &, int)
void rshift (sc_fxval &, const sc_fxval &, int)


説明

sc_fxval.h77 行で定義されています。


コンストラクタとデストラクタ

sc_dt::sc_fxval::sc_fxval ( scfx_rep a  )  [inline]

sc_fxval.h786 行で定義されています。

00787 : m_rep( a ),
00788   m_observer( 0 )
00789 {}

sc_dt::sc_fxval::sc_fxval ( sc_fxval_observer observer_ = 0  )  [inline, explicit]

sc_fxval.h795 行で定義されています。

00796 : m_rep( new scfx_rep ),
00797   m_observer( observer_ )
00798 {
00799     SC_FXVAL_OBSERVER_DEFAULT_
00800     SC_FXVAL_OBSERVER_CONSTRUCT_( *this )
00801 }

sc_dt::sc_fxval::sc_fxval ( int  ,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( unsigned  int,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( long  ,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( unsigned  long,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( double  ,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( const char *  ,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( const sc_fxval a,
sc_fxval_observer observer_ = 0 
) [inline]

sc_fxval.h804 行で定義されています。

00806 : m_rep( new scfx_rep( *a.m_rep ) ),
00807   m_observer( observer_ )
00808 {
00809     SC_FXVAL_OBSERVER_DEFAULT_
00810     SC_FXVAL_OBSERVER_READ_( a )
00811     SC_FXVAL_OBSERVER_CONSTRUCT_( *this )
00812     SC_FXVAL_OBSERVER_WRITE_( *this )
00813 }

sc_dt::sc_fxval::sc_fxval ( const sc_fxval_fast ,
sc_fxval_observer = 0 
)

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum a,
sc_fxval_observer observer_ = 0 
) [inline]

sc_fxnum.h4734 行で定義されています。

04736 : m_rep( new scfx_rep( *a.get_rep() ) ),
04737   m_observer( observer_ )
04738 {
04739     SC_FXVAL_OBSERVER_DEFAULT_
04740     SC_FXVAL_OBSERVER_CONSTRUCT_( *this )
04741     SC_FXVAL_OBSERVER_WRITE_( *this )
04742 }

sc_dt::sc_fxval::sc_fxval ( const sc_fxnum_fast a,
sc_fxval_observer observer_ = 0 
) [inline]

sc_fxnum.h4745 行で定義されています。

04747 : m_rep( new scfx_rep( a.to_double() ) ),
04748   m_observer( observer_ )
04749 {
04750     SC_FXVAL_OBSERVER_DEFAULT_
04751     SC_FXVAL_OBSERVER_CONSTRUCT_( *this )
04752     SC_FXVAL_OBSERVER_WRITE_( *this )
04753 }

sc_dt::sc_fxval::sc_fxval ( int64  ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::sc_fxval ( uint64  ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::sc_fxval ( const sc_int_base ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::sc_fxval ( const sc_uint_base ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::sc_fxval ( const sc_signed ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::sc_fxval ( const sc_unsigned ,
sc_fxval_observer = 0 
) [explicit]

sc_dt::sc_fxval::~sc_fxval (  )  [inline]

sc_fxval.h854 行で定義されています。

00855 {
00856     SC_FXVAL_OBSERVER_DESTRUCT_( *this )
00857     delete m_rep;
00858 }


関数

sc_fxval_observer * sc_dt::sc_fxval::observer (  )  const [inline, protected]

sc_fxval.h778 行で定義されています。

00779 {
00780     return m_observer;
00781 }

const scfx_rep * sc_dt::sc_fxval::get_rep (  )  const [inline]

sc_fxval.h864 行で定義されています。

00865 {
00866     SC_FXVAL_OBSERVER_READ_( *this )
00867     return m_rep;
00868 }

void sc_dt::sc_fxval::set_rep ( scfx_rep rep_  )  [inline]

sc_fxval.h873 行で定義されています。

00874 {
00875     delete m_rep;
00876     m_rep = rep_;
00877     SC_FXVAL_OBSERVER_WRITE_( *this )
00878 }

const sc_fxval sc_dt::sc_fxval::operator- (  )  const [inline]

sc_fxval.h885 行で定義されています。

00886 {
00887     SC_FXVAL_OBSERVER_READ_( *this )
00888     return sc_fxval( sc_dt::neg_scfx_rep( *m_rep ) );
00889 }

const sc_fxval & sc_dt::sc_fxval::operator+ (  )  const [inline]

sc_fxval.h893 行で定義されています。

00894 {
00895     // SC_FXVAL_OBSERVER_READ_( *this )
00896     return *this;
00897 }

sc_dt::sc_fxval::DECL_BIN_OP_T ( ,
int64   
)

uint64 sc_dt::sc_fxval::DECL_BIN_OP_T ( ,
const sc_int_base  
)

uint64 const sc_uint_base& sc_dt::sc_fxval::DECL_BIN_OP_T ( ,
const sc_signed  
) const

const sc_fxval sc_dt::sc_fxval::operator++ ( int   ) 

const sc_fxval sc_dt::sc_fxval::operator-- ( int   ) 

sc_fxval& sc_dt::sc_fxval::operator++ (  ) 

sc_fxval& sc_dt::sc_fxval::operator-- (  ) 

sc_dt::sc_fxval::operator double (  )  const

short sc_dt::sc_fxval::to_short (  )  const

unsigned short sc_dt::sc_fxval::to_ushort (  )  const

int sc_dt::sc_fxval::to_int (  )  const

unsigned int sc_dt::sc_fxval::to_uint (  )  const

long sc_dt::sc_fxval::to_long (  )  const

unsigned long sc_dt::sc_fxval::to_ulong (  )  const

int64 sc_dt::sc_fxval::to_int64 (  )  const

uint64 sc_dt::sc_fxval::to_uint64 (  )  const

float sc_dt::sc_fxval::to_float (  )  const

double sc_dt::sc_fxval::to_double (  )  const

const std::string sc_dt::sc_fxval::to_string (  )  const

sc_fxval.cpp65 行で定義されています。

00066 {
00067     return std::string( m_rep->to_string( SC_DEC, -1, SC_E ) );
00068 }

const std::string sc_dt::sc_fxval::to_string ( sc_numrep  numrep  )  const

sc_fxval.cpp71 行で定義されています。

00072 {
00073     return std::string( m_rep->to_string( numrep, -1, SC_E ) );
00074 }

const std::string sc_dt::sc_fxval::to_string ( sc_numrep  numrep,
bool  w_prefix 
) const

sc_fxval.cpp77 行で定義されています。

00078 {
00079     return std::string( m_rep->to_string( numrep, (w_prefix ? 1 : 0), SC_E ) );
00080 }

const std::string sc_dt::sc_fxval::to_string ( sc_fmt  fmt  )  const

sc_fxval.cpp83 行で定義されています。

00084 {
00085     return std::string( m_rep->to_string( SC_DEC, -1, fmt ) );
00086 }

const std::string sc_dt::sc_fxval::to_string ( sc_numrep  numrep,
sc_fmt  fmt 
) const

sc_fxval.cpp89 行で定義されています。

00090 {
00091     return std::string( m_rep->to_string( numrep, -1, fmt ) );
00092 }

const std::string sc_dt::sc_fxval::to_string ( sc_numrep  numrep,
bool  w_prefix,
sc_fmt  fmt 
) const

sc_fxval.cpp95 行で定義されています。

00096 {
00097     return std::string( m_rep->to_string( numrep, (w_prefix ? 1 : 0), fmt ) );
00098 }

const std::string sc_dt::sc_fxval::to_dec (  )  const

sc_fxval.cpp102 行で定義されています。

00103 {
00104     return std::string( m_rep->to_string( SC_DEC, -1, SC_E ) );
00105 }

const std::string sc_dt::sc_fxval::to_bin (  )  const

sc_fxval.cpp108 行で定義されています。

00109 {
00110     return std::string( m_rep->to_string( SC_BIN, -1, SC_E ) );
00111 }

const std::string sc_dt::sc_fxval::to_oct (  )  const

sc_fxval.cpp114 行で定義されています。

00115 {
00116     return std::string( m_rep->to_string( SC_OCT, -1, SC_E ) );
00117 }

const std::string sc_dt::sc_fxval::to_hex (  )  const

sc_fxval.cpp120 行で定義されています。

00121 {
00122     return std::string( m_rep->to_string( SC_HEX, -1, SC_E ) );
00123 }

bool sc_dt::sc_fxval::is_neg (  )  const

bool sc_dt::sc_fxval::is_zero (  )  const

bool sc_dt::sc_fxval::is_nan (  )  const

bool sc_dt::sc_fxval::is_inf (  )  const

bool sc_dt::sc_fxval::is_normal (  )  const

bool sc_dt::sc_fxval::rounding_flag (  )  const

void sc_dt::sc_fxval::print ( ::std::ostream &  os = ::std::cout  )  const

sc_fxval.cpp129 行で定義されています。

00130 {
00131     m_rep->print( os );
00132 }

void sc_dt::sc_fxval::scan ( ::std::istream &  is = ::std::cin  ) 

sc_fxval.cpp135 行で定義されています。

00136 {
00137     std::string s;
00138     is >> s;
00139     *this = s.c_str();
00140 }

void sc_dt::sc_fxval::dump ( ::std::ostream &  os = ::std::cout  )  const

sc_fxval.cpp143 行で定義されています。

00144 {
00145     os << "sc_fxval" << ::std::endl;
00146     os << "(" << ::std::endl;
00147     os << "rep = ";
00148     m_rep->dump( os );
00149     // TO BE COMPLETED
00150     // os << "r_flag   = " << m_r_flag << ::std::endl;
00151     // os << "observer = ";
00152     // if( m_observer != 0 )
00153     //     m_observer->dump( os );
00154     // else
00155     //     os << "0" << ::std::endl;
00156     os << ")" << ::std::endl;
00157 }

bool sc_dt::sc_fxval::get_bit ( int   )  const

sc_fxval_observer * sc_dt::sc_fxval::lock_observer (  )  const [protected]

sc_fxval.cpp163 行で定義されています。

00164 {
00165     SC_ASSERT_( m_observer != 0, "lock observer failed" );
00166     sc_fxval_observer* tmp = m_observer;
00167     m_observer = 0;
00168     return tmp;
00169 }

void sc_dt::sc_fxval::unlock_observer ( sc_fxval_observer observer_  )  const [protected]

sc_fxval.cpp172 行で定義されています。

00173 {
00174     SC_ASSERT_( observer_ != 0, "unlock observer failed" );
00175     m_observer = observer_;
00176 }

void sc_dt::sc_fxval::get_type ( int ,
int ,
sc_enc  
) const [protected]

const sc_fxval sc_dt::sc_fxval::quantization ( const scfx_params ,
bool &   
) const [protected]

const sc_fxval sc_dt::sc_fxval::overflow ( const scfx_params ,
bool &   
) const [protected]


フレンドと関連する関数

friend class sc_fxnum [friend]

sc_fxval.h80 行で定義されています。

void neg ( sc_fxval c,
const sc_fxval a 
) [friend]

sc_fxval.h904 行で定義されています。

00905 {
00906     SC_FXVAL_OBSERVER_READ_( a )
00907     delete c.m_rep;
00908     c.m_rep = sc_dt::neg_scfx_rep( *a.m_rep );
00909     SC_FXVAL_OBSERVER_WRITE_( c )
00910 }

const sc_fxval operator/ ( const sc_fxval a,
const sc_fxval b 
) [friend]

sc_fxval.h972 行で定義されています。

00973 {
00974     SC_FXVAL_OBSERVER_READ_( a )
00975     SC_FXVAL_OBSERVER_READ_( b )
00976     return sc_fxval( sc_dt::div_scfx_rep( *a.m_rep, *b.m_rep ) );
00977 }

const sc_fxval operator>> ( const sc_fxval ,
int   
) [friend]

void lshift ( sc_fxval ,
const sc_fxval ,
int   
) [friend]

void rshift ( sc_fxval ,
const sc_fxval ,
int   
) [friend]


変数

sc_fxval.h207 行で定義されています。

sc_fxval.h418 行で定義されています。

sc_fxval.h420 行で定義されています。


このクラスの説明は次のファイルから生成されました:

SystemCに対してFri Jun 6 20:12:45 2008に生成されました。  doxygen 1.5.6