クラス sc_core::sc_export_registry

#include <sc_export.h>

すべてのメンバ一覧

Public メソッド

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

Private メソッド

 sc_export_registry (sc_simcontext &simc_)
 ~sc_export_registry ()
void construction_done ()
void elaboration_done ()
void start_simulation ()
void simulation_done ()
 sc_export_registry ()
 sc_export_registry (const sc_export_registry &)
sc_export_registryoperator= (const sc_export_registry &)

Private 変数

sc_simcontextm_simc
std::vector< sc_export_base * > m_export_vec

フレンド

class sc_simcontext


説明

sc_export.h222 行で定義されています。


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

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

sc_export.cpp160 行で定義されています。

00161 : m_simc( &simc_ )
00162 {
00163 }

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

sc_export.cpp168 行で定義されています。

00169 {
00170 }

sc_core::sc_export_registry::sc_export_registry (  )  [private]

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


関数

void sc_core::sc_export_registry::insert ( sc_export_base export_  ) 

sc_export.cpp109 行で定義されています。

00110 {
00111     if( sc_is_running() ) {
00112         SC_REPORT_ERROR(SC_ID_SC_EXPORT_AFTER_START_, export_->name());
00113     }
00114 
00115 #ifdef DEBUG_SYSTEMC
00116     // check if port_ is already inserted
00117     for( int i = size() - 1; i >= 0; -- i ) {
00118         if( export_ == m_export_vec[i] ) {
00119             SC_REPORT_ERROR(SC_ID_SC_EXPORT_ALREADY_REGISTERED_, export_->name());
00120         }
00121     }
00122 #endif
00123 
00124 /* 
00125     //TBD:  maybe we want to do this stuf for later
00126 
00127     // append the port to the current module's vector of ports
00128     sc_module* curr_module = m_simc->hierarchy_curr();
00129     if( curr_module == 0 ) {
00130         port_->report_error( SC_ID_PORT_OUTSIDE_MODULE_ );
00131     }
00132     curr_module->append_port( port_ );
00133 */
00134 
00135     // insert
00136     m_export_vec.push_back( export_ );
00137 }

void sc_core::sc_export_registry::remove ( sc_export_base export_  ) 

sc_export.cpp140 行で定義されています。

00141 {
00142     if (size()==0) return;
00143     int i;
00144     for( i = size() - 1; i >= 0; -- i ) {
00145         if( export_ == m_export_vec[i] ) {
00146             break;
00147         }
00148     }
00149     if( i == -1 ) {
00150         SC_REPORT_ERROR(SC_ID_SC_EXPORT_NOT_REGISTERED_, export_->name());
00151     }
00152 
00153     // remove
00154     m_export_vec[i] = m_export_vec[size() - 1];
00155     m_export_vec.resize(size()-1);
00156 }

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

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

00232         { return m_export_vec.size(); }

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

sc_export.cpp175 行で定義されています。

00176 {
00177     for( int i = size() - 1; i >= 0; -- i ) {
00178         sc_export_base* e = m_export_vec[i];
00179         if (e->get_interface() == 0) {
00180             SC_REPORT_ERROR(SC_ID_SC_EXPORT_NOT_BOUND_AFTER_CONSTRUCTION_,
00181                 e->name());
00182         }
00183         e->before_end_of_elaboration();
00184     }
00185 }

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

sc_export.cpp190 行で定義されています。

00191 {
00192     for( int i = size() - 1; i >= 0; -- i ) {
00193         m_export_vec[i]->end_of_elaboration();
00194     }
00195 }

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

sc_export.cpp200 行で定義されています。

00201 {
00202     for( int i = size() - 1; i >= 0; -- i ) {
00203         m_export_vec[i]->start_of_simulation();
00204     }
00205 }

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

sc_export.cpp208 行で定義されています。

00209 {
00210     for( int i = size() - 1; i >= 0; -- i ) {
00211         m_export_vec[i]->end_of_simulation();
00212     }
00213 }

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


フレンドと関連する関数

friend class sc_simcontext [friend]

sc_export.h224 行で定義されています。


変数

sc_export.h256 行で定義されています。

sc_export.h257 行で定義されています。


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

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