From 4a8b9e549aa87b62ed20ac9049f221683c4cd0a4 Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 15 Jul 2003 05:07:13 +0000 Subject: [PATCH] Move PUdp constructor into compiled file. --- Makefile.in | 4 ++-- PUdp.cc | 36 ++++++++++++++++++++++++++++++++++++ PUdp.h | 14 +++++--------- svector.h | 16 +++++++++++++++- 4 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 PUdp.cc diff --git a/Makefile.in b/Makefile.in index 77392f943..29247e543 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.149 2003/06/25 01:48:39 steve Exp $" +#ident "$Id: Makefile.in,v 1.150 2003/07/15 05:07:13 steve Exp $" # # SHELL = /bin/sh @@ -128,7 +128,7 @@ set_width.o sync.o \ verinum.o verireal.o target.o targets.o \ Attrib.o HName.o LineInfo.o Module.o PData.o PDelays.o PEvent.o \ PExpr.o PGate.o \ -PTask.o PFunction.o PWire.o Statement.o StringHeap.o \ +PTask.o PUdp.o PFunction.o PWire.o Statement.o StringHeap.o \ $(FF) $(TT) Makefile: Makefile.in config.h.in config.status diff --git a/PUdp.cc b/PUdp.cc new file mode 100644 index 000000000..7f83d8071 --- /dev/null +++ b/PUdp.cc @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2003 Stephen Williams (steve@icarus.com) + * + * This source code is free software; you can redistribute it + * and/or modify it in source code form under the terms of the GNU + * General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ +#ifdef HAVE_CVS_IDENT +#ident "$Id: PUdp.cc,v 1.1 2003/07/15 05:07:13 steve Exp $" +#endif + +# include "PUdp.h" + +PUdp::PUdp(const string&n, unsigned nports) +: ports(nports), sequential(false), initial(verinum::Vx), name_(n) +{ +} + +/* + * $Log: PUdp.cc,v $ + * Revision 1.1 2003/07/15 05:07:13 steve + * Move PUdp constructor into compiled file. + * + */ + diff --git a/PUdp.h b/PUdp.h index 431427ad2..c13985919 100644 --- a/PUdp.h +++ b/PUdp.h @@ -19,21 +19,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: PUdp.h,v 1.9 2003/07/15 03:49:22 steve Exp $" +#ident "$Id: PUdp.h,v 1.10 2003/07/15 05:07:13 steve Exp $" #endif # include # include "svector.h" -# include # include "verinum.h" class PExpr; -svector::svector(unsigned size) -: nitems_(size), items_(new string[size]) -{ -} - /* * This class represents a parsed UDP. This is a much simpler object * then a module or macromodule. @@ -58,8 +52,7 @@ svector::svector(unsigned size) class PUdp { public: - explicit PUdp(const string&n, unsigned nports) - : ports(nports), sequential(false), initial(verinum::Vx), name_(n) { } + explicit PUdp(const string&n, unsigned nports); svectorports; bool sequential; @@ -84,6 +77,9 @@ class PUdp { /* * $Log: PUdp.h,v $ + * Revision 1.10 2003/07/15 05:07:13 steve + * Move PUdp constructor into compiled file. + * * Revision 1.9 2003/07/15 03:49:22 steve * Spelling fixes. * diff --git a/svector.h b/svector.h index 573d09e14..c360af1bf 100644 --- a/svector.h +++ b/svector.h @@ -21,9 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: svector.h,v 1.6 2002/08/12 01:35:00 steve Exp $" +#ident "$Id: svector.h,v 1.7 2003/07/15 05:07:13 steve Exp $" #endif +# include # include /* @@ -95,8 +96,21 @@ template class svector { }; +/* + * Override the implementation of the above template for the string + * type parameter. The initialization to nil works different here. + */ +svector::svector(unsigned size) +: nitems_(size), items_(new string[size]) +{ +} + + /* * $Log: svector.h,v $ + * Revision 1.7 2003/07/15 05:07:13 steve + * Move PUdp constructor into compiled file. + * * Revision 1.6 2002/08/12 01:35:00 steve * conditional ident string using autoconfig. *