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).
-
DebugBoxImportanceLevel
- How important does debug information have to be before it is
to be placed in the DebugBox?
-
DebugFileImportanceLevel
- How important does debug information have to be before it is
to be written to the DebugFile?
-
DebugFileName
- The name of the debug file.
-
DebugListModel
- Manager for debug output to the screen.
-
DebugString
- Working variable into which information to be added to the DebugBox
may be placed.
-
DisplayUpdateInterval
-
-
IndentLevel
- How many times should the UnitIndentString be shown at the
beginning of each line?
-
IndentString
- The string to be shown at the start of each line.
-
NextDisplayTime
- The frequency with which the debug box is to be updated (in milliseconds).
-
UnitIndentString
- The characters making up each indent level.
-
eh_Debug()
-
-
add(int, String)
- Add InputString to debug output if InputImportanceLevel is high enough.
-
addLongString(int, String)
- Output a long string as multiple lines, each of length InputLineLength (or
80, whichever is less).
-
addLongString(int, String, int)
- Output a long string as multiple lines, each of length InputLineLength (or
80, whichever is less).
-
assert(boolean, String)
- If InputCondition is false, output InputString to debug.
-
closeFile()
- Close the debug file.
-
decrementIndentLevel()
-
-
getDebugBoxImportanceLevel()
-
-
getDebugBoxMaxChars()
-
-
getDebugFileImportanceLevel()
-
-
getDebugFileName()
-
-
getDebugFileName(String)
-
-
getDebugListModel()
-
-
getDebugString()
-
-
getDebugString(String)
-
-
incrementIndentLevel()
-
-
logDebugString(int)
- Log eh_Debug.DebugString to the list box and/or the debug file if required.
-
openFile(boolean)
- Open the debug file.
-
printStackTrace(int, Throwable)
- Output the stack trace of the InputThrowable to debug.
-
resetFile()
- Clear the debug file.
-
setDebugBoxImportanceLevel(int)
-
-
setDebugBoxMaxChars(int)
-
-
setDebugFileImportanceLevel(int)
-
-
setDebugFileName(String)
-
-
setDebugListModel(eh_DebugListModel)
-
-
setUnitIndentString(String)
-
DebugString
protected static String DebugString
- Working variable into which information to be added to the DebugBox
may be placed.
IndentString
protected static String IndentString
- The string to be shown at the start of each line.
IndentLevel
protected static int IndentLevel
- How many times should the UnitIndentString be shown at the
beginning of each line?
UnitIndentString
protected static String UnitIndentString
- The characters making up each indent level.
DebugListModel
protected static eh_DebugListModel DebugListModel
- Manager for debug output to the screen.
DebugBoxImportanceLevel
protected static int DebugBoxImportanceLevel
- How important does debug information have to be before it is
to be placed in the DebugBox?
DisplayUpdateInterval
protected static int DisplayUpdateInterval
NextDisplayTime
protected static int NextDisplayTime
- The frequency with which the debug box is to be updated (in milliseconds).
DebugFileName
protected static String DebugFileName
- The name of the debug file.
DebugFileImportanceLevel
protected static int DebugFileImportanceLevel
- How important does debug information have to be before it is
to be written to the DebugFile?
eh_Debug
public eh_Debug()
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
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.
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.
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
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
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.
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.
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.
incrementIndentLevel
public static void incrementIndentLevel()
decrementIndentLevel
public static void decrementIndentLevel()
setUnitIndentString
public static void setUnitIndentString(String InputUnitIndentString)
setDebugListModel
public static void setDebugListModel(eh_DebugListModel InputDebugListModel)
setDebugBoxMaxChars
public static void setDebugBoxMaxChars(int InputMaxLines)
setDebugBoxImportanceLevel
public static void setDebugBoxImportanceLevel(int InputImportanceLevel)
setDebugFileName
public static void setDebugFileName(String InputDebugFileName)
setDebugFileImportanceLevel
public static void setDebugFileImportanceLevel(int InputImportanceLevel)
getDebugListModel
public static eh_DebugListModel getDebugListModel()
getDebugString
public static String getDebugString()
getDebugString
public static void getDebugString(String OutputDebugString)
getDebugBoxMaxChars
public static int getDebugBoxMaxChars()
getDebugBoxImportanceLevel
public static int getDebugBoxImportanceLevel()
getDebugFileName
public static String getDebugFileName()
getDebugFileName
public static void getDebugFileName(String OutputDebugFileName)
getDebugFileImportanceLevel
public static int getDebugFileImportanceLevel()
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