/*************************************************************************** * * Linux IPC Message Queue * ************************************************************************/ class MQException: public exception { public: MQException(const string &message) throw(); ~MQException() throw(); const char *what() const throw() { return (MQmessage.c_str()); }; private: string MQmessage; }; class MsgQueue { int qid; public: MsgQueue() throw (MQException); MsgQueue(string &name, long mtype = 0, int flag = 0) throw (MQException); int getId() { return qid; } string read(long mtype = 0, int mode = 0) throw (MQException); void write(string &message, long mtype = 1) throw (MQException); };