Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Quorum/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.4 2005/01/21 19:44:17 mmarsh Exp $
00008 //
00009 // $Log: Message.h,v $
00010 // Revision 1.4  2005/01/21 19:44:17  mmarsh
00011 // Updated for compatibility with Doxygen 1.4.1
00012 //
00013 // Revision 1.3  2004/05/19 15:56:55  mmarsh
00014 // *** empty log message ***
00015 //
00016 // Revision 1.2  2003/11/04 22:31:50  mmarsh
00017 // *** empty log message ***
00018 //
00019 //
00020 
00021 #ifndef __CODEX_QUORUM_MESSAGE_H__
00022 #define __CODEX_QUORUM_MESSAGE_H__
00023 
00024 #include <vector>
00025 #include <string>
00026 
00027 using namespace std;
00028 
00029 namespace CODEX_Quorum
00030 {
00035    class Message
00036    {
00037       public :
00039          typedef vector<unsigned char> BufferType;
00040 
00042          Message();
00044          Message( const BufferType& buff );
00046          Message( const string& aString );
00048          Message( const unsigned char* buff, int len );
00050          Message( const Message& aMessage );
00051 
00053          void fill( const Message& aMessage );
00055          void fill( const BufferType& buff );
00057          void fill( const string& aString );
00059          void fill( const unsigned char* buff, int len );
00061          void fill( unsigned char a );
00062 
00064          const unsigned char* buffer() const;
00066          unsigned int         length() const;
00068          string               messageString() const;
00069 
00070       private :
00071          BufferType m_buffer;
00072    };
00073 
00075    typedef Message Response;
00076 
00077 }
00078 
00079 #endif /* __CODEX_QUORUM_MESSAGE_H__ */

Generated on Fri May 6 17:39:59 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1