|
rdbxx
1.0.10
|
Provides interface for manipulating RDB comments. More...
#include <RDBComment.h>
Public Member Functions | |
Constructing, destructing, and initializing RDBComment objects. | |
| RDBComment (const std::string &comment="") | |
| Parses comment string for RDB comment structure. More... | |
| RDBComment (const RDBComment &rdbcomment) | |
| Copy RDBComment object. More... | |
| ~RDBComment (void) | |
| Destructor has nothing to do. More... | |
| const RDBComment & | operator= (const RDBComment &rdbcomment) |
| Copy RDBComment object. More... | |
| const RDBComment & | operator= (const std::string &rdbcomment) |
| Copy string to RDBComment object. More... | |
Data member initializers. | |
| void | setComment (const std::string &comment) |
| Parses comment string for RDB comment elements. More... | |
| void | setCommentText (const std::string &comment) |
| Parses string for RDB comment elements. More... | |
| void | setKeyword (const std::string &keyword) |
| Set just the comment keyword. More... | |
| void | setValue (const std::string &value) |
| Set just the comment value. More... | |
Data member accessors. | |
| std::string | getComment (void) const |
| Return the full comment. More... | |
| std::string | getCommentText (void) const |
| Return the full comment text. More... | |
| std::string | getKeyword (void) const |
| Return the keyword, if any. More... | |
| std::string | getValue (void) const |
| Return the keyword's value, if any. More... | |
Friends | |
Stream insertion and extraction operators. | |
| std::istream & | operator>> (std::istream &is, RDBComment &rdbcomment) |
| Read comment from input stream. More... | |
| std::ostream & | operator<< (std::ostream &os, const RDBComment &rdbcomment) |
| Write comment to output stream. More... | |
Provides interface for manipulating RDB comments.
Definition at line 33 of file RDBComment.h.
| RDBComment::RDBComment | ( | const std::string & | comment = "" | ) |
Parses comment string for RDB comment structure.
| comment | the comment string. |
Assigns the string comment to the RDBComment's data member. Parses for keyword=value pairs.
Definition at line 102 of file RDBComment.cc.
| RDBComment::RDBComment | ( | const RDBComment & | rdbcomment | ) |
Copy RDBComment object.
| rdbcomment | a reference to the RDBComment to copy. |
Copies the RDBComment into this object.
Definition at line 125 of file RDBComment.cc.
| RDBComment::~RDBComment | ( | void | ) |
| std::string RDBComment::getComment | ( | void | ) | const |
| std::string RDBComment::getCommentText | ( | void | ) | const |
Return the full comment text.
Definition at line 349 of file RDBComment.cc.
| std::string RDBComment::getKeyword | ( | void | ) | const |
Return the keyword, if any.
Definition at line 362 of file RDBComment.cc.
| std::string RDBComment::getValue | ( | void | ) | const |
Return the keyword's value, if any.
Definition at line 375 of file RDBComment.cc.
| 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.
| const RDBComment & RDBComment::operator= | ( | const std::string & | comment | ) |
Copy string to RDBComment object.
| comment | a string comment to copy. |
Definition at line 172 of file RDBComment.cc.
| void RDBComment::setComment | ( | const std::string & | comment | ) |
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.
| void RDBComment::setCommentText | ( | const std::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.
| void RDBComment::setKeyword | ( | const std::string & | keyword | ) |
Set just the comment keyword.
| keyword | the keyword part of a keyword=value pair. |
Updates just the keyword half of a keyword=value pair.
Definition at line 281 of file RDBComment.cc.
| void RDBComment::setValue | ( | const std::string & | value | ) |
Set just the comment value.
| value | the value part of a keyword=value pair. |
Updates just the value half of a keyword=value pair.
Definition at line 305 of file RDBComment.cc.
|
friend |
Write comment to output stream.
| os | the output stream. |
| rdbcomment | the comment to print. |
Places the comment on the output stream. Appends a '#' character if its a plain comment or a "#:" string if its a keyword/value comment.
Definition at line 73 of file RDBComment.cc.
|
friend |
Read comment from input stream.
| is | the input stream. |
| rdbcomment | the comment to fill. |
If the line is an RDB comment line, i.e. it starts with a '#', then fill the comment. Otherwise, set ios::failbit.
Definition at line 38 of file RDBComment.cc.