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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Jun 2 20:17:09 CEST 2010


Revision: 49397
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49397&view=rev
Author:   lordhoto
Date:     2010-06-02 18:17:09 +0000 (Wed, 02 Jun 2010)

Log Message:
-----------
Some readability changes in the doxygen comments.

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/instruction.h
    tools/branches/gsoc2010-decompiler/decompiler/objectFactory.h
    tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/unknown_opcode.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-06-02 18:11:09 UTC (rev 49396)
+++ tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-06-02 18:17:09 UTC (rev 49397)
@@ -35,9 +35,9 @@
  */
 class Disassembler {
 protected:
-	Common::File _f; ///<Used to perform file I/O.
-	std::vector<Instruction> _insts; ///<Container for disassembled instructions.
-	uint32 _addressBase; ///<Base address where the script starts.
+	Common::File _f;                 ///< Used to perform file I/O.
+	std::vector<Instruction> _insts; ///< Container for disassembled instructions.
+	uint32 _addressBase;             ///< Base address where the script starts.
 
 public:
 	Disassembler();
@@ -45,6 +45,7 @@
 
 	/**
 	 * Open a file for disassembly.
+	 *
 	 * @param filename The file to disassemble.
 	 */
 	void open(const char *filename);
@@ -56,6 +57,7 @@
 
 	/**
 	 * Outputs the disassembly to a file.
+	 *
 	 * @param filename The file to output the disassembly to.
 	 */
 	virtual void dumpDisassembly(std::ostream &output);

Modified: tools/branches/gsoc2010-decompiler/decompiler/instruction.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-06-02 18:11:09 UTC (rev 49396)
+++ tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-06-02 18:17:09 UTC (rev 49397)
@@ -33,38 +33,39 @@
  * Enumeration for categorizing the different kinds of instructions.
  */
 enum InstType {
-	kArithmetic, ///<Arithmetic instruction (+, -, *, etc.).
-	kBoolean, ///<Boolean instruction (AND, OR, etc.).
-	kCall, ///<Regular function call.
-	kComparison, ///<Comparison instruction.
-	kCondJump, ///<Conditional jump.
-	kJump, ///<Unconditional jump.
-	kLoad, ///<Load value to stack.
-	kReturn, ///<Return from regular function call.
-	kSpecial, ///<Special functions.
-	kStack, ///<Stack allocation or deallocation (altering stack pointer).
-	kStore ///<Store value from stack in memory.
+	kArithmetic, ///< Arithmetic instruction (+, -, *, etc.).
+	kBoolean,    ///< Boolean instruction (AND, OR, etc.).
+	kCall,       ///< Regular function call.
+	kComparison, ///< Comparison instruction.
+	kCondJump,   ///< Conditional jump.
+	kJump,       ///< Unconditional jump.
+	kLoad,       ///< Load value to stack.
+	kReturn,     ///< Return from regular function call.
+	kSpecial,    ///< Special functions.
+	kStack,      ///< Stack allocation or deallocation (altering stack pointer).
+	kStore       ///< Store value from stack in memory.
 };
 
 /**
  * Enumeration for categorizing the different kinds of parameters.
  */
 enum ParamType {
-	kSByte, ///<Signed 8-bit integer.
-	kByte, ///<Unsigned 8-bit integer.
-	kShort, ///<Signed 16-bit integer.
-	kUShort, ///<Unsigned 16-bit integer.
-	kInt, ///<Signed 32-bit integer.
-	kUInt, ///<Unsigned 32-bit integer.
-	kString ///<Text string.
+	kSByte,  ///< Signed 8-bit integer.
+	kByte,   ///< Unsigned 8-bit integer.
+	kShort,  ///< Signed 16-bit integer.
+	kUShort, ///< Unsigned 16-bit integer.
+	kInt,    ///< Signed 32-bit integer.
+	kUInt,   ///< Unsigned 32-bit integer.
+	kString  ///< Text string.
 };
 
 /**
  * Structure for representing a parameter.
  */
 struct Parameter {
-	ParamType _type; ///<Type of the parameter.
-	boost::variant<int32, uint32, std::string> _value; ///<Value of the parameter.
+	ParamType _type;                                   ///< Type of the parameter.
+	boost::variant<int32, uint32, std::string> _value; ///< Value of the parameter.
+
 	int32 getSigned() const { return boost::get<int32>(_value); }
 	uint32 getUnsigned() const { return boost::get<uint32>(_value); }
 	std::string getString() const { return boost::get<std::string>(_value); }
@@ -74,11 +75,11 @@
  * Structure for representing an instruction.
  */
 struct Instruction {
-	uint32 _address; ///<The instruction address.
-	int16 _stackChange; ///<How much this instruction changes the stack pointer by.
-	std::string _name; ///<The instruction name (opcode name).
-	InstType _type; ///<The instruction type.
-	std::vector<Parameter> _params; ///<Array of parameters used for the instruction.
+	uint32 _address;                ///< The instruction address.
+	int16 _stackChange;             ///< How much this instruction changes the stack pointer by.
+	std::string _name;              ///< The instruction name (opcode name).
+	InstType _type;                 ///< The instruction type.
+	std::vector<Parameter> _params; ///< Array of parameters used for the instruction.
 };
 
 #endif

Modified: tools/branches/gsoc2010-decompiler/decompiler/objectFactory.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/objectFactory.h	2010-06-02 18:11:09 UTC (rev 49396)
+++ tools/branches/gsoc2010-decompiler/decompiler/objectFactory.h	2010-06-02 18:17:09 UTC (rev 49397)
@@ -50,6 +50,7 @@
 public:
 	/**
 	 * Register a new entry.
+	 *
 	 * @param name The name to register the class under.
 	 */
 	template<typename Type>
@@ -59,6 +60,7 @@
 
 	/**
 	 * Creates an instance of some registered class.
+	 *
 	 * @param name The name associated with the desired class.
 	 * @return NULL if the name is not registered, else an instance of the associated class.
 	 */

Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-06-02 18:11:09 UTC (rev 49396)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-06-02 18:17:09 UTC (rev 49397)
@@ -30,10 +30,11 @@
  */
 class SimpleDisassembler : public Disassembler {
 protected:
-	uint32 _address; ///<Variable to maintain the current address.
+	uint32 _address; ///< Variable to maintain the current address.
 
 	/**
 	 * Read parameters and associate them with an instruction.
+	 *
 	 * @param inst Pointer to the instruction to associate the parameters with.
 	 * @param typeString NUL-terminated string describing the type of each parameter.
 	 */
@@ -41,6 +42,7 @@
 
 	/**
 	 * Reads data for a single parameter.
+	 *
 	 * @param p Pointer to the destination Parameter structure.
 	 * @param type Character describing the type of the parameter.
 	 */

Modified: tools/branches/gsoc2010-decompiler/decompiler/unknown_opcode.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/unknown_opcode.h	2010-06-02 18:11:09 UTC (rev 49396)
+++ tools/branches/gsoc2010-decompiler/decompiler/unknown_opcode.h	2010-06-02 18:17:09 UTC (rev 49397)
@@ -31,13 +31,14 @@
  * Exception representing an unknown opcode.
  */
 class UnknownOpcodeException : public std::exception {
-	uint32 _address; ///<Address where the invalid opcode was found.
-	uint8 _opcode; ///<The value of the invalid opcode.
-	char _buf[255];	///<Buffer for formatting the error message.
+	uint32 _address; ///< Address where the invalid opcode was found.
+	uint8 _opcode;   ///< The value of the invalid opcode.
+	char _buf[255];  ///< Buffer for formatting the error message.
 
 public:
 	/**
 	 * Constructor for UnknownOpcodeException.
+	 *
 	 * @param address Address where the invalid opcode was found.
 	 * @param opcode The value of the invalid opcode.
 	 */


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