text
stringlengths 0
252
|
---|
}
|
//----------------------------------------------------------
|
string Component::get_var (){
|
string temp;
|
for (auto i: var_st){
|
if (!i.first.empty()){
|
temp = temp +"Name: "+i.first+"\tType: "+i.second+"\n";
|
}
|
}
|
if (temp.empty())
|
return "No Variable!\n";
|
else
|
return temp;
|
}
|
//----------------------------------------------------------
|
string Component::get_var_XML (){
|
string temp;
|
for (auto i: var_st){
|
if (!i.first.empty()){
|
temp = temp +"\t<Global_variable name = \""+i.first+"\"\ttype = \""+i.second+"\"></Global_variable>\n";
|
}
|
}
|
return temp;
|
}
|
//----------------------------------------------------------
|
string Component::get_func_XML (){
|
string temp, temp_local_var;
|
vector<string> vect_tp;
|
for (auto i: func_st){
|
if ((i.first != "") && (i.first != " ")){
|
vect_tp = split(i.first, '+');
|
temp_local_var = make_XML (i.second);
|
temp = temp + "\t<Function name = \""+vect_tp[0] + "\"\ttype = \"" + vect_tp[1]+"\">\n" + temp_local_var + "\t</Function>\n";
|
}
|
}
|
return temp;
|
}
|
//----------------------------------------------------------
|
string Component::get_func (){
|
string temp, temp_local_var;
|
vector<string> vect_tp;
|
for (auto i: func_st){
|
if ((i.first != "") && (i.first != " ")){
|
vect_tp = split(i.first, '+');
|
temp_local_var = make_string (i.second);
|
temp = temp +"Name: "+vect_tp[0]+"\tType: "+vect_tp[1]+"\n" + temp_local_var;
|
}
|
}
|
if (temp.empty())
|
return "No Function!\n";
|
else
|
return temp;
|
}
|
//----------------------------------------------------------
|
unordered_map<string, vector<NT>> Component::get_func_data (){
|
return func_st;
|
}
|
// Copyright (c) 2019 Group of Computer Architecture, university of Bremen. All Rights Reserved.
|
// Filename: Define.h
|
// Version 1 09-July-2019
|
#ifndef DEFINE_H_
|
#define DEFINE_H_
|
#include <iostream>
|
#include <string>
|
#include <sstream>
|
#include <vector>
|
#include <iterator>
|
using namespace std;
|
#include <limits>
|
#include <fstream>
|
#include <unordered_map>
|
#include <algorithm>
|
#define BLOCK "block #"
|
#define CLASS "class"
|
#define STRUCT "struct"
|
#define SCMODULE "sc_module"
|
#define DCSCMODULE "::sc_module"
|
#define SCMAIN "function sc_main"
|
#define SYMTAB "Symtab"
|
#define CAT "computed at runtime"
|
#define CONSTRUCT "construct"
|
#define TYPEDEF "typedef"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.