Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
oimstream.hpp
00001 /* $Id:$ */
00002 #ifndef _IMAGE_OIMSTREAM_HPP_
00003 #define _IMAGE_OIMSTREAM_HPP_
00004 
00005 #include "image/Image.hpp"
00006 
00007 namespace jafar {
00008 namespace image {
00009 
00010 struct endl_ {};
00011 struct vsep_ {};
00012 struct hsep_ {};
00013 struct flush_ {};
00014 struct clear_ {};
00015 
00016 extern endl_ endl; 
00017 extern vsep_ vsep; 
00018 extern hsep_ hsep; 
00019 extern flush_ flush; 
00020 extern clear_ clear; 
00021 
00022 class oimstream
00023 {
00024   protected:
00025     image::Image image;
00026     int width, height;
00027     int cursorx, cursory;
00028   protected:
00029     void endl_fun();
00030     void enlargeImage(int width_factor, int height_factor);
00031     void makeRoomFor(int pwidth, int pheight);
00032     void updateCursorsFor(int pwidth, int pheight);
00033   protected:
00034     virtual void flush_fun() = 0;
00035   public:
00036     oimstream():image(128,128,8,JfrImage_CS_GRAY) {}
00037     virtual ~oimstream() {}
00038     
00039     friend oimstream& operator<<(oimstream& os, const image::Image &im);
00040     friend oimstream& operator<<(oimstream& os, const endl_ &end);
00041     friend oimstream& operator<<(oimstream& os, const vsep_ &end);
00042     friend oimstream& operator<<(oimstream& os, const hsep_ &end);
00043     friend oimstream& operator<<(oimstream& os, const flush_ &end);
00044     friend oimstream& operator<<(oimstream& os, const clear_ &end);
00045     
00046     void setBackgroundColor();// TODO
00047     void setSeparatorColor();// TODO
00048 };
00049 
00050 }}
00051 
00052 
00053 #endif
00054 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:21 for Jafar by doxygen 1.7.6.1
LAAS-CNRS