00001 00021 #ifndef URBI_USYSTEM_HH 00022 # define URBI_USYSTEM_HH 00023 00024 # include <string> 00025 # include <list> 00026 # include <algorithm> 00027 00028 # include "libport/singleton-ptr.hh" 00029 # include "libport/ufloat.h" 00030 # include "libport/hash.hh" 00031 00032 # include "urbi/utypes-common.hh" 00033 00034 namespace urbi 00035 { 00037 enum USystemChannel { 00038 NEW_CHANNEL 00039 }; 00040 00044 class USystemMessage 00045 { 00046 public: 00047 00048 USystemMessage(); 00049 virtual ~USystemMessage(); 00050 }; 00051 00055 class UStringSystemMessage : public USystemMessage 00056 { 00057 public: 00058 00059 UStringSystemMessage(const std::string &s); 00060 virtual ~UStringSystemMessage(); 00061 00063 const std::string& getMessage () const; 00064 00065 private: 00066 std::string msg; 00067 }; 00068 00069 00079 class USystem 00080 { 00081 public: 00082 00083 USystem(); 00084 virtual ~USystem(); 00085 00087 void register_channel(const USystemChannel &channel); 00088 00109 virtual int receive_message (const USystemChannel &channel, 00110 const USystemMessage &message); 00111 }; 00112 00113 } // end namespace urbi 00114 00115 #endif // ! URBI_UOBJECT_HH 00116