|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.domain.model.language.Language
org.problets.domain.model.language.CLanguage
public class CLanguage
Provides C-specific details such as the available data types
Constructor Summary | |
---|---|
CLanguage()
|
Method Summary | |
---|---|
void |
getIntegerTypes(java.util.Vector optionVector)
Returns the possible integer types for the various languages |
int |
getMetaDataType(java.lang.String dataType)
Returns the language-neutral meta data type (integer) corresponding to the language-specific string |
BaseModulus |
getModulusOperator()
Returns the Modulus operator for this language |
java.lang.String |
getPrintString(java.lang.String printedValue,
java.lang.String dataType)
Returns the syntax for printing printedValue in the current language |
Program |
getProgram(ActivationRecord parentActivationRecord,
HeapModel heap,
java.lang.String template)
Returns a program object for the given language |
void |
getRealTypes(java.util.Vector optionVector)
Returns the possible real types for the various languages |
void |
getUnsignedTypes(java.util.Vector optionVector)
Returns the possible unsigned types for the various languages |
boolean |
hasUnsignedType()
Returns whether unsigned data type exists in the language |
boolean |
isIntegerType(java.lang.String dataType)
Returns whether dataType is of integer type in the language |
boolean |
isRealType(java.lang.String dataType)
Returns whether dataType is of real type in the language |
static void |
main(java.lang.String[] args)
|
Value |
typeCompatibleAssign(Assignable left,
Value right,
boolean isCompoundOperator)
Returns true if right value can be assigned to the left variable, and false otherwise |
Methods inherited from class org.problets.domain.model.language.Language |
---|
getAllDataTypes, getCaseHeader, getDefaultDataType, getDefaultHeader, getEqualsOperator, getForLoop, getIfHeader, getNotEqualsOperator, getNumDataTypes, getSignedTypes, getStatementDelimiter, getSwitchHeader, getWhileHeader, isValidDataType, shouldExplainCoercionInAssignment |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CLanguage()
Method Detail |
---|
public void getIntegerTypes(java.util.Vector optionVector)
getIntegerTypes
in class Language
public boolean hasUnsignedType()
hasUnsignedType
in class Language
public void getUnsignedTypes(java.util.Vector optionVector)
getUnsignedTypes
in class Language
public void getRealTypes(java.util.Vector optionVector)
getRealTypes
in class Language
public int getMetaDataType(java.lang.String dataType)
getMetaDataType
in class Language
public boolean isIntegerType(java.lang.String dataType)
isIntegerType
in class Language
dataType
- String which will be checked against integer types for the languagepublic boolean isRealType(java.lang.String dataType)
isRealType
in class Language
dataType
- String which will be checked against real types for the languagepublic Value typeCompatibleAssign(Assignable left, Value right, boolean isCompoundOperator)
typeCompatibleAssign
in class Language
left
- Assignable variable/expressionright
- Value assigned to left variable/expression
public BaseModulus getModulusOperator()
getModulusOperator
in class Language
public java.lang.String getPrintString(java.lang.String printedValue, java.lang.String dataType)
getPrintString
in class Language
public Program getProgram(ActivationRecord parentActivationRecord, HeapModel heap, java.lang.String template)
getProgram
in class Language
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |