degate  0.1.2
Public Member Functions | Protected Member Functions
degate::Exporter Class Reference

This is the base class for exporter classes. More...

#include <Exporter.h>

Inheritance diagram for degate::Exporter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Exporter ()
 The ctor for an exporter object.
virtual ~Exporter ()
 The dtor for an exporter object.

Protected Member Functions

template<typename T >
std::string number_to_string (T num)
 Convert a number type to a human readable string.
std::string to_color_string (color_t col) const
 Convert a RGBA color value into the common format of "#%2x%2x%2x%2x".

Detailed Description

This is the base class for exporter classes.

Definition at line 36 of file Exporter.h.


Constructor & Destructor Documentation

The ctor for an exporter object.

Definition at line 67 of file Exporter.h.

{};
virtual degate::Exporter::~Exporter ( ) [inline, virtual]

The dtor for an exporter object.

Definition at line 72 of file Exporter.h.

{};

Member Function Documentation

template<typename T >
std::string degate::Exporter::number_to_string ( num) [inline, protected]

Convert a number type to a human readable string.

Definition at line 43 of file Exporter.h.

                                                           {
      std::ostringstream stm;
      stm << num;
      return stm.str();
    }
std::string degate::Exporter::to_color_string ( color_t  col) const [inline, protected]

Convert a RGBA color value into the common format of "#%2x%2x%2x%2x".

Definition at line 52 of file Exporter.h.

References MASK_A, MASK_B, MASK_G, and MASK_R.

                                                 {
      char buf[100];
      snprintf(buf, sizeof(buf), "#%02X%02X%02X%02X",
               MASK_R(col),
               MASK_G(col),
               MASK_B(col),
               MASK_A(col));
      return std::string(buf);
    }

The documentation for this class was generated from the following file: