Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Message.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: Message.h,v 1.3 2004/05/19 15:56:55 mmarsh Exp $
00008 //
00009 // $Log: Message.h,v $
00010 // Revision 1.3  2004/05/19 15:56:55  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:50  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_QUORUM_MESSAGE_H__
00019 #define __CODEX_QUORUM_MESSAGE_H__
00020 
00021 #include <vector>
00022 #include <string>
00023 
00024 using namespace std;
00025 
00026 namespace CODEX_Quorum
00027 {
00032    class Message
00033    {
00034       public :
00036          typedef vector<unsigned char> BufferType;
00037 
00039          Message();
00041          Message( const BufferType& buff );
00043          Message( const string& aString );
00045          Message( const unsigned char* buff, int len );
00047          Message( const Message& aMessage );
00048 
00050          void fill( const Message& aMessage );
00052          void fill( const BufferType& buff );
00054          void fill( const string& aString );
00056          void fill( const unsigned char* buff, int len );
00058          void fill( unsigned char a );
00059 
00061          const unsigned char* buffer() const;
00063          unsigned int         length() const;
00065          string               messageString() const;
00066 
00067       private :
00068          BufferType m_buffer;
00069    };
00070 
00072    typedef Message Response;
00073 
00074 }
00075 
00076 #endif /* __CODEX_QUORUM_MESSAGE_H__ */

Generated on Wed Jun 2 16:32:55 2004 for COrnell Data EXchange (CODEX) by doxygen1.2.18