00001 // ---------------------------------------------------------------------------- 00002 // 00003 // $Id$ 00004 // 00005 // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno 00006 // 00007 // This file is part of MIP. 00008 // 00009 // MIP is free software: you can redistribute it and/or modify 00010 // it under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation, either version 3 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // MIP is distributed in the hope that it will be useful, 00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 // GNU General Public License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>. 00021 // 00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it 00023 // 00024 // ---------------------------------------------------------------------------- 00025 00026 00032 00036 00038 /* @{ */ 00039 00040 #ifndef __FIFO_SEND_H 00041 #define __FIFO_SEND_H 00042 00043 #ifdef MIP_HOST_APPLE 00044 #include <applePatch.h> 00045 #include <sys/types.h> 00046 #include <sys/stat.h> 00047 #endif 00048 00049 #include <stdio.h> 00050 #include <fcntl.h> 00051 #include <unistd.h> 00052 #include <stdlib.h> 00053 #include <signal.h> 00054 #include <assert.h> 00055 #include <string> 00056 #include <cstring> 00057 00058 #include "FifoStructs.h" 00059 00060 using namespace std; 00061 00064 class FifoSend { 00065 00066 private: 00067 string _name; 00068 int _fd; 00069 00070 public: 00071 00073 FifoSend(string name); 00074 00075 ~FifoSend(); 00076 00079 void send(string message); 00080 00081 }; 00082 00083 #endif 00084 00085 00086 /* @}*/