systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
EventDecl.cpp
Go to the documentation of this file.
1#include "EventDecl.h"
2#include "FindTemplateTypes.h"
3
4#include "clang/AST/DeclCXX.h"
5
6using namespace systemc_clang;
7
9 // _astNode does *NOT* need to be deleted because clang should
10 // be responsible for freeing the memory.
11}
12
13EventDecl::EventDecl() : name_{"NONE"}, ast_node_{nullptr} {}
14
15EventDecl::EventDecl(const std::string &name, clang::FieldDecl *fd)
16 : name_{name}, ast_node_{fd} {}
17
19 name_ = from.name_;
20 ast_node_ = from.ast_node_;
21}
22
23std::string EventDecl::getName() const { return name_; }
24
25const clang::FieldDecl *EventDecl::getASTNode() const { return ast_node_; }
26
27void EventDecl::dump(llvm::raw_ostream &os) {
28 os << "EventDecl " << this << " " << name_ << " FieldDecl " << getASTNode();
29}
std::string getName() const
Return the name of the sc_event.
Definition EventDecl.cpp:23
EventDecl()
Constructors.
Definition EventDecl.cpp:13
clang::FieldDecl * ast_node_
Definition EventDecl.h:39
const clang::FieldDecl * getASTNode() const
Return the FieldDecl node for the sc_event declaration.
Definition EventDecl.cpp:25
void dump(llvm::raw_ostream &)
Definition EventDecl.cpp:27
virtual ~EventDecl()
Destructor.
Definition EventDecl.cpp:8