BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
0fee1b0
Branches
Tags
master
Blinker
src
noarch
Canvas.h
implemented specialized setting files for different data types, simplified input/output stream handling in modules
Stefan Schuermans
commited
0fee1b0
at 2011-12-04 20:46:14
Canvas.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef CANVAS_H #define CANVAS_H #include <list> #include <string> #include <BlinkenLib/BlinkenFrame.h> #include "CallMgr.h" #include "Directory.h" #include "File.h" #include "Format.h" #include "FormatFile.h" #include "Module.h" #include "OutStreamFile.h" #include "StreamMgr.h" namespace Blinker { /// a canvas to merge and split streams class Canvas: public Module { protected: /// input to canvas class Input; /// input list entry struct InEntry { std::string m_name; ///< name of input list entry Input *m_pInput; ///< input object InEntry(const std::string &name); ///< constructor }; /// input list typedef std::list<InEntry> InList; public: /** * @brief constructor * @param[in] callMgr callback manager * @param[in] streamMgr stream manager * @param[in] dirBase base directory */ Canvas(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); /// virtual destructor virtual ~Canvas(); private: /// copy constructor disabled Canvas(const Canvas &that); /// assignment operator disabled const Canvas & operator=(const Canvas &that); public: /// check for update of configuration virtual void updateConfig(); protected: /// (re-)create canvas void createCanvas(); /// tear down canvas void destroyCanvas(); /// light update of input list, i.e. check all entries in current input list void updateInListLight(); /// full update of input list, i.e. scan subdirs in input list directory void updateInListFull(); /// notfication to redraw (called by inputs) void redraw(); /// send current frame to output stream void sendFrame(); protected: FormatFile m_fileFormat; ///< canvas format file Directory m_dirInputs; ///< input stream directory OutStreamFile m_fileOutStream; ///< output stream name file stBlinkenFrame *m_pCanvas; ///< canvas to put streams on bool m_canvasHasFrame; ///< if there is >= 1 frame on canvas InList m_inList; ///< current input list }; // class Canvas } // namespace Blinker #endif // #ifndef CANVAS_H