From 9bb27b1e8de6c6879e7d88a5bfd8e3c298f7f4de Mon Sep 17 00:00:00 2001 From: steve Date: Tue, 28 Jan 2003 16:23:27 +0000 Subject: [PATCH] Add missing net_variable.cc to CVS. --- net_variable.cc | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 net_variable.cc diff --git a/net_variable.cc b/net_variable.cc new file mode 100644 index 000000000..9d1cf95de --- /dev/null +++ b/net_variable.cc @@ -0,0 +1,77 @@ +/* + * 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: net_variable.cc,v 1.1 2003/01/28 16:23:27 steve Exp $" +#endif + +# include "config.h" +# include "netlist.h" + +NetVariable::NetVariable(const char*name) +{ + name_ = strdup(name); + scope_ = 0; + snext_ = 0; +} + +NetVariable::~NetVariable() +{ + free(name_); +} + +const char*NetVariable::basename() const +{ + return name_; +} + +NetScope* NetVariable::scope() +{ + return scope_; +} + +const NetScope* NetVariable::scope() const +{ + return scope_; +} + +NetEVariable::NetEVariable(NetVariable*v) +: var_(v) +{ +} + +NetEVariable::~NetEVariable() +{ +} + +NetExpr::TYPE NetEVariable::expr_type() const +{ + return NetExpr::ET_REAL; +} + +const NetVariable* NetEVariable::variable() const +{ + return var_; +} + +/* + * $Log: net_variable.cc,v $ + * Revision 1.1 2003/01/28 16:23:27 steve + * Add missing net_variable.cc to CVS. + * + */