Source: OmCommentCollector.h


Annotated List
Files
Globals
Hierarchy
Index
#ifndef OM_COMMENT_COLLECTOR_H
#define OM_COMMENT_COLLECTOR_H

/**
 * The comment collector utility.
 *
 * This class provides features to collect comments during a reading.
 * Not this is complementary of the OmNode::resurrect method since
 * comments can be scattered anywhere among parsable objects.
 */
class OmCommentCollector
{
private:
  typedef vector<OmComment *> comments_t;

public:
  /**
   * Destructor.
   */
  ~OmCommentCollector();
  
  /**
   * Read comments from an input until there is no more.
   * Store them as objects sequentially at the end of the collection.
   */
  void collect(OmInputDevice & input_in);
  
  /**
   * Transfer the collected comments to a node.
   * The collection becomes empty, and comments are appended to the list of comments of the node.
   * @li Precondition: ~ NullPointer(node_in)
   */
  OmNode * uncollect(OmNode * node_in);
  
private:
  comments_t comments_;
};

#endif // OM_COMMENT_COLLECTOR_H

Generated by: root@localhost.localdomain on Tue Oct 12 21:02:30 199.