coins.sym
Class NamedConstImpl

java.lang.Object
  extended bycoins.sym.SymImpl
      extended bycoins.sym.ConstImpl
          extended bycoins.sym.NamedConstImpl
All Implemented Interfaces:
java.lang.Cloneable, Const, HasStringObject, NamedConst, Sym, Sym0

public class NamedConstImpl
extends ConstImpl
implements NamedConst

ConstImpl class


Field Summary
protected  Const fConstValue
          Constant value
protected  long fIndexValue
          Index value.
 
Fields inherited from class coins.sym.SymImpl
fDbgLevel, fDefinedIn, fFlagBox, fKind, fName, fNextSym, fRecordedIn, fSourceInf, fSymInf, fType, fUniqueNameSym, fWork, machineParam, sourceLanguage, symRoot
 
Fields inherited from interface coins.sym.Sym
KIND_NAME, VISIBILITY
 
Fields inherited from interface coins.sym.Sym0
FLAG_ADDRESS_TAKEN, FLAG_CASTLESS_SUBP, FLAG_COMMON, FLAG_COMPLEX_STRUCT, FLAG_DERIVED_SYM, FLAG_GENERATED_SYM, FLAG_INCOMPLETE_TYPE, FLAG_POINTER_OPERATION, FLAG_REGION_ELEM, FLAG_RESERVED_NAME, FLAG_SIZEOF_TAKEN, FLAG_UNFIXED_SIZE, FLAG_UNIFORM_SIZE, FLAG_VALUE_IS_ASSIGNED, KIND_AREG, KIND_BOOL_CONST, KIND_CHAR_CONST, KIND_CONST_FIRST, KIND_CONST_LAST, KIND_ELEM, KIND_EXP_ID, KIND_FLOAT_CONST, KIND_INT_CONST, KIND_LABEL, KIND_MREG, KIND_NAMED_CONST, KIND_OTHER, KIND_PARAM, KIND_REMOVED, KIND_STRING_CONST, KIND_SUBP, KIND_TAG, KIND_TYPE, KIND_VAR, SYM_COMPILE_UNIT, SYM_EXTERN, SYM_PRIVATE, SYM_PROTECTED, SYM_PUBLIC
 
Constructor Summary
NamedConstImpl(SymRoot pSymRoot, java.lang.String pInternedName, Const pConst)
           
NamedConstImpl(SymRoot pSymRoot, java.lang.String pInternedName, int pIndex)
           
 
Method Summary
 double doubleValue()
          doubleValue Get double value of this constant.
 Const getConstSym()
          getConstSym
 Const getConstValue()
          getConstValue (##5) Get the constant value assigned to this named constant.
 int getIndexValue()
          getIndexValue Get the index value assigned to this named constant.
 long longValue()
          longValue Get the value of this constant.
 java.lang.String toString()
          Get the string image of object.
 java.lang.String toStringDetail()
          toStringDetail Get detailed attributes of this symbol in text which is not interned.
 java.lang.String toStringShort()
          toStringShort Get name and index of this symbol in text which is not interned.
 
Methods inherited from class coins.sym.ConstImpl
charValue, evaluateAsObject, floatValue, intValue, shortValue
 
Methods inherited from class coins.sym.SymImpl
bareStringConst, baseType, boolConst, charConst, charConst, charConst, definedType, definedType, defineElem, defineLabel, defineParam, defineRegionVar, defineSubp, defineVar, defineVar, derivedSym, enumType, enumType, floatConst, floatConst, getDefinedColumn, getDefinedFile, getDefinedIn, getDefinedInName, getDefinedLine, getFlag, getInf, getName, getNameOrNull, getNextSym, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getRecordedIn, getSourceInf, getSymKind, getSymKindName, getSymType, getUniqueName, getWork, intConst, intConst, intObject, isGlobal, isHIR, isRemoved, isSym, linkSym, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeExpString, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, namedConst, pointerType, pointerType, pointerType, pointerType, pointerType, print, print, regionType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setFlag, setOriginalSym, setParameters, setRecordedIn, setSourceInf, setSymKind, setSymType, setUniqueNameSym, setWork, stringConst, stringConstFromQuotedString, structType, structType, subpType, subpType, symbol, unionType, unionType, vectorType, vectorType, vectorType, vectorType, vectorTypeUnfixed, vectorTypeUnfixed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface coins.sym.Const
charValue, evaluateAsObject, floatValue, intValue, shortValue
 
Methods inherited from interface coins.sym.Sym
baseType, boolConst, charConst, defineVar, derivedSym, floatConst, getDefinedColumn, getDefinedInName, getDefinedLine, getInf, getNameOrNull, getOrAddInf, getOriginalSym, getOriginalSym, getPureName, getSymKindName, getWork, intConst, intObject, isRemoved, makeCstring, makeCstringWithTrailing0, makeEnumTypeName, makeJavaString, makeStructUnionTypeName, makeSubpTypeName, makeVectorTypeName, makeVectorTypeName, makeVectorTypeName, namedConst, pointerType, pointerType, pointerType, regionType, remove, setDefinedFile, setDefinedIn, setDefinedLine, setRecordedIn, setSymKind, setSymType, setUniqueNameSym, setWork, stringConstFromQuotedString, symbol, vectorType, vectorType, vectorType, vectorTypeUnfixed
 
Methods inherited from interface coins.sym.Sym0
charConst, definedType, defineElem, defineLabel, defineParam, defineSubp, defineVar, enumType, floatConst, getDefinedFile, getDefinedIn, getFlag, getName, getNextSym, getRecordedIn, getSymKind, getSymType, getUniqueName, intConst, isGlobal, namedConst, pointerType, setFlag, stringConst, structType, subpType, unionType, vectorType, vectorTypeUnfixed
 

Field Detail

fIndexValue

protected long fIndexValue
Index value.


fConstValue

protected Const fConstValue
Constant value

Constructor Detail

NamedConstImpl

public NamedConstImpl(SymRoot pSymRoot,
                      java.lang.String pInternedName,
                      int pIndex)

NamedConstImpl

public NamedConstImpl(SymRoot pSymRoot,
                      java.lang.String pInternedName,
                      Const pConst)
Method Detail

getConstValue

public Const getConstValue()
Description copied from interface: NamedConst
getConstValue (##5) Get the constant value assigned to this named constant.

Specified by:
getConstValue in interface NamedConst

getIndexValue

public int getIndexValue()
Description copied from interface: NamedConst
getIndexValue Get the index value assigned to this named constant.

Specified by:
getIndexValue in interface NamedConst

longValue

public long longValue()
longValue Get the value of this constant. If type conversion is required, the returned value is the result of conversion. "this" should be a constant of type long.

Specified by:
longValue in interface Const
Returns:
long the long value of this constant.

doubleValue

public double doubleValue()
doubleValue Get double value of this constant. If type conversion is required, the returned value is the result of conversion. "this" should be a constant of type float, or double.

Specified by:
doubleValue in interface Const
Returns:
the double value of this constant.

getConstSym

public Const getConstSym()
Description copied from interface: Const
getConstSym
  If      boolean true  then return symRoot.intConst1
  else if boolean false then return symRoot.intConst0
  else if enumeration constant then return corresponding IntConst
  else return this.

Specified by:
getConstSym in interface Const
Overrides:
getConstSym in class ConstImpl

toString

public java.lang.String toString()
Description copied from interface: HasStringObject
Get the string image of object.

Specified by:
toString in interface HasStringObject
Overrides:
toString in class SymImpl

toStringShort

public java.lang.String toStringShort()
Description copied from interface: Sym
toStringShort Get name and index of this symbol in text which is not interned.

Specified by:
toStringShort in interface Sym
Overrides:
toStringShort in class SymImpl

toStringDetail

public java.lang.String toStringDetail()
Description copied from interface: Sym
toStringDetail Get detailed attributes of this symbol in text which is not interned.

Specified by:
toStringDetail in interface Sym
Overrides:
toStringDetail in class SymImpl