gcc config
[prop.git] / prop-src / visualize.h
blob8e766ac65134b366a2aa0949706b97aea1df2ed6
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // This file defines the Prop visualizer. It provides an interface
4 // to various low level VCG functionalities.
5 //
6 //////////////////////////////////////////////////////////////////////////////
7 #ifndef prop_visualizer_h
8 #define prop_visualizer_h
10 #include <strstream>
11 #include <AD/visualize/vcg.h>
12 #include "codegen.h"
14 //////////////////////////////////////////////////////////////////////////////
16 // The PropVisualizer class controls datatype layout formats.
18 //////////////////////////////////////////////////////////////////////////////
19 class PropVisualizer : public VCG, private CodeGen
20 { PropVisualizer (const PropVisualizer&); // no copy constructor
21 void operator = (const PropVisualizer&); // no assignment
23 private:
25 char text_buffer[1024];
26 std::ostrstream label_text;
28 public:
30 PropVisualizer();
31 virtual ~PropVisualizer();
33 ///////////////////////////////////////////////////////////////////////////
35 // Methods to visualize various form of Prop constructs.
37 ///////////////////////////////////////////////////////////////////////////
38 void visualize_datatype_definitions ();
40 ///////////////////////////////////////////////////////////////////////////
42 // Methods to make a nice label
44 ///////////////////////////////////////////////////////////////////////////
45 void add_label (const char *, ...);
46 void make_label ();
47 void add_type (Id constructor_name, Id label, Ty ty, int anchor);
48 private:
49 va_list printer(char,va_list);
52 #endif