Modifier and Type | Field and Description |
---|---|
static java.lang.String |
opt
placeholder for the compilation or execution option
|
static java.lang.String |
src
placeholder for the file containing the source code
|
Constructor and Description |
---|
LangInternal(int idLang,
java.lang.String langName,
java.lang.String compiler,
boolean interpreted,
java.lang.String extension,
java.lang.String compileCommand,
java.lang.String executionCommand)
Constructs a language unit as seen by the server
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateCompileCommand(java.lang.String fileName,
java.lang.String compileOptions)
construct a well formed compilation command
|
java.lang.String |
generateExecutionCommand(java.lang.String fileName,
java.lang.String executionOptions)
construct a well formed execution command
|
java.lang.String |
getExtension() |
boolean |
isInterpreted() |
getCompiler, getIdLang, getLangName, setCompiler, setIdLang, setLangName
public static final java.lang.String opt
public static final java.lang.String src
public LangInternal(int idLang, java.lang.String langName, java.lang.String compiler, boolean interpreted, java.lang.String extension, java.lang.String compileCommand, java.lang.String executionCommand)
idLang
- unique id of the languagelangName
- name of the languagecompiler
- name of the compiler to be used for this language's source filesinterpreted
- whether the language is an interpreted one or notextension
- file name extension for the languagecompileCommand
- compilation string format for this language
(e.g : gcc [option]* <filename>
)executionCommand
- execution string format for this language (e.g : ./a.out
)public boolean isInterpreted()
public java.lang.String getExtension()
public java.lang.String generateCompileCommand(java.lang.String fileName, java.lang.String compileOptions)
fileName
- the file name to usecompileOptions
- compilation optionsgcc -std=c99 src.c
)public java.lang.String generateExecutionCommand(java.lang.String fileName, java.lang.String executionOptions)
fileName
- the file name to useexecutionOptions
- execution optionsjava -esa client
)