Move PUdp constructor into compiled file.

This commit is contained in:
steve 2003-07-15 05:07:13 +00:00
parent cadf4cfdef
commit 4a8b9e549a
4 changed files with 58 additions and 12 deletions

View File

@ -16,7 +16,7 @@
# 59 Temple Place - Suite 330 # 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA # 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 SHELL = /bin/sh
@ -128,7 +128,7 @@ set_width.o sync.o \
verinum.o verireal.o target.o targets.o \ verinum.o verireal.o target.o targets.o \
Attrib.o HName.o LineInfo.o Module.o PData.o PDelays.o PEvent.o \ Attrib.o HName.o LineInfo.o Module.o PData.o PDelays.o PEvent.o \
PExpr.o PGate.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) $(FF) $(TT)
Makefile: Makefile.in config.h.in config.status Makefile: Makefile.in config.h.in config.status

36
PUdp.cc Normal file
View File

@ -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.
*
*/

14
PUdp.h
View File

@ -19,21 +19,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include <map> # include <map>
# include "svector.h" # include "svector.h"
# include <string>
# include "verinum.h" # include "verinum.h"
class PExpr; class PExpr;
svector<string>::svector<string>(unsigned size)
: nitems_(size), items_(new string[size])
{
}
/* /*
* This class represents a parsed UDP. This is a much simpler object * This class represents a parsed UDP. This is a much simpler object
* then a module or macromodule. * then a module or macromodule.
@ -58,8 +52,7 @@ svector<string>::svector<string>(unsigned size)
class PUdp { class PUdp {
public: public:
explicit PUdp(const string&n, unsigned nports) explicit PUdp(const string&n, unsigned nports);
: ports(nports), sequential(false), initial(verinum::Vx), name_(n) { }
svector<string>ports; svector<string>ports;
bool sequential; bool sequential;
@ -84,6 +77,9 @@ class PUdp {
/* /*
* $Log: PUdp.h,v $ * $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 * Revision 1.9 2003/07/15 03:49:22 steve
* Spelling fixes. * Spelling fixes.
* *

View File

@ -21,9 +21,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
# include <string>
# include <assert.h> # include <assert.h>
/* /*
@ -95,8 +96,21 @@ template <class TYPE> class svector {
}; };
/*
* Override the implementation of the above template for the string
* type parameter. The initialization to nil works different here.
*/
svector<string>::svector<string>(unsigned size)
: nitems_(size), items_(new string[size])
{
}
/* /*
* $Log: svector.h,v $ * $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 * Revision 1.6 2002/08/12 01:35:00 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *