From 3023c584cda6fcaeda0004d7085ac0f0642b9e1d Mon Sep 17 00:00:00 2001
From: Adam Wardynski <award@.(win7-laptop)>
Date: Mon, 9 May 2011 10:53:20 +0200
Subject: [PATCH] Some rough comments to WcclFile header.

---
 libwccl/wcclfile.h | 37 +++++++++++++++++++++++++++++--------
 1 file changed, 29 insertions(+), 8 deletions(-)

diff --git a/libwccl/wcclfile.h b/libwccl/wcclfile.h
index 7d24197..f14816b 100644
--- a/libwccl/wcclfile.h
+++ b/libwccl/wcclfile.h
@@ -15,6 +15,12 @@
 
 namespace Wccl {
 
+/**
+ * Class representing contents of parsed WCCL files
+ * - imported lexicons, any typed and untyped named
+ * operator sections, up to one tag rules section,
+ * and up to one match rules section.
+ */
 class WcclFile
 	: WcclFileOpSections<UntypedOpSequence>,
 	  WcclFileOpSections<OpSequence<StrSet> >,
@@ -26,6 +32,9 @@ class WcclFile
 public:
 	WcclFile(const Corpus2::Tagset& tagset, const std::string& search_path);
 
+	//
+	// Untyped and typed operator sections: @X:"sectioname" ( op1; op2 )
+	//
 	const std::vector<boost::shared_ptr<UntypedOpSequence> >& untyped_sections();
 	template<class T>
 	const typename std::vector<boost::shared_ptr<OpSequence<T> > >& sections();
@@ -76,14 +85,6 @@ public:
 	FunctionalOpSequence::name_op_v_t gen_all_op_pairs();
 	FunctionalOpSequence::name_op_v_c_t gen_all_op_pairs() const;
 
-	void import_lexicon(const boost::shared_ptr<Lexicon>& lexicon);
-	bool has_lexicon(const std::string& name) const;
-	bool has_lexicons() const;
-	boost::shared_ptr<const Lexicon> get_lexicon_ptr(const std::string& name) const;
-	const Lexicon& get_lexicon(const std::string& name) const;
-	boost::shared_ptr<const Lexicons> get_lexicons_ptr() const;
-	const Lexicons& get_lexicons() const;
-
 	void add_untyped_section(const boost::shared_ptr<UntypedOpSequence>& section);
 	void add_untyped_section(const boost::shared_ptr<const UntypedOpSequence>& section);
 	void add_untyped_section(const UntypedOpSequence& section);
@@ -94,6 +95,20 @@ public:
 	template<class T>
 	void add_section(const OpSequence<T>& section);
 
+	//
+	// Lexicons, import sections: import("path", "name")
+	//
+	void import_lexicon(const boost::shared_ptr<Lexicon>& lexicon);
+	bool has_lexicon(const std::string& name) const;
+	bool has_lexicons() const;
+	boost::shared_ptr<const Lexicon> get_lexicon_ptr(const std::string& name) const;
+	const Lexicon& get_lexicon(const std::string& name) const;
+	boost::shared_ptr<const Lexicons> get_lexicons_ptr() const;
+	const Lexicons& get_lexicons() const;
+
+	//
+	// Tag rules section: tag_rules ( rule1; rule2 )
+	// 
 	bool has_tag_rules() const;
 
 	void set_tag_rules(const boost::shared_ptr<TagRuleSequence>& tag_rules);
@@ -102,10 +117,16 @@ public:
 	boost::shared_ptr<TagRuleSequence> get_tag_rules_ptr();
 	boost::shared_ptr<const TagRuleSequence> get_tag_rules_ptr() const;
 
+	//
+	// Match rules section: match_rules ( apply1; apply2 )
+	//
 	bool has_match_rules() const;
 	void add_match_rule(const boost::shared_ptr<MatchRule>& match_rule);
 	const std::vector<boost::shared_ptr<MatchRule> >& get_match_rules();
 
+	//
+	// Miscelaneous
+	//
 	friend std::ostream& operator<<(std::ostream& ostream, const WcclFile& wccl_file);
 	std::string to_string() const;
 
-- 
GitLab