iverilog/PEvent.h

60 lines
1.8 KiB
C
Raw Normal View History

#ifndef IVL_PEvent_H
#define IVL_PEvent_H
2000-04-01 21:31:57 +02:00
/*
* Copyright (c) 2000-2024 Stephen Williams (steve@icarus.com)
2000-04-01 21:31:57 +02:00
*
* 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
2012-08-29 03:41:23 +02:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2000-04-01 21:31:57 +02:00
*/
# include "PNamedItem.h"
# include "StringHeap.h"
2000-04-01 21:31:57 +02:00
# include <string>
2001-01-16 03:44:17 +01:00
class Design;
class NetScope;
2000-04-01 21:31:57 +02:00
/*
* The PEvent class represents event objects. These are things that
* are declared in Verilog as ``event foo;'' The name passed to the
2003-01-30 17:23:07 +01:00
* constructor is the "foo" part of the declaration.
2000-04-01 21:31:57 +02:00
*/
class PEvent : public PNamedItem {
2000-04-01 21:31:57 +02:00
public:
// The name is a perm-allocated string. It is the simple name
// of the event, without any scope.
explicit PEvent(perm_string name, unsigned lexical_pos);
2000-04-01 21:31:57 +02:00
~PEvent();
perm_string name() const;
2000-04-01 21:31:57 +02:00
unsigned lexical_pos() const { return lexical_pos_; }
void elaborate_scope(Design*des, NetScope*scope) const;
SymbolType symbol_type() const;
2000-04-01 21:31:57 +02:00
private:
perm_string name_;
unsigned lexical_pos_;
2000-04-01 21:31:57 +02:00
private: // not implemented
PEvent(const PEvent&);
PEvent& operator= (const PEvent&);
};
#endif /* IVL_PEvent_H */