-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader_dot.h
67 lines (54 loc) · 1.63 KB
/
loader_dot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef DOTLOADER_GUARD
#define DOTLOADER_GUARD
#include "defines.h"
#include <regex>
#include <fstream>
#include <string>
#include <iostream>
#include <sstream>
#include "datatypes.h"
#include "generator.h"
#include "aliasenv_maker.h"
namespace ctb
{
template <class T, class G, class IT >
class dot_loader
{
private:
public:
void load_graph(G& graph, istream&) ;
void load_instab(IT& instab, istream&) ;
void export_graph(G& instab, ostream&) ;
void export_instab(IT& instab, ostream&) ;
static string get_name();
static void self_test() ;
} ;
typedef dot_loader<traits, generator_default, instruction_table_default> dotloader_default;
template <class T, class G, class IT>
string dot_loader<T,G,IT>::get_name()
{
return "dot";
}
template <class T, class G, class IT>
void dot_loader<T,G,IT>::export_graph(G& generator, ostream& o)
{
generator.graph.dump(o);
}
template <class T, class G, class IT>
void dot_loader<T,G,IT>::load_graph(G& graph, istream&)
{
error( "dot loader does not support graph import");
}
template <class T, class G, class IT>
void dot_loader<T,G,IT>::export_instab(IT& instab, ostream& s)
{
error( "dot loader does not support instruction table export");
}
template <class T, class G, class IT>
void dot_loader<T,G,IT>::load_instab(IT& instab, istream& s)
{
error( "dot loader does not support instruction table import");
}
template class dot_loader<traits, generator_default, instruction_table_default> ;
}
#endif