[Scummvm-cvs-logs] SF.net SVN: scummvm:[51839] tools/branches/gsoc2010-decompiler/decompiler

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Sat Aug 7 22:32:01 CEST 2010


Revision: 51839
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51839&view=rev
Author:   pidgeot
Date:     2010-08-07 20:32:00 +0000 (Sat, 07 Aug 2010)

Log Message:
-----------
DECOMPILER: Add missing Doxygen comments

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/codegen.h
    tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/graph.h
    tools/branches/gsoc2010-decompiler/decompiler/instruction.h
    tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h
    tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/codegen.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/codegen.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -152,8 +152,18 @@
 	 */
 	IntEntry(uint32 val, bool isSigned) : StackEntry(seInt), _val(val), _isSigned(isSigned) { }
 
+	/**
+	 * Gets the value associated with the IntEntry.
+	 *
+	 * @return The value associated with the IntEntry.
+	 */
 	int32 getValue();
 
+	/**
+	 * Returns whether or not the integer is signed.
+	 *
+	 * @return True if the value is signed, false if it's not.
+	 */
 	bool getSigned();
 
 	virtual std::ostream &print(std::ostream &output) const;
@@ -396,7 +406,7 @@
 	/**
 	 * Process a single character of metadata.
 	 *
-	 * @param it The instruction being processed.
+	 * @param inst The instruction being processed.
 	 * @param c The character signifying the action to be taken.
 	 */
 	virtual void processSpecialMetadata(const Instruction inst, char c);

Modified: tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -55,6 +55,11 @@
 	virtual void doDumpDisassembly(std::ostream &output);
 
 public:
+	/**
+	 * Constructor for Disassembler.
+	 *
+	 * @param insts Reference to the vector in which disassembled instructions should be placed.
+	 */
 	Disassembler(std::vector<Instruction> &insts);
 	virtual ~Disassembler() {}
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/graph.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/graph.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -206,7 +206,7 @@
 	/**
 	 * Constructor for CodeLine.
 	 *
-	 * @param s The line of code.
+	 * @param line The line of code.
 	 * @param unindentBefore Whether or not to remove an indentation level before the line. Defaults to false.
 	 * @param indentAfter Whether or not to add an indentation level after the line. Defaults to false.
 	 */

Modified: tools/branches/gsoc2010-decompiler/decompiler/instruction.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -107,6 +107,13 @@
 	std::vector<Parameter> _params; ///< Array of parameters used for the instruction.
 	std::string _codeGenData;       ///< String containing metadata for code generation. Start with 0xC0 to force custom handling. See the extended documentation for details.
 
+	/**
+	 * Operator overload to output a vector to a std::ostream.
+	 *
+	 * @param output The std::ostream to output to.
+	 * @param inst   The Instruction to output.
+	 * @return The std::ostream used for output.
+	 */
 	friend std::ostream &operator<<(std::ostream &output, const Instruction &inst) {
 		output << boost::format("%08x: %s") % inst._address % inst._name;
 		std::vector<Parameter>::const_iterator param;

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -43,13 +43,25 @@
 	IFFChunk();
 };
 
+/**
+ * Container for data on built-in functions.
+ */
 struct FunctionData {
-  std::string _name;
-	std::string _metadata;
+  std::string _name;     ///< The name of the function.
+	std::string _metadata; ///< Metadata for the function.
 
+	/**
+	 * Parameterless constructor for FunctionData. Used for new[].
+	 */
 	FunctionData() {
 	}
 
+	/**
+	 * Constructor for FunctionData.
+	 *
+	 * @param name The name of the function.
+	 * @param metadata Metadata for the function.
+	 */
 	FunctionData(std::string name, std::string metadata);
 };
 
@@ -62,13 +74,13 @@
  */
 class Disassembler : public ::Disassembler {
 private:
-	IFF_ID _formType;      ///< File type as listed in the IFF formatted file.
-	IFFChunk _textChunk;   ///< Contents of the TEXT chunk.
-	IFFChunk _ordrChunk;   ///< Contents of the ORDR chunk.
-  IFFChunk _dataChunk;   ///< Contents of the DATA chunk.
-	Engine *_engine;       ///< Pointer to the Kyra::Engine used for this script.
-	uint32 _funcCount;
-  FunctionData *_funcs;  ///< Array of function data.
+	IFF_ID _formType;     ///< File type as listed in the IFF formatted file.
+	IFFChunk _textChunk;  ///< Contents of the TEXT chunk.
+	IFFChunk _ordrChunk;  ///< Contents of the ORDR chunk.
+  IFFChunk _dataChunk;  ///< Contents of the DATA chunk.
+	Engine *_engine;      ///< Pointer to the Kyra::Engine used for this script.
+	uint32 _funcCount;    ///< Number of functions in the _funcs array.
+  FunctionData *_funcs; ///< Array of function data.
 
 	/**
 	 * Sets up function data for Kyra2 functions.
@@ -79,6 +91,7 @@
 	 * Constructor for Disassembler.
 	 *
 	 * @param engine Pointer to the Kyra::Engine used for this script.
+	 * @param insts Reference to the vector in which disassembled instructions should be placed.
 	 */
 	Disassembler(Engine *engine, std::vector<Instruction> &insts);
 	~Disassembler();

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -41,7 +41,7 @@
 	void postCFG(std::vector<Instruction> &insts, Graph g);
 	bool detectMoreFuncs();
 
-	std::vector<std::string> _textStrings;
+	std::vector<std::string> _textStrings; ///< Container for strings from the TEXT chunk.
 };
 
 } // End of namespace KYRA

Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-08-07 16:42:10 UTC (rev 51838)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-08-07 20:32:00 UTC (rev 51839)
@@ -49,6 +49,11 @@
 	virtual void readParameter(Parameter *p, char type);
 
 public:
+	/**
+	 * Constructor for SimpleDisassembler.
+	 *
+	 * @param insts Reference to the vector in which disassembled instructions should be placed.
+	 */
 	SimpleDisassembler(std::vector<Instruction> &insts);
 };
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list