polaroid-pp

Schlieren and contour plot tool
git clone https://git.0xfab.ch/polaroid-pp.git
Log | Files | Refs | Submodules | README | LICENSE

PhotoPaper.h (1170B)


      1 // File       : PhotoPaper.h
      2 // Date       : Tue Apr 26 14:45:19 2016
      3 // Author     : Fabian Wermelinger
      4 // Description: Photo Paper Base
      5 // Copyright 2016 ETH Zurich. All Rights Reserved.
      6 #ifndef PHOTOPAPER_H_B0K8P9TO
      7 #define PHOTOPAPER_H_B0K8P9TO
      8 
      9 #include <string>
     10 #include "Types.h"
     11 
     12 class PhotoPaper
     13 {
     14 protected:
     15     int m_width, m_height;
     16     std::string m_fname;
     17     std::string m_description;
     18 
     19 public:
     20     PhotoPaper(const int width, const int height, const std::string& name) : m_width(width), m_height(height), m_fname(name), m_description("data") {};
     21     virtual ~PhotoPaper() {};
     22 
     23     virtual void make_new(const std::string name, const int width=1, const int height=0) = 0;
     24     virtual void resize(const int width, const int height=0) = 0;
     25     virtual void write() = 0;
     26     virtual void set_pixel(const double phi, const int x, const int y=0) = 0;
     27     virtual std::string suffix() const = 0;
     28     virtual void set_description(const char* const desc) { m_description = std::string(desc); }
     29     inline void set_name(const std::string& name) { m_fname = name; }
     30     inline std::string get_name() const { return m_fname; }
     31 };
     32 
     33 #endif /* PHOTOPAPER_H_B0K8P9TO */