kawigi.language
Interface ExtendedLanguage

All Superinterfaces:
java.lang.Cloneable, com.topcoder.shared.netCommon.CustomSerializable, com.topcoder.shared.language.Language, java.io.Serializable
All Known Implementing Classes:
LanguageContainer

public interface ExtendedLanguage
extends com.topcoder.shared.language.Language

Encapsulates a language with both KawigiEdit features and TC Language features.


Method Summary
 java.lang.String getCompileCommand(com.topcoder.shared.problem.ProblemComponent comp)
          Returns the command that should be used to compile the file.
 java.lang.String getFileName(com.topcoder.shared.problem.ProblemComponent comp)
          Returns the filename that the source file should be saved as.
 java.lang.String getRunCommand(com.topcoder.shared.problem.ProblemComponent comp, java.io.File cwd)
          Returns the command that should be used to run the program and test cases.
 kawigi.language.Skeleton getSkeleton(com.topcoder.shared.problem.ProblemComponent comp)
          This should return at least a class and method declaration, and if possible, testing code a directly executable method (like main in Java).
 java.lang.Class getViewClass()
          Returns a class compatible with javax.swing.text.View that can render the source in this language.
 
Methods inherited from interface com.topcoder.shared.language.Language
customReadObject, customWriteObject, equals, getId, getMethodSignature, getName
 

Method Detail

getSkeleton

public kawigi.language.Skeleton getSkeleton(com.topcoder.shared.problem.ProblemComponent comp)
This should return at least a class and method declaration, and if possible, testing code a directly executable method (like main in Java).


getCompileCommand

public java.lang.String getCompileCommand(com.topcoder.shared.problem.ProblemComponent comp)
Returns the command that should be used to compile the file. Ideally, this won't be platform-specific, but realistically, some people use different compilers than others completely. It may be possible at some point to allow this to be configured. You may assume that the source file is in the current working directory.


getRunCommand

public java.lang.String getRunCommand(com.topcoder.shared.problem.ProblemComponent comp,
                                      java.io.File cwd)
Returns the command that should be used to run the program and test cases. Again, some care will need to be taken to make this part platform-happy. You may assume that the code was compiled according to your compile command and that the current working directory is the one where the source was saved.


getFileName

public java.lang.String getFileName(com.topcoder.shared.problem.ProblemComponent comp)
Returns the filename that the source file should be saved as. You may assume that this is the actual filename used when creating the compile and run commands.


getViewClass

public java.lang.Class getViewClass()
Returns a class compatible with javax.swing.text.View that can render the source in this language.