Commit 3302c59f authored by Twiga's avatar Twiga

clean up code.

parent fad37f02
......@@ -4,50 +4,41 @@
using namespace scpar;
using namespace std;
InterfaceDecl::~InterfaceDecl()
{
if (_templateType != NULL) {
InterfaceDecl::~InterfaceDecl() {
if (_templateType != nullptr) {
delete _templateType;
}
}
InterfaceDecl::InterfaceDecl():
_name("NONE"), _templateType(NULL)
{
InterfaceDecl::InterfaceDecl() :
_name{"NONE"},
_templateType{nullptr} {
}
InterfaceDecl::InterfaceDecl(const string & name, FindTemplateTypes * tt)
:_name(name), _templateType(tt)
{
InterfaceDecl::InterfaceDecl( const string &name, FindTemplateTypes * tt ) :
_name{name},
_templateType{tt} {
}
InterfaceDecl::InterfaceDecl(const InterfaceDecl & from)
{
InterfaceDecl::InterfaceDecl( const InterfaceDecl &from ) {
_name = from._name;
// This is necessary to allow FindInterfaces to go out of scope.
_templateType = new FindTemplateTypes(*from._templateType);
_templateType = new FindTemplateTypes( *from._templateType );
}
void InterfaceDecl::setModuleName(const string & name)
{
void InterfaceDecl::setModuleName( const string &name ) {
_name = name;
}
string InterfaceDecl::getName()
{
string InterfaceDecl::getName() {
return _name;
}
FindTemplateTypes *InterfaceDecl::getTemplateType()
{
FindTemplateTypes *InterfaceDecl::getTemplateType() {
return _templateType;
}
void InterfaceDecl::dump(raw_ostream & os, int tabn)
{
void InterfaceDecl::dump(raw_ostream & os, int tabn) {
for (int i = 0; i < tabn; i++) {
os << " ";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment