byucc.jhdl.util.BVFormat
Class FieldFormatCustom

java.lang.Object
  extended bybyucc.jhdl.util.BVFormat.FieldFormat
      extended bybyucc.jhdl.util.BVFormat.FieldFormatInteger
          extended bybyucc.jhdl.util.BVFormat.FieldFormatCustom

public class FieldFormatCustom
extends FieldFormatInteger

Abstract class used for formatting fields.


Field Summary
 
Fields inherited from class byucc.jhdl.util.BVFormat.FieldFormatInteger
bottom, top
 
Fields inherited from class byucc.jhdl.util.BVFormat.FieldFormat
minWidth
 
Constructor Summary
protected FieldFormatCustom(int top, int bottom, int minWidth, java.lang.String classname, java.lang.String methodname)
          Constructor for the FieldFormat object.
 
Method Summary
 java.lang.String formatFieldInteger(BV field, boolean fractional)
          Abstract method to be implemented by subclasses.
 
Methods inherited from class byucc.jhdl.util.BVFormat.FieldFormatInteger
formatField, fraction2DecimalString, getBottom, getTop
 
Methods inherited from class byucc.jhdl.util.BVFormat.FieldFormat
formatField, getMinWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldFormatCustom

protected FieldFormatCustom(int top,
                            int bottom,
                            int minWidth,
                            java.lang.String classname,
                            java.lang.String methodname)
Constructor for the FieldFormat object.

Parameters:
top - Top (most-significant) bit of the range.
bottom - Bottom (lease-significant) bit of the range.
minWidth - Optional minimum width. A value less than or equal to zero means that there is no minumum width.
classname - Name of the class containing the method to format a BV.
methodname - Name of the method to be used to format a BV.
Method Detail

formatFieldInteger

public java.lang.String formatFieldInteger(BV field,
                                           boolean fractional)
Description copied from class: FieldFormatInteger
Abstract method to be implemented by subclasses. The BV passed to this method will be trimmed to include only the field.

Specified by:
formatFieldInteger in class FieldFormatInteger
Parameters:
field - BV representing the field.
fractional - Tells whether or not this field represents a fraction (if true) or a whole number (if false).


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.