public final class Smc extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Smc.Language
This class explicitly stores each target language's
properties:
the start of the command line option,
the language's full name,
the language's
SmcCodeGenerator subclass, and
whether the language also generates a header file and
the header fill SmcCodeGenerator subclass. |
| Modifier and Type | Method and Description |
|---|---|
static Smc.Language |
findTargetLanguage(String name)
Returns the language record associated with the given
name.
|
static String |
getFileName(String fullName)
Returns
name portion from path/name.sm. |
static boolean |
isValidAccessLevel(String s,
Smc.Language targetLanguage)
Returns
true if the given string is a valid
access level for target language. |
static boolean |
isValidCast(String castType)
Returns
true if castType is a valid
C++ cast. |
static boolean |
isValidDirectory(String path,
boolean readable,
boolean writable)
Returns
true if path is a valid
directory. |
static boolean |
isValidGraphLevel(int glevel)
Returns
true if glevel is a valid graph
detail level. |
static void |
main(String[] args)
The state machine compiler main method.
|
static void |
outputMessages(String srcFileName,
PrintStream stream,
List<SmcMessage> messages)
Writes SMC output messages to the provided stream.
|
static boolean |
supportsOption(String option,
Smc.Language language)
Returns
true if the target language supports the
specified option. |
public static final String APP_NAME
public static final String VERSION
public static final String SM_SUFFIX
public static final String ACCESS_FLAG
public static final String CAST_FLAG
public static final String DIRECTORY_FLAG
public static final String DEBUG_FLAG
public static final String DEBUG_LEVEL0_FLAG
public static final String DEBUG_LEVEL1_FLAG
public static final String GENERIC_FLAG
public static final String GENERIC7_FLAG
public static final String GLEVEL_FLAG
public static final String HEADER_FLAG
public static final String HEADER_SUFFIX_FLAG
public static final String HELP_FLAG
public static final String NO_CATCH_FLAG
public static final String NO_EXCEPTIONS_FLAG
public static final String NO_STREAMS_FLAG
public static final String CRTP_FLAG
public static final String STACK_FLAG
public static final String REFLECT_FLAG
public static final String RETURN_FLAG
public static final String SERIAL_FLAG
public static final String SILENT_FLAG
public static final String SUFFIX_FLAG
public static final String SYNC_FLAG
public static final String VERBOSE_FLAG
public static final String VERSION_FLAG
public static final String VVERBOSE_FLAG
public static final String USE_PROTOCOL_FLAG
public static final String PACKAGE_LEVEL
public static final String PACKAGE_ACCESS
public static void main(String[] args)
args - command line arguments.public static final Smc.Language findTargetLanguage(String name)
null if name is not
associated with any supported target language.name - target language name.public static boolean supportsOption(String option, Smc.Language language)
true if the target language supports the
specified option.option - command line option.language - check if this language supports
option.true if the command line option is
valid for language.public static boolean isValidDirectory(String path, boolean readable, boolean writable)
true if path is a valid
directory. Valid means that the direct exists and is
either readable or writable.path - used to create File instance.readable - expected File.canRead() result.writable - expected File.canWrite() result.true if specified directory meets
expected results.public static boolean isValidAccessLevel(String s, Smc.Language targetLanguage)
true if the given string is a valid
access level for target language.s - access level string.targetLanguage - target language.true if s is a valid
targetLanguage access level.public static boolean isValidCast(String castType)
true if castType is a valid
C++ cast.castType - C++ cast type.true if cast type is valid.public static boolean isValidGraphLevel(int glevel)
true if glevel is a valid graph
detail level.glevel - validate this graph detail level.true if glevel is valid.public static String getFileName(String fullName)
name portion from path/name.sm.fullName - full qualified file name.public static void outputMessages(String srcFileName, PrintStream stream, List<SmcMessage> messages)
srcFileName - SMC target file name.stream - write messages to this print stream.messages - output these messages.Copyright © 2019. All rights reserved.