systemc-clang
2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
src
model
InterfaceDecl.cpp
Go to the documentation of this file.
1
#include "
InterfaceDecl.h
"
2
#include "
FindTemplateTypes.h
"
3
4
using namespace
systemc_clang
;
5
6
InterfaceDecl::~InterfaceDecl
() {
7
if
(
template_type_
!=
nullptr
) {
8
delete
template_type_
;
9
}
10
}
11
12
InterfaceDecl::InterfaceDecl
() : name_{
"NONE"
}, template_type_{nullptr} {}
13
14
InterfaceDecl::InterfaceDecl
(
const
std::string &name,
FindTemplateTypes
*tt)
15
: name_{name}, template_type_{tt} {}
16
17
InterfaceDecl::InterfaceDecl
(
const
InterfaceDecl
&from) {
18
name_
= from.
name_
;
19
// This is necessary to allow FindInterfaces to go out of scope.
20
template_type_
=
new
FindTemplateTypes
(*from.
template_type_
);
21
}
22
23
void
InterfaceDecl::setModuleName
(
const
std::string &name) {
name_
= name; }
24
25
std::string
InterfaceDecl::getName
() {
return
name_
; }
26
27
FindTemplateTypes
*
InterfaceDecl::getTemplateType
() {
return
template_type_
; }
28
29
void
InterfaceDecl::dump
(llvm::raw_ostream &os,
int
tabn) {
30
for
(
int
i = 0; i < tabn; i++) {
31
os <<
" "
;
32
}
33
os <<
"InterfaceDecl "
<<
this
<<
" '"
<<
name_
<<
"' FindTemplateTypes "
34
<<
template_type_
;
35
template_type_
->
printTemplateArguments
(os);
36
}
FindTemplateTypes.h
InterfaceDecl.h
systemc_clang::FindTemplateTypes
Definition
FindTemplateTypes.h:49
systemc_clang::FindTemplateTypes::printTemplateArguments
void printTemplateArguments(llvm::raw_ostream &os)
Definition
FindTemplateTypes.cpp:323
systemc_clang::InterfaceDecl
Definition
InterfaceDecl.h:12
systemc_clang::InterfaceDecl::setModuleName
void setModuleName(const std::string &)
Definition
InterfaceDecl.cpp:23
systemc_clang::InterfaceDecl::name_
std::string name_
Definition
InterfaceDecl.h:32
systemc_clang::InterfaceDecl::dump
void dump(llvm::raw_ostream &, int tabn=0)
Definition
InterfaceDecl.cpp:29
systemc_clang::InterfaceDecl::template_type_
FindTemplateTypes * template_type_
Definition
InterfaceDecl.h:33
systemc_clang::InterfaceDecl::InterfaceDecl
InterfaceDecl()
Definition
InterfaceDecl.cpp:12
systemc_clang::InterfaceDecl::getName
std::string getName()
Get parameters.
Definition
InterfaceDecl.cpp:25
systemc_clang::InterfaceDecl::getTemplateType
FindTemplateTypes * getTemplateType()
Definition
InterfaceDecl.cpp:27
systemc_clang::InterfaceDecl::~InterfaceDecl
virtual ~InterfaceDecl()
Definition
InterfaceDecl.cpp:6
systemc_clang
Definition
SplitCFG.h:10
Generated by
1.12.0