Add const probe method to NetEvent.

This commit is contained in:
steve 2001-03-29 02:52:01 +00:00
parent b0c003dc34
commit ad8565f8a6
2 changed files with 19 additions and 2 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: net_event.cc,v 1.13 2001/03/28 06:07:39 steve Exp $"
#ident "$Id: net_event.cc,v 1.14 2001/03/29 02:52:19 steve Exp $"
#endif
# include "netlist.h"
@ -86,6 +86,16 @@ NetEvProbe* NetEvent::probe(unsigned idx)
return cur;
}
const NetEvProbe* NetEvent::probe(unsigned idx) const
{
NetEvProbe*cur = probes_;
while (cur && idx) {
cur = cur->enext_;
idx -= 1;
}
return cur;
}
unsigned NetEvent::ntrig() const
{
unsigned cnt = 0;
@ -439,6 +449,9 @@ NetProc* NetEvWait::statement()
/*
* $Log: net_event.cc,v $
* Revision 1.14 2001/03/29 02:52:19 steve
* Add const probe method to NetEvent.
*
* Revision 1.13 2001/03/28 06:07:39 steve
* Add the ivl_event_t to ivl_target, and use that to generate
* .event statements in vvp way ahead of the thread that uses it.

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: netlist.h,v 1.199 2001/02/15 06:59:36 steve Exp $"
#ident "$Id: netlist.h,v 1.200 2001/03/29 02:52:01 steve Exp $"
#endif
/*
@ -1600,6 +1600,7 @@ class NetEvent : public LineInfo {
// Get information about probes connected to me.
unsigned nprobe() const;
NetEvProbe* probe(unsigned);
const NetEvProbe* probe(unsigned) const;
// Return the number of NetEvWait nodes that reference me.
unsigned nwait() const;
@ -2869,6 +2870,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.200 2001/03/29 02:52:01 steve
* Add const probe method to NetEvent.
*
* Revision 1.199 2001/02/15 06:59:36 steve
* FreeBSD port has a maintainer now.
*