RDBComment.h
00001 #ifndef RDBComment_h
00002 #define RDBComment_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <iostream>
00029 #include <string>
00030 #include <rdbxx/RDBErr.h>
00031
00032 using namespace std;
00033
00035 class RDBComment {
00037
00038
00039 friend istream& operator>>( istream& is, RDBComment& rdbcomment ) throw ( RDBErr );
00041 friend ostream& operator<<( ostream& os, const RDBComment& rdbcomment );
00043
00044 public:
00046
00047
00048 RDBComment( const string& comment="" ) throw ( RDBErr );
00050 RDBComment( const RDBComment& rdbcomment );
00052 ~RDBComment( void );
00053
00055 const RDBComment& operator=( const RDBComment& rdbcomment );
00057 const RDBComment& operator=( const string& rdbcomment );
00059
00061
00062
00063 void setComment( const string& comment ) throw ( RDBErr );
00065 void setCommentText( const string& comment );
00067 void setKeyword( const string& keyword ) throw ( RDBErr );
00069 void setValue( const string& value ) throw ( RDBErr );
00071
00073
00074
00075 string getComment( void ) const;
00077 string getCommentText( void ) const;
00079 string getKeyword( void ) const;
00081 string getValue( void ) const;
00083
00084 private:
00086 string _comment;
00088 string _keyword;
00090 string _value;
00091
00092 };
00093
00094 #endif