Use char8 instead of string to store name.
This commit is contained in:
parent
887654b7c5
commit
aac5fc246a
12
net_event.cc
12
net_event.cc
|
|
@ -17,13 +17,13 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: net_event.cc,v 1.10 2000/09/19 03:00:36 steve Exp $"
|
#ident "$Id: net_event.cc,v 1.11 2000/10/04 16:30:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "netlist.h"
|
# include "netlist.h"
|
||||||
|
|
||||||
NetEvent::NetEvent(const string&n)
|
NetEvent::NetEvent(const string&n)
|
||||||
: name_(n)
|
: name_(0)
|
||||||
{
|
{
|
||||||
scope_ = 0;
|
scope_ = 0;
|
||||||
snext_ = 0;
|
snext_ = 0;
|
||||||
|
|
@ -31,6 +31,8 @@ NetEvent::NetEvent(const string&n)
|
||||||
trig_ = 0;
|
trig_ = 0;
|
||||||
waitref_ = 0;
|
waitref_ = 0;
|
||||||
wlist_ = 0;
|
wlist_ = 0;
|
||||||
|
name_ = new char[n.length()+1];
|
||||||
|
strcpy(name_, n.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
NetEvent::~NetEvent()
|
NetEvent::~NetEvent()
|
||||||
|
|
@ -42,9 +44,10 @@ NetEvent::~NetEvent()
|
||||||
delete probes_;
|
delete probes_;
|
||||||
probes_ = tmp;
|
probes_ = tmp;
|
||||||
}
|
}
|
||||||
|
delete[]name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
string NetEvent::name() const
|
const char* NetEvent::name() const
|
||||||
{
|
{
|
||||||
return name_;
|
return name_;
|
||||||
}
|
}
|
||||||
|
|
@ -383,6 +386,9 @@ NetProc* NetEvWait::statement()
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: net_event.cc,v $
|
* $Log: net_event.cc,v $
|
||||||
|
* Revision 1.11 2000/10/04 16:30:39 steve
|
||||||
|
* Use char8 instead of string to store name.
|
||||||
|
*
|
||||||
* Revision 1.10 2000/09/19 03:00:36 steve
|
* Revision 1.10 2000/09/19 03:00:36 steve
|
||||||
* Typo stepping ot next probe in delete.
|
* Typo stepping ot next probe in delete.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#if !defined(WINNT) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: netlist.h,v 1.169 2000/09/29 04:43:09 steve Exp $"
|
#ident "$Id: netlist.h,v 1.170 2000/10/04 16:30:39 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1558,7 +1558,7 @@ class NetEvent : public LineInfo {
|
||||||
explicit NetEvent (const string&n);
|
explicit NetEvent (const string&n);
|
||||||
~NetEvent();
|
~NetEvent();
|
||||||
|
|
||||||
string name() const;
|
const char* name() const;
|
||||||
string full_name() const;
|
string full_name() const;
|
||||||
|
|
||||||
// Get information about probes connected to me.
|
// Get information about probes connected to me.
|
||||||
|
|
@ -1583,7 +1583,7 @@ class NetEvent : public LineInfo {
|
||||||
void replace_event(NetEvent*that);
|
void replace_event(NetEvent*that);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string name_;
|
char* name_;
|
||||||
|
|
||||||
// The NetScope class uses these to list the events.
|
// The NetScope class uses these to list the events.
|
||||||
NetScope*scope_;
|
NetScope*scope_;
|
||||||
|
|
@ -2796,6 +2796,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.h,v $
|
* $Log: netlist.h,v $
|
||||||
|
* Revision 1.170 2000/10/04 16:30:39 steve
|
||||||
|
* Use char8 instead of string to store name.
|
||||||
|
*
|
||||||
* Revision 1.169 2000/09/29 04:43:09 steve
|
* Revision 1.169 2000/09/29 04:43:09 steve
|
||||||
* Cnstant evaluation of NE.
|
* Cnstant evaluation of NE.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue