|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openquark.cal.services.ProgramModelManager
public class ProgramModelManager
This class presents a higher-level abstraction to the program manager. It can manage queries and changes to the program without having to know about a program manager.
| Nested Class Summary | |
|---|---|
static class |
ProgramModelManager.CompilationOptions
A class to encapsulate the various compilation options when compiling a module or adjunct. |
| Constructor Summary | |
|---|---|
ProgramModelManager(ProgramManager programManager)
Constructor for a program model manager. |
|
| Method Summary | |
|---|---|
void |
addStatusListener(StatusListener listener)
|
void |
compile(ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
boolean dirtyModulesOnly,
StatusListener statusListener)
Compile the modules in this manager. |
void |
compile(ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
boolean dirtyModulesOnly,
StatusListener statusListener,
ProgramModelManager.CompilationOptions options)
Compile the modules in this manager. |
Compiler |
getCompiler()
Get the Compiler for this manager. |
Compiler |
getCompiler(ProgramModelManager.CompilationOptions compilationOptions)
Get the Compiler for this manager. |
Set<ModuleName> |
getDependentModuleNames(ModuleName targetModule)
|
org.openquark.cal.machine.MachineFunction |
getMachineFunction(QualifiedName functionName)
Retrieves the specified machine function. |
MachineStatistics |
getMachineStatistics()
|
MachineStatistics |
getMachineStatisticsForModule(ModuleName moduleName)
|
MachineType |
getMachineType()
Returns the machine type associated with this WorkspaceManager. |
org.openquark.cal.machine.Module |
getModule(ModuleName name)
Gets the module with a given moduleName. |
ModuleName[] |
getModuleNamesInProgram()
Returns the names of the modules contained by the Program instance encapsulated by this WorkspaceManager. |
List<org.openquark.cal.machine.Module> |
getModules()
Return a list of Module object for modules contained the ProgramManager instance encapsulated by this ProgramModleManager. |
ModuleTypeInfo |
getModuleTypeInfo(ModuleName moduleName)
|
int |
getNFunctionsInModule(ModuleName moduleName)
Returns the number of functions in the specified module. |
protected ProgramManager |
getProgramManager()
|
TypeChecker |
getTypeChecker()
|
boolean |
hasModuleInProgram(ModuleName moduleName)
Returns true iff the specified module is in the Program instance encapsulated by this WorkspaceManager. |
ExecutionContext |
makeExecutionContext(ExecutionContextProperties properties)
Factory method for creating a machine-specific execution context. |
ExecutionContext |
makeExecutionContextWithDefaultProperties()
Factory method for creating a machine-specific execution context with default values for the execution context's properties. |
CALExecutor |
makeExecutor(ExecutionContext context)
Factory method for creating a machine-specific executor. |
CALExecutor |
makeExecutorWithNewContext(ExecutionContextProperties properties)
Factory method for creating a machine-specific executor with a new execution context. |
CALExecutor |
makeExecutorWithNewContextAndDefaultProperties()
Factory method for creating a machine-specific executor with a new execution context and default values for the execution context's properties. |
CompilerMessage.Severity |
makeModule(ModuleSourceDefinition sourceDef,
CompilerMessageLogger logger)
Compile a module to the current program. |
CompilerMessage.Severity |
makeModule(ModuleSourceDefinition sourceDef,
CompilerMessageLogger logger,
ProgramModelManager.CompilationOptions options)
Compile a module to the current program. |
CompilerMessage.Severity |
makeModules(ModuleName[] moduleNames,
ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger)
Compile module(s) to the current program. |
CompilerMessage.Severity |
makeModules(ModuleName[] moduleNames,
ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
ProgramModelManager.CompilationOptions options)
Compile module(s) to the current program. |
protected ProgramModifier |
makeProgramModifier(ProgramModelManager.CompilationOptions options)
Makes a new disposable copy of the program modifier. |
boolean |
removeModule(ModuleName moduleName)
Remove a module from the program. |
void |
removeStatusListener(StatusListener listener)
|
void |
resetCachedResults(ExecutionContext context)
Discarded any cached (memoized) results in this program. |
void |
resetCachedResults(ModuleName moduleName,
ExecutionContext context)
Discard any cached (memoized) results in the named module and any dependent modules. |
void |
resetMachineState(ExecutionContext context)
Discarded the machine state, including any cached (memoized) results in this program. |
void |
resetMachineState(ModuleName moduleName,
ExecutionContext context)
Discard the machine state, including any cached (memoized) results in the named module and any dependent modules. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProgramModelManager(ProgramManager programManager)
programManager - the ProgramManager for this ProgramModelManager.| Method Detail |
|---|
protected ProgramModifier makeProgramModifier(ProgramModelManager.CompilationOptions options)
options - - the values for compiler options
public Compiler getCompiler()
public Compiler getCompiler(ProgramModelManager.CompilationOptions compilationOptions)
compilationOptions - the compilation options for the compiler.
public TypeChecker getTypeChecker()
public ExecutionContext makeExecutionContext(ExecutionContextProperties properties)
properties - the ExecutionContextProperties instance encapsulating an immutable map of key-value pairs which is exposed
as system properties from within CAL.
public ExecutionContext makeExecutionContextWithDefaultProperties()
public CALExecutor makeExecutor(ExecutionContext context)
context - the execution context to be used by the executor.
public CALExecutor makeExecutorWithNewContext(ExecutionContextProperties properties)
properties - the ExecutionContextProperties instance encapsulating an immutable map of key-value pairs which is exposed
as system properties from within CAL.
public CALExecutor makeExecutorWithNewContextAndDefaultProperties()
public void compile(ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
boolean dirtyModulesOnly,
StatusListener statusListener)
logger - the logger used to log error messages.dirtyModulesOnly - if true, only dirty (uncompiled or changed) modules will be compiled.statusListener - a listener, possibly null, for the status of the compilation process
public void compile(ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
boolean dirtyModulesOnly,
StatusListener statusListener,
ProgramModelManager.CompilationOptions options)
logger - the logger used to log error messages.dirtyModulesOnly - if true, only dirty (uncompiled or changed) modules will be compiled.statusListener - a listener, possibly null, for the status of the compilation processoptions - - values for compilation optionsprotected final ProgramManager getProgramManager()
public CompilerMessage.Severity makeModule(ModuleSourceDefinition sourceDef,
CompilerMessageLogger logger)
sourceDef - the ModuleSourceDefinition to compile.logger - the logger to use during the compile.
public CompilerMessage.Severity makeModule(ModuleSourceDefinition sourceDef,
CompilerMessageLogger logger,
ProgramModelManager.CompilationOptions options)
sourceDef - the ModuleSourceDefinition to compile.logger - the logger to use during the compile.options - - values for the compilation options
public CompilerMessage.Severity makeModules(ModuleName[] moduleNames,
ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger)
moduleNames - a list of the names of the changed modules.definitionGroup - the definition group from which the module definitions may be retrieved.logger - the logger to use during the compile.
public CompilerMessage.Severity makeModules(ModuleName[] moduleNames,
ModuleSourceDefinitionGroup definitionGroup,
CompilerMessageLogger logger,
ProgramModelManager.CompilationOptions options)
moduleNames - a list of the names of the changed modules.definitionGroup - the definition group from which the module definitions may be retrieved.logger - the logger to use during the compile.options - - the values for compilation options
public void addStatusListener(StatusListener listener)
listener - StatusListenerpublic void removeStatusListener(StatusListener listener)
listener - StatusListenerpublic void resetCachedResults(ExecutionContext context)
context - the context with which the cached results are associated.
public void resetCachedResults(ModuleName moduleName,
ExecutionContext context)
moduleName - context - the context with which the cached results are associated.public void resetMachineState(ExecutionContext context)
context - the context with which the machine state is associated.
public void resetMachineState(ModuleName moduleName,
ExecutionContext context)
moduleName - context - the context with which the machine state is associated.public final boolean removeModule(ModuleName moduleName)
moduleName - the name of the module to remove.
public Set<ModuleName> getDependentModuleNames(ModuleName targetModule)
targetModule -
public ModuleTypeInfo getModuleTypeInfo(ModuleName moduleName)
moduleName -
public org.openquark.cal.machine.Module getModule(ModuleName name)
name - the module name
public List<org.openquark.cal.machine.Module> getModules()
public boolean hasModuleInProgram(ModuleName moduleName)
moduleName - the name of the module to check.
public ModuleName[] getModuleNamesInProgram()
public int getNFunctionsInModule(ModuleName moduleName)
moduleName - the name of the module.
public org.openquark.cal.machine.MachineFunction getMachineFunction(QualifiedName functionName)
throws org.openquark.cal.machine.Program.ProgramException
functionName - the qualified name of the function.
org.openquark.cal.machine.Program.ProgramException - if the program does not contain the module for the function.public MachineType getMachineType()
public MachineStatistics getMachineStatistics()
public MachineStatistics getMachineStatisticsForModule(ModuleName moduleName)
moduleName -
|
![]() Quark Platform Documentation Version 1.7.0_0 Business Objects |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||