Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
printer.h
Go to the documentation of this file.
1 
18 #ifndef ION_GFXUTILS_PRINTER_H_
19 #define ION_GFXUTILS_PRINTER_H_
20 
21 #include <functional>
22 #include <iostream> // NOLINT
23 
24 #include "ion/gfx/node.h"
25 
26 namespace ion {
27 namespace gfxutils {
28 
31 class ION_API Printer {
32  public:
35  enum Format {
36  kText, // Regular text format.
37  kHtml, // HTML format (a tree of nested objects).
38  };
39  Printer();
40  ~Printer();
41 
43  void SetFormat(Format format) { format_ = format; }
44  Format GetFormat() const { return format_; }
45 
48  void EnableFullShapePrinting(bool enable) {
50  }
53  }
54 
57  void EnableAddressPrinting(bool enable) {
59  }
60  bool IsAddressPrintingEnabled() const {
62  }
63 
65  void PrintScene(const gfx::NodePtr& node, std::ostream& out); // NOLINT
66 
67  private:
68  Format format_;
71 };
72 
73 } // namespace gfxutils
74 } // namespace ion
75 
76 #endif // ION_GFXUTILS_PRINTER_H_
void EnableFullShapePrinting(bool enable)
Sets/returns a flag indicating whether shape contents should be written.
Definition: printer.h:48
bool IsFullShapePrintingEnabled() const
Definition: printer.h:51
Format GetFormat() const
Definition: printer.h:44
bool full_shape_printing_enabled_
Definition: printer.cc:640
Format
Available output formats.
Definition: printer.h:35
void SetFormat(Format format)
Sets/returns the printed format. The default is kText.
Definition: printer.h:43
bool IsAddressPrintingEnabled() const
Definition: printer.h:60
void EnableAddressPrinting(bool enable)
Sets/returns a flag indicating whether the addresses of objects should be written.
Definition: printer.h:57
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
Definition: sharedptr.h:60
bool address_printing_enabled_
Definition: printer.cc:639
The Printer class can be used for debugging.
Definition: printer.h:31