42 class sc_event_or_list;
43 class sc_event_and_list;
55 template<
typename T >
65 : m_expr( new T(true) )
93 m_expr->push_back(el);
95 operator T
const &()
const
106 mutable type * m_expr;
141 bool auto_delete_ =
false );
164 std::vector<const sc_event*> m_events;
167 mutable unsigned m_busy;
254 template<
typename IF, sc_writer_policy POL>
friend class sc_signal;
265 const char*
name()
const {
return m_name.c_str(); }
291 void notify_internal(
const sc_time& );
292 void notify_next_delta();
299 void register_event(
const char*
name );
306 enum notify_t { NONE, DELTA, TIMED };
311 notify_t m_notify_type;
312 int m_delta_event_index;
315 mutable std::vector<sc_method_handle> m_methods_static;
316 mutable std::vector<sc_method_handle> m_methods_dynamic;
317 mutable std::vector<sc_thread_handle> m_threads_static;
318 mutable std::vector<sc_thread_handle> m_threads_dynamic;
327 #define SC_KERNEL_EVENT_PREFIX "$$$$kernel_event$$$$_"
347 : m_event( e ), m_notify_time( t )
351 {
if( m_event != 0 ) { m_event->m_timed = 0; } }
356 const sc_time& notify_time()
const
357 {
return m_notify_time; }
359 static void*
operator new( std::size_t )
360 {
return allocate(); }
362 static void operator delete(
void* p, std::size_t )
368 static void* allocate();
369 static void deallocate(
void* );
374 sc_time m_notify_time;
380 sc_event_timed(
const sc_event_timed& );
381 sc_event_timed& operator = (
const sc_event_timed& );
397 sc_event::notify_internal(
const sc_time& t )
401 m_delta_event_index = m_simc->add_delta_event(
this );
402 m_notify_type = DELTA;
406 m_simc->add_timed_event( et );
408 m_notify_type = TIMED;
414 sc_event::notify_next_delta()
416 if( m_notify_type != NONE ) {
420 m_delta_event_index = m_simc->add_delta_event(
this );
421 m_notify_type = DELTA;
436 m_methods_static.push_back( method_h );
443 m_threads_static.push_back( thread_h );
450 m_methods_dynamic.push_back( method_h );
457 m_threads_dynamic.push_back( thread_h );
465 extern void notify( sc_event& e );
466 extern void notify(
const sc_time& t, sc_event& e );
475 , m_and_list( and_list_ )
476 , m_auto_delete( auto_delete_ )
486 , m_and_list( and_list_ )
487 , m_auto_delete( auto_delete_ )
490 m_events.push_back( &e );
496 , m_and_list( that.m_and_list )
497 , m_auto_delete( false )
530 m_events.swap( that.m_events );
538 swap( const_cast<sc_event_list&>(that) );
540 m_events = that.m_events;
548 return m_events.size();
571 return m_auto_delete && ! m_busy;
581 if( ! m_busy && m_auto_delete ) {
const char * basename() const
T const & release() const
void swap(sc_event_or_list &)
sc_event_or_list & operator|=(const sc_event &)
void swap(sc_event_list &)
sc_event_expr< sc_event_and_list > sc_event_and_expr
sc_event_list & operator=(const sc_event_list &)
void swap(sc_event_and_list &)
void push_back(type const &el) const
void push_back(const sc_event &)
void report_premature_destruction() const
sc_event_list(const sc_event_list &)
sc_event_and_expr operator&(const sc_event &) const
void report_invalid_modification() const
friend void sc_thread_cor_fn(void *arg)
sc_event_or_expr operator|(sc_event_or_expr expr, sc_event const &e)
class sc_thread_process * sc_thread_handle
bool in_hierarchy() const
sc_event_or_expr operator|(const sc_event &) const
const sc_time & time_stamp() const
void push_back(sc_event const &e) const
sc_event_and_list & operator&=(const sc_event &)
int sc_notify_time_compare(const void *, const void *)
sc_event_expr< sc_event_and_list > operator&(const sc_event &)
friend class sc_event_timed
void add_dynamic(sc_method_handle) const
sc_object * get_parent_object() const
void remove_dynamic(sc_method_handle, const sc_event *) const
const sc_time SC_ZERO_TIME
friend class sc_simcontext
sc_event_expr< sc_event_or_list > operator|(const sc_event &) const
sc_event_and_expr operator&(sc_event_and_expr expr, sc_event const &e)
#define SC_REPORT_ERROR(msg_type, msg)
class sc_method_process * sc_method_handle
const char * name() const
friend void sc_thread_cor_fn(void *arg)
sc_event_expr< sc_event_or_list > sc_event_or_expr
void move_from(const sc_event_list &)
friend int sc_notify_time_compare(const void *, const void *)
sc_event_expr(sc_event_expr const &e)