All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class eh.eh_Debug

java.lang.Object
   |
   +----eh.eh_Debug

public class eh_Debug
extends Object

eh_Debug is a vehicle for recording debug output, which can be passed to a visual List (which is typically in a debug window - such as eh_DebugFrame) and/or a flat file. (TBD The flat file part is not yet implemented - with only ancestral C++ code present.)

Everything about this class is static, for convenience of use - so it can be invoked all over the place without having to worry about instantiating a debug object.

For performance reasons, the display output is buffered and only updated on screen periodically (every 1 second, by default).


Variable Index

 o DebugBoxImportanceLevel
How important does debug information have to be before it is to be placed in the DebugBox?
 o DebugFileImportanceLevel
How important does debug information have to be before it is to be written to the DebugFile?
 o DebugFileName
The name of the debug file.
 o DebugListModel
Manager for debug output to the screen.
 o DebugString
Working variable into which information to be added to the DebugBox may be placed.
 o DisplayUpdateInterval
 o IndentLevel
How many times should the UnitIndentString be shown at the beginning of each line?
 o IndentString
The string to be shown at the start of each line.
 o NextDisplayTime
The frequency with which the debug box is to be updated (in milliseconds).
 o UnitIndentString
The characters making up each indent level.

Constructor Index

 o eh_Debug()

Method Index

 o add(int, String)
Add InputString to debug output if InputImportanceLevel is high enough.
 o addLongString(int, String)
Output a long string as multiple lines, each of length InputLineLength (or 80, whichever is less).
 o addLongString(int, String, int)
Output a long string as multiple lines, each of length InputLineLength (or 80, whichever is less).
 o assert(boolean, String)
If InputCondition is false, output InputString to debug.
 o closeFile()
Close the debug file.
 o decrementIndentLevel()
 o getDebugBoxImportanceLevel()
 o getDebugBoxMaxChars()
 o getDebugFileImportanceLevel()
 o getDebugFileName()
 o getDebugFileName(String)
 o getDebugListModel()
 o getDebugString()
 o getDebugString(String)
 o incrementIndentLevel()
 o logDebugString(int)
Log eh_Debug.DebugString to the list box and/or the debug file if required.
 o openFile(boolean)
Open the debug file.
 o printStackTrace(int, Throwable)
Output the stack trace of the InputThrowable to debug.
 o resetFile()
Clear the debug file.
 o setDebugBoxImportanceLevel(int)
 o setDebugBoxMaxChars(int)
 o setDebugFileImportanceLevel(int)
 o setDebugFileName(String)
 o setDebugListModel(eh_DebugListModel)
 o setUnitIndentString(String)

Variables

 o DebugString
 protected static String DebugString
Working variable into which information to be added to the DebugBox may be placed.

 o IndentString
 protected static String IndentString
The string to be shown at the start of each line.

 o IndentLevel
 protected static int IndentLevel
How many times should the UnitIndentString be shown at the beginning of each line?

 o UnitIndentString
 protected static String UnitIndentString
The characters making up each indent level.

 o DebugListModel
 protected static eh_DebugListModel DebugListModel
Manager for debug output to the screen.

 o DebugBoxImportanceLevel
 protected static int DebugBoxImportanceLevel
How important does debug information have to be before it is to be placed in the DebugBox?

 o DisplayUpdateInterval
 protected static int DisplayUpdateInterval
 o NextDisplayTime
 protected static int NextDisplayTime
The frequency with which the debug box is to be updated (in milliseconds).

 o DebugFileName
 protected static String DebugFileName
The name of the debug file.

 o DebugFileImportanceLevel
 protected static int DebugFileImportanceLevel
How important does debug information have to be before it is to be written to the DebugFile?

Constructors

 o eh_Debug
 public eh_Debug()

Methods

 o add
 public static void add(int InputImportanceLevel,
                        String InputString)
Add InputString to debug output if InputImportanceLevel is high enough.

Parameters:
InputImportanceLevel - The importance level
InputString - The string to output
 o addLongString
 public static void addLongString(int InputImportanceLevel,
                                  String InputString)
Output a long string as multiple lines, each of length InputLineLength (or 80, whichever is less). Each output line will be prefixed by InputIndentLevel spaces.

 o addLongString
 public static void addLongString(int InputImportanceLevel,
                                  String InputString,
                                  int InputLineLength)
Output a long string as multiple lines, each of length InputLineLength (or 80, whichever is less). Each output line will be prefixed by InputIndentLevel spaces.

 o assert
 public static void assert(boolean InputCondition,
                           String InputString)
If InputCondition is false, output InputString to debug.

Parameters:
InputCondition - The condition we assert should be true
InputString - The string to output
 o printStackTrace
 public static void printStackTrace(int InputImportanceLevel,
                                    Throwable InputThrowable)
Output the stack trace of the InputThrowable to debug.

Parameters:
InputImportanceLevel - The importance level
InputThrowable - The throwable whose stack trace is to be output
 o openFile
 public static boolean openFile(boolean InputClearFlag)
Open the debug file. If InputClearFlag is TRUE, ensure that all previous contents of the file are removed first. A return value of true indicates that the file was opened successfully.

 o closeFile
 public static boolean closeFile()
Close the debug file. A return value of TRUE indicates that the file was closed successfully or was already closed.

 o resetFile
 public static boolean resetFile()
Clear the debug file. If the file was open prior to this call, it will be opened again. A return value of true indicates that everything was successful.

 o incrementIndentLevel
 public static void incrementIndentLevel()
 o decrementIndentLevel
 public static void decrementIndentLevel()
 o setUnitIndentString
 public static void setUnitIndentString(String InputUnitIndentString)
 o setDebugListModel
 public static void setDebugListModel(eh_DebugListModel InputDebugListModel)
 o setDebugBoxMaxChars
 public static void setDebugBoxMaxChars(int InputMaxLines)
 o setDebugBoxImportanceLevel
 public static void setDebugBoxImportanceLevel(int InputImportanceLevel)
 o setDebugFileName
 public static void setDebugFileName(String InputDebugFileName)
 o setDebugFileImportanceLevel
 public static void setDebugFileImportanceLevel(int InputImportanceLevel)
 o getDebugListModel
 public static eh_DebugListModel getDebugListModel()
 o getDebugString
 public static String getDebugString()
 o getDebugString
 public static void getDebugString(String OutputDebugString)
 o getDebugBoxMaxChars
 public static int getDebugBoxMaxChars()
 o getDebugBoxImportanceLevel
 public static int getDebugBoxImportanceLevel()
 o getDebugFileName
 public static String getDebugFileName()
 o getDebugFileName
 public static void getDebugFileName(String OutputDebugFileName)
 o getDebugFileImportanceLevel
 public static int getDebugFileImportanceLevel()
 o logDebugString
 protected static void logDebugString(int InputImportanceLevel)
Log eh_Debug.DebugString to the list box and/or the debug file if required.


All Packages  Class Hierarchy  This Package  Previous  Next  Index