BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
f0c104c
Branches
Tags
master
Blinker
src
noarch
SenderDest.h
implemented specialized setting files for different data types, simplified input/output stream handling in modules
Stefan Schuermans
commited
f0c104c
at 2011-12-04 20:10:37
SenderDest.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 SENDERDEST_H #define SENDERDEST_H #include <string> #include "Directory.h" #include "File.h" #include "Module.h" #include "Sender.h" #include "SettingFile.h" namespace Blinker { /// static destination of a stream sender template<typename ADDR, typename SOCK> class Sender<ADDR, SOCK>::Dest { public: /** * @brief constructor * @param[in] sender owning sender object * @param[in] dirBase base directory * @param[in] pNoFrameData protocol data for "no frame" packet * (empty if unknown) */ Dest(Sender &sender, const Directory &dirBase, const std::string *pNoFrameData); /// destructor ~Dest(); private: /// copy constructor disabled Dest(const Dest &that); /// assignment operator disabled const Dest & operator=(const Dest &that); public: /// check for update of configuration void updateConfig(); /** * @brief set current protocol data * @param[in] pData protocol data to send to address (empty if unkown) */ void setProtoData(const std::string *pData); protected: /// (re-)get address void getAddr(); /** * @brief send protocol data to address * @param[in] pData protocol data to send to address (empty if unknown) */ void send(const std::string *pData); protected: Sender &m_sender; ///< owning sender object AddrFile m_fileAddr; ///< address file const std::string *m_pNoFrameData; ///< protocol data for "no frame" packet const std::string *m_pData; ///< protocol data to send to address }; // class Sender<ADDr, SOCK>::Dest } // namespace Blinker #endif // #ifndef SENDERDEST_H