クラス sc_core::sc_port_registry

#include <sc_port.h>

すべてのメンバ一覧

Public メソッド

void insert (sc_port_base *)
void remove (sc_port_base *)
int size () const

Private メソッド

 sc_port_registry (sc_simcontext &simc_)
 ~sc_port_registry ()
void complete_binding ()
void construction_done ()
void elaboration_done ()
void start_simulation ()
void simulation_done ()
 sc_port_registry ()
 sc_port_registry (const sc_port_registry &)
sc_port_registryoperator= (const sc_port_registry &)

Static Private メソッド

static void replace_port (sc_port_registry *)

Private 変数

sc_simcontextm_simc
std::vector< sc_port_base * > m_port_vec

フレンド

class sc_simcontext


説明

sc_port.h231 行で定義されています。


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

sc_core::sc_port_registry::sc_port_registry ( sc_simcontext simc_  )  [explicit, private]

sc_port.cpp672 行で定義されています。

00673 : m_simc( &simc_ )
00674 {
00675 }

sc_core::sc_port_registry::~sc_port_registry (  )  [private]

sc_port.cpp680 行で定義されています。

00681 {
00682 }

sc_core::sc_port_registry::sc_port_registry (  )  [private]

sc_core::sc_port_registry::sc_port_registry ( const sc_port_registry  )  [private]


関数

void sc_core::sc_port_registry::insert ( sc_port_base port_  ) 

sc_port.cpp625 行で定義されています。

00626 {
00627     if( sc_is_running() ) {
00628         port_->report_error( SC_ID_INSERT_PORT_, "simulation running" );
00629     }
00630 
00631 #if defined(DEBUG_SYSTEMC)
00632     // check if port_ is already inserted
00633     for( int i = size() - 1; i >= 0; -- i ) {
00634         if( port_ == m_port_vec[i] ) {
00635             port_->report_error( SC_ID_INSERT_PORT_, "port already inserted" );
00636         }
00637     }
00638 #endif
00639 
00640     // append the port to the current module's vector of ports
00641     sc_module* curr_module = m_simc->hierarchy_curr();
00642     if( curr_module == 0 ) {
00643         port_->report_error( SC_ID_PORT_OUTSIDE_MODULE_ );
00644     }
00645     curr_module->append_port( port_ );
00646 
00647     // insert
00648     m_port_vec.push_back( port_ );
00649 }

void sc_core::sc_port_registry::remove ( sc_port_base port_  ) 

sc_port.cpp652 行で定義されています。

00653 {
00654     int i;
00655     for( i = size() - 1; i >= 0; -- i ) {
00656         if( port_ == m_port_vec[i] ) {
00657             break;
00658         }
00659     }
00660     if( i == -1 ) {
00661         port_->report_error( SC_ID_REMOVE_PORT_, "port not registered" );
00662     }
00663 
00664     // remove
00665     m_port_vec[i] = m_port_vec[size() - 1];
00666     m_port_vec.resize(size()-1);
00667 }

int sc_core::sc_port_registry::size (  )  const [inline]

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

00241         { return m_port_vec.size(); }

void sc_core::sc_port_registry::complete_binding (  )  [private]

sc_port.cpp697 行で定義されています。

00698 {
00699     for( int i = size() - 1; i >= 0; -- i ) {
00700         m_port_vec[i]->complete_binding();
00701     }
00702 }

void sc_core::sc_port_registry::construction_done (  )  [private]

sc_port.cpp687 行で定義されています。

00688 {
00689     for( int i = size() - 1; i >= 0; -- i ) {
00690         m_port_vec[i]->construction_done();
00691     }
00692 }

void sc_core::sc_port_registry::elaboration_done (  )  [private]

sc_port.cpp708 行で定義されています。

00709 {
00710     complete_binding();
00711 
00712     for( int i = size() - 1; i >= 0; -- i ) {
00713         m_port_vec[i]->elaboration_done();
00714     }
00715 }

void sc_core::sc_port_registry::start_simulation (  )  [private]

sc_port.cpp720 行で定義されています。

00721 {
00722     for( int i = size() - 1; i >= 0; -- i ) {
00723         m_port_vec[i]->start_simulation();
00724     }
00725 }

void sc_core::sc_port_registry::simulation_done (  )  [private]

sc_port.cpp730 行で定義されています。

00731 {
00732     for( int i = size() - 1; i >= 0; -- i ) {
00733         m_port_vec[i]->simulation_done();
00734     }
00735 }

void sc_core::sc_port_registry::replace_port ( sc_port_registry registry  )  [static, private]

sc_port.cpp740 行で定義されています。

00741 {
00742 }

sc_port_registry& sc_core::sc_port_registry::operator= ( const sc_port_registry  )  [private]


フレンドと関連する関数

friend class sc_simcontext [friend]

sc_port.h233 行で定義されています。


変数

sc_port.h270 行で定義されています。

sc_port.h271 行で定義されています。


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

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