Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/pauldt/projects/IDEA/IDEA-ALL/IDEA-DEV/Core/Agent/Includes/Message.hh

Go to the documentation of this file.
00001 // -*- Mode: c++ -*-
00002 //     File: $Source: /home/cvs/ISG-Repository/IDEA-DEV/Core/Agent/Includes/Message.hh,v $
00003 //      Tag: $Name: DR_01_11_06 $
00004 //      CVS: $Id: Message.hh,v 1.4 2005/12/30 22:05:32 rijsman Exp $
00005 //     Info: $CVSROOT/IDEA-DEV/COPYRIGHT
00006 
00007 #ifndef _HEADER_MESSAGE_HEADER_
00008 #define _HEADER_MESSAGE_HEADER_
00009 
00010 #include "ProtoType.hh"
00011 #include "TimeBasics.hh"
00012 #include "Utilities.hh"
00013 
00014 namespace IDEA
00015 {
00016   class MessageData;
00017 
00030   class Message:
00031     public Prototype
00032   {
00033     friend class MessageHandle;
00034   public:
00035     // do not mess with the numbers assigned unless you can guarentee that each combination of enumerations using the 
00036     // bitwise operator OR ( | ) generates a unique number (this is used by the MessageObserver)
00037     typedef enum 
00038       {
00039         UNDEFINED = 0,
00040         START = 2,
00041         STOP = 4, 
00042         VALUE = 8, 
00043         STATUS = 16, 
00044         TELEMETRY = 32, 
00045         OBJECT = 64, 
00046         USERDEFINED = 128 
00047       } Type;
00048 
00049     typedef std::list< Message*> MessageList;
00050 
00054     Message( const Time& time, const MessageData* data );
00058     Message( const Time& time, const MessageData& data );
00064     virtual ~Message();
00065 
00069     virtual Message* clone() const;
00070   protected:
00071     MessageData* getData() const 
00072     { 
00073       return m_Data; 
00074     }
00081     const Time& getTime() const 
00082     { 
00083       return m_Time; 
00084     }
00088     const Message::Type& getType() const;
00089   private:
00093     Message();
00097     Message( const Message& );
00101     const Message& operator=(const Message& other);
00102 
00103     Time m_Time; 
00104     MessageData* m_Data;
00105   };
00106 
00107 
00108   typedef std::list< MessageData* > MessageDataList;
00109 
00110   std::ostream& operator<< ( std::ostream& os, const Message::Type& type );
00111 
00112 } //namespace IDEA
00113 
00114 #endif //_HEADER_MESSAGE_HEADER_
00115 

Contact information
© IDEA
Generated on Fri Feb 3 17:09:40 2006 for IDEA.