|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdspl.intermediate.variable.Variable
dspl.intermediate.variable.DSPLUInteger
public class DSPLUInteger
DSPLUInteger is the Variable for the unsigned integer type
| Field Summary |
|---|
| Fields inherited from class dspl.intermediate.variable.Variable |
|---|
arraySize, byteSize, DATA_TYPE_BYTE, DATA_TYPE_COMPLEX, DATA_TYPE_FLOAT, DATA_TYPE_INT, DATA_TYPE_STRING, DATA_TYPE_UBYTE, DATA_TYPE_UINT, dataType, elementIndex, elementsParentVar, identifier, isConstant, isElement, lineNumDecl, SIZE_TYPE_ARRAY, SIZE_TYPE_ATOM, sizeType, value |
| Fields inherited from interface dspl.frontend.ParserTokensTokenTypes |
|---|
ASSIGN, COMMA, COMMENT, DECLS, DIGITS, DIV, DOT, EOF, EQ, GE, GT, ID, LBRACE, LBRACK, LE, LITERAL_byte, LITERAL_byte_array, LITERAL_ccall, LITERAL_complex, LITERAL_complex_array, LITERAL_else, LITERAL_float, LITERAL_float_array, LITERAL_for, LITERAL_if, LITERAL_int, LITERAL_int_array, LITERAL_string, LITERAL_ubyte, LITERAL_ubyte_array, LITERAL_uint, LITERAL_uint_array, LITERAL_while, LPAREN, LT, MINUS, MUL, NE, NEGATE, NEWLINE, NULL_TREE_LOOKAHEAD, NUM, PLUS, PROGRAM, RBRACE, RBRACK, REAL, RPAREN, SEMI, STRING, TILDE, WS |
| Constructor Summary | |
|---|---|
DSPLUInteger(int numElements)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
convertToObject(java.lang.String strValue)
Method responsible for taking a string from the source code and converting it into the appriopriate Java Object for the primitive. For all DSPL primitives except complex, the native java objects are used (String for string, Integer for int/uint, Float for float, etc). |
java.lang.Object |
convertToObject(java.lang.String strValue1,
java.lang.String strValue2)
Method responsible for taking two strings from the source code and converting it into the appriopriate Java Object for the primitive. At time of writing, this is only required for Complex, which takes two strings (real and imag). For complex, the dspl.intermediate.variable.primitive.Complex object is used Note invoking the double string convertToObject on any type besides complex throws an error. |
int |
getDataType()
|
int |
getDataTypeByteSize()
Returns the size of the Variable type's byte size (for a single element) |
boolean |
isNaturalNum()
Natural numbers are ints, uints, chars, and uchars. |
boolean |
isNumeric()
Numeric types are defiend in the context of the allowable operations performable on them. |
| Methods inherited from class dspl.intermediate.variable.Variable |
|---|
getAntlrTypeFromVarType, getAntlrTypeFromVarTypeArray, getArraySize, getByteSize, getIdentifier, getIndexVariable, getNewArray, getNewAtomic, getNewAtomicElement, getParentVariable, getSizeType, getValue, getVariableSizeType, initVariable, isArray, isAtomic, isConstant, isElement, isSameDataType, isValueSet, setIdentifier, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DSPLUInteger(int numElements)
| Method Detail |
|---|
public boolean isNumeric()
Variable
isNumeric in class Variablepublic int getDataTypeByteSize()
Variable
getDataTypeByteSize in class Variablepublic int getDataType()
getDataType in class Variablepublic java.lang.Object convertToObject(java.lang.String strValue)
Variable
convertToObject in class VariablestrValue - the string expresion for the variable (i.e. "hello", "5", "3.4");
public java.lang.Object convertToObject(java.lang.String strValue1,
java.lang.String strValue2)
Variable
convertToObject in class VariablestrValue1 - the string expresion for the first variablestrValue2 - the string expression for the second variable
public boolean isNaturalNum()
Variable
isNaturalNum in class Variable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||