#include <RDBComment.h>
Public Member Functions | |
Constructing, destructing, and initializing RDBComment objects. | |
RDBComment (const string &comment="") throw ( RDBErr ) | |
Parses comment string for RDB comment structure. | |
RDBComment (const RDBComment &rdbcomment) | |
Copy RDBComment object. | |
~RDBComment (void) | |
Destructor has nothing to do. | |
const RDBComment & | operator= (const RDBComment &rdbcomment) |
Copy RDBComment object. | |
const RDBComment & | operator= (const string &rdbcomment) |
Copy string to RDBComment object. | |
Data member initializers. | |
void | setComment (const string &comment) throw ( RDBErr ) |
Parses comment string for RDB comment elements. | |
void | setCommentText (const string &comment) |
Parses string for RDB comment elements. | |
void | setKeyword (const string &keyword) throw ( RDBErr ) |
Set just the comment keyword. | |
void | setValue (const string &value) throw ( RDBErr ) |
Set just the comment value. | |
Data member accessors. | |
string | getComment (void) const |
Return the full comment. | |
string | getCommentText (void) const |
Return the full comment text. | |
string | getKeyword (void) const |
Return the keyword, if any. | |
string | getValue (void) const |
Return the keyword's value, if any. | |
Friends | |
Stream insertion and extraction operators. | |
istream & | operator>> (istream &is, RDBComment &rdbcomment) throw ( RDBErr ) |
Read comment from input stream. | |
ostream & | operator<< (ostream &os, const RDBComment &rdbcomment) |
Write comment to output stream. |
Definition at line 35 of file RDBComment.h.
RDBComment::RDBComment | ( | const string & | comment = "" |
) | throw ( RDBErr ) |
Parses comment string for RDB comment structure.
comment | the comment string. |
Definition at line 102 of file RDBComment.cc.
RDBComment::RDBComment | ( | const RDBComment & | rdbcomment | ) |
Copy RDBComment object.
rdbcomment | a reference to the RDBComment to copy. |
Definition at line 125 of file RDBComment.cc.
References operator=().
RDBComment::~RDBComment | ( | void | ) |
const RDBComment & RDBComment::operator= | ( | const RDBComment & | rdbcomment | ) |
Copy RDBComment object.
rdbcomment | a reference to the RDBComment to copy. |
Definition at line 150 of file RDBComment.cc.
References _comment, _keyword, and _value.
Referenced by RDBComment().
const RDBComment & RDBComment::operator= | ( | const string & | comment | ) |
Copy string to RDBComment object.
comment | a string comment to copy. |
Definition at line 172 of file RDBComment.cc.
References setCommentText().
void RDBComment::setComment | ( | const string & | comment | ) | throw ( RDBErr ) |
Parses comment string for RDB comment elements.
comment | Strips leading '#' character if present. If next character is ':', then it searches for a keyword=value pair. |
Definition at line 190 of file RDBComment.cc.
References setCommentText().
Referenced by setKeyword(), and setValue().
void RDBComment::setCommentText | ( | const string & | comment | ) |
Parses string for RDB comment elements.
comment | Strips leading '#' character if present. If next character is ':', then it searches for a keyword=value pair. |
Definition at line 222 of file RDBComment.cc.
Referenced by operator=(), and setComment().
void RDBComment::setKeyword | ( | const string & | keyword | ) | throw ( RDBErr ) |
Set just the comment keyword.
keyword | the keyword part of a keyword=value pair. |
Definition at line 278 of file RDBComment.cc.
References setComment().
void RDBComment::setValue | ( | const string & | value | ) | throw ( RDBErr ) |
Set just the comment value.
value | the value part of a keyword=value pair. |
Definition at line 302 of file RDBComment.cc.
References setComment().
string RDBComment::getComment | ( | void | ) | const |
string RDBComment::getCommentText | ( | void | ) | const |
Return the full comment text.
Definition at line 346 of file RDBComment.cc.
string RDBComment::getKeyword | ( | void | ) | const |
Return the keyword, if any.
Definition at line 359 of file RDBComment.cc.
string RDBComment::getValue | ( | void | ) | const |
Return the keyword's value, if any.
Definition at line 372 of file RDBComment.cc.
istream& operator>> | ( | istream & | is, | |
RDBComment & | rdbcomment | |||
) | throw ( RDBErr ) [friend] |
Read comment from input stream.
is | the input stream. | |
rdbcomment | the comment to fill. |
Definition at line 38 of file RDBComment.cc.
ostream& operator<< | ( | ostream & | os, | |
const RDBComment & | rdbcomment | |||
) | [friend] |
Write comment to output stream.
os | the output stream. | |
rdbcomment | the comment to print. |
Definition at line 73 of file RDBComment.cc.