クラス テンプレート sc_dt::sc_context< T >

#include <sc_context.h>

すべてのメンバ一覧

Public メソッド

 sc_context (const T &, sc_context_begin=SC_NOW)
 ~sc_context ()
void begin ()
void end ()
const T & value () const

Static Public メソッド

static const T & default_value ()

Private メソッド

 sc_context (const sc_context< T > &)
void * operator new (std::size_t)

Private 変数

const T m_value
const T *& m_def_value_ptr
const T * m_old_value_ptr


説明

template<class T>
class sc_dt::sc_context< T >

sc_context.h132 行で定義されています。


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

template<class T>
sc_dt::sc_context< T >::sc_context ( const sc_context< T > &   )  [inline, private]

sc_context.h228 行で定義されています。

00229 : m_value(),
00230   m_def_value_ptr( sc_global<T>::instance()->value_ptr() ),
00231   m_old_value_ptr( 0 )
00232 {
00233     // this constructor should never be called
00234     SC_REPORT_FATAL( sc_core::SC_ID_INTERNAL_ERROR_, "should never be called" );
00235 }

template<class T>
sc_dt::sc_context< T >::sc_context ( const T &  value_,
sc_context_begin  begin = SC_NOW 
) [inline, explicit]

sc_context.h250 行で定義されています。

00251 : m_value( value_ ),
00252   m_def_value_ptr( sc_global<T>::instance()->value_ptr() ),
00253   m_old_value_ptr( 0 )
00254 {
00255     if( begin == SC_NOW )
00256     {
00257         m_old_value_ptr = m_def_value_ptr;
00258         m_def_value_ptr = &m_value;
00259     }
00260 }

template<class T>
sc_dt::sc_context< T >::~sc_context (  )  [inline]

sc_context.h264 行で定義されています。

00265 {
00266     if( m_old_value_ptr != 0 )
00267     {
00268         m_def_value_ptr = m_old_value_ptr;
00269         m_old_value_ptr = 0;
00270     }
00271 }


関数

template<class T>
void * sc_dt::sc_context< T >::operator new ( std::size_t   )  [inline, private]

sc_context.h240 行で定義されています。

00241 {
00242     // this method should never be called
00243     SC_REPORT_FATAL( sc_core::SC_ID_INTERNAL_ERROR_, "should never be called" );
00244     return (void*)0;
00245 }

template<class T>
void sc_dt::sc_context< T >::begin (  )  [inline]

sc_context.h277 行で定義されています。

00278 {
00279     if( m_old_value_ptr == 0 )
00280     {
00281         m_old_value_ptr = m_def_value_ptr;
00282         m_def_value_ptr = &m_value;
00283     }
00284     else
00285     {
00286         SC_REPORT_ERROR( sc_core::SC_ID_CONTEXT_BEGIN_FAILED_, 0 );
00287     }
00288 }

template<class T>
void sc_dt::sc_context< T >::end (  )  [inline]

sc_context.h293 行で定義されています。

00294 {
00295     if( m_old_value_ptr != 0 )
00296     {
00297         m_def_value_ptr = m_old_value_ptr;
00298         m_old_value_ptr = 0;
00299     }
00300     else
00301     {
00302         SC_REPORT_ERROR( sc_core::SC_ID_CONTEXT_END_FAILED_, 0 );
00303     }
00304 }

template<class T>
const T & sc_dt::sc_context< T >::default_value (  )  [inline, static]

sc_context.h310 行で定義されています。

00311 {
00312     return *sc_global<T>::instance()->value_ptr();
00313 }

template<class T>
const T & sc_dt::sc_context< T >::value (  )  const [inline]

sc_context.h318 行で定義されています。

00319 {
00320     return m_value;
00321 }


変数

template<class T>
const T sc_dt::sc_context< T >::m_value [private]

sc_context.h150 行で定義されています。

template<class T>
const T*& sc_dt::sc_context< T >::m_def_value_ptr [private]

sc_context.h151 行で定義されています。

template<class T>
const T* sc_dt::sc_context< T >::m_old_value_ptr [private]

sc_context.h152 行で定義されています。


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

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