From 42d82f8b45acc981e8a6bb4c718b2f0428dfa1cf Mon Sep 17 00:00:00 2001
From: whh8b <whh8b@git.zephyr-software.com>
Date: Sat, 30 Jan 2016 05:46:33 +0000
Subject: [PATCH] Update comments on the functionality of the dollop manager.

---
 include/dollop_man.h | 61 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/include/dollop_man.h b/include/dollop_man.h
index bdd55b5..fd45722 100644
--- a/include/dollop_man.h
+++ b/include/dollop_man.h
@@ -38,24 +38,75 @@ class DollopManager_t {
 	public:
 		DollopManager_t() {};
 
-		virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head) = 0;
-		virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start) = 0;
-		virtual size_t Size() = 0;
+		/*
+		 * Add a dollop and all its fallthrough dollops
+		 * to the dollop manager.
+		 */
+		virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head)=0;
+		/*
+		 * Create new dollops from a particular start instruction.
+		 */
+		virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start)=0;
 
-		virtual Zipr_SDK::Dollop_t *GetContainingDollop(libIRDB::Instruction_t *insn) = 0;
+		/*
+		 * Return the number of dollops under management.
+		 */
+		virtual size_t Size()=0;
 
+		/*
+		 * Return the dollop containing an instruction.
+		 */
+		virtual Zipr_SDK::Dollop_t *GetContainingDollop(
+			libIRDB::Instruction_t *insn)=0;
+
+		/*
+		 * Add a dollop patch to the dollop manager.
+		 */
 		virtual void AddDollopPatch(Zipr_SDK::DollopPatch_t *new_patch) = 0;
-		virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop(Zipr_SDK::Dollop_t *target) = 0;
+		/*
+		 * Return all the patches that point to a particular
+		 * dollop.
+		 */
+		virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop(
+			Zipr_SDK::Dollop_t *target)=0;
 
+		/*
+		 * Update the dollops under management based on the
+		 * targetted dollops in a particular dollop.
+		 */
 		virtual bool UpdateTargets(Zipr_SDK::Dollop_t *) = 0;
+		/*
+		 * Update all the dollops under management based on
+		 * all the dollops of which the manager knows.
+		 */
 		virtual void UpdateAllTargets() = 0;
 
+		/*
+		 * Return beginning and ending iterators for all the
+		 * dollops under management.
+		 */
 		virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_begin() = 0;
 		virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_end() = 0;
 
+		/*
+		 * Print (for debugging) all the dollop patches
+		 * under management.
+		 */
 		virtual void PrintDollopPatches(const std::ostream &) = 0;
+		/*
+		 * print (for debugging) information about the dollop
+		 * manager.
+		 */
 		friend std::ostream &operator<<(std::ostream &out, const DollopManager_t &dollop_man);
+		/*
+		 * Print (useful output for end user) information about
+		 * statistics of the dollop manager and the job it is
+		 * doing.
+		 */
 		virtual void PrintStats(std::ostream &out) = 0;
+		/*
+		 * Generate a placement map file for all the dollops under management.
+		 */
 		virtual void PrintPlacementMap(const Zipr_SDK::MemorySpace_t &memory_space,
 		                       const std::string &map_filename) = 0;
 };
-- 
GitLab