rdbxx  1.0.7_02
RDBComment.h
1 #ifndef RDBComment_h
2 #define RDBComment_h
3 
4 /* --8<--8<--8<--8<--
5  *
6  * Copyright (C) 2006 Smithsonian Astrophysical Observatory
7  *
8  * This file is part of RDB
9  *
10  * RDB is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * RDB is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the
22  * Free Software Foundation, Inc.
23  * 51 Franklin Street, Fifth Floor
24  * Boston, MA 02110-1301, USA
25  *
26  * -->8-->8-->8-->8-- */
27 
28 #include <iostream>
29 #include <string>
30 #include <rdbxx/RDBErr.h>
31 
32 using namespace std;
33 
35 class RDBComment {
37 
38  friend istream& operator>>( istream& is, RDBComment& rdbcomment );
41  friend ostream& operator<<( ostream& os, const RDBComment& rdbcomment );
43 
44  public:
46 
47  RDBComment( const string& comment="" );
50  RDBComment( const RDBComment& rdbcomment );
52  ~RDBComment( void );
53 
55  const RDBComment& operator=( const RDBComment& rdbcomment );
57  const RDBComment& operator=( const string& rdbcomment );
59 
61 
62  void setComment( const string& comment );
65  void setCommentText( const string& comment );
67  void setKeyword( const string& keyword );
69  void setValue( const string& value );
71 
73 
74  string getComment( void ) const;
77  string getCommentText( void ) const;
79  string getKeyword( void ) const;
81  string getValue( void ) const;
83 
84 private:
86  string _comment;
88  string _keyword;
90  string _value;
91 
92 };
93 
94 #endif
Provides interface for manipulating RDB comments.
Definition: RDBComment.h:35