retdec
cg_writer.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_LLVMIR2HLL_GRAPHS_CG_CG_WRITER_H
8 #define RETDEC_LLVMIR2HLL_GRAPHS_CG_CG_WRITER_H
9 
10 #include <ostream>
11 #include <string>
12 
16 
17 namespace retdec {
18 namespace llvmir2hll {
19 
28 public:
29  virtual ~CGWriter() = default;
30 
34  virtual std::string getId() const = 0;
35 
43  virtual bool emitCG() = 0;
44 
45 protected:
46  CGWriter(ShPtr<CG> cg, std::ostream &out);
47 
48 protected:
51 
53  std::ostream &out;
54 };
55 
56 } // namespace llvmir2hll
57 } // namespace retdec
58 
59 #endif
A representation of a call graph (CG).
A base class of all call graph (CG) writers.
Definition: cg_writer.h:27
CGWriter(ShPtr< CG > cg, std::ostream &out)
Constructs a new writer.
Definition: cg_writer.cpp:19
virtual std::string getId() const =0
Returns the ID of the writer.
virtual ~CGWriter()=default
std::ostream & out
Stream, where the resulting CG will be emitted.
Definition: cg_writer.h:53
ShPtr< CG > cg
CG to be emitted.
Definition: cg_writer.h:50
virtual bool emitCG()=0
Emits the given CG into the given output stream.
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
A mixin to make classes non-copyable.
Declarations, aliases, macros, etc. for the use of smart pointers.