Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

POGroupMsg.h

Go to the documentation of this file.
00001 //=============================================================================
00002 // POGroupMsg.h
00005 //
00006 // Created 9/16/03 By Daniel Larimer
00007 //=============================================================================
00008 #ifndef _POGROUPMSG_H_
00009 #define _POGROUPMSG_H_
00010 #include<POMessage.h>
00011 #include<string>
00012 using namespace std;
00013 
00014 
00015 class PEXPR_API POGroupMsg : public POMessage
00016 {
00017     public:
00018         enum COMMAND{JOIN, LEAVE, ADD, REMOVE};
00019         POGroupMsg( int cmd = JOIN );
00020         POGroupMsg( const POAddress& add_address, int add_rem = ADD );
00021         POGroupMsg( const POGroupMsg& cpy );
00022         virtual ~POGroupMsg();
00023         virtual string messageType()const { return "POGroupMsg"; };
00024 
00025         int     getCommand()const       { return m_cmd.val(); }
00026         void    setCommand( int cmd )   { m_cmd = cmd;        }
00027 
00030         POAddress getAddress()const                  { return m_adr; }
00032         void      setAddress( const POAddress& adr ) { m_adr = adr;  }
00033 
00034         virtual POMessage* clone()const;
00035 
00036         //==========================
00037         // Packable
00038         //==========================
00039         int packsize()const;
00040         int pack( char* buf )const;
00041         int unpack( char* buf );
00042 
00043     private:
00044         POInt       m_cmd;
00045         POAddress   m_adr;
00046 };
00047 
00048 #endif

Generated on Tue Jun 15 12:49:28 2004 for pexpr by doxygen 1.3.4