Ens.BPL.Compiler
class Ens.BPL.Compiler extends %Library.RegisteredObject
This is the BPL Compiler. It it called during the compilation process of subclasses of Ens.BusinessProcessBPL to generate the business process runtime classes. These debug flags affect the diagnostic output of the compiler:- ^Ens.Debug("ShowGeneratedXML") - Displays XML reconstructed from the parse tree to the current device.Property Inventory
- BreakStack
- CompensationHandlers
- Context
- ContextStack
- ContinueStack
- CurrentMethod
- CurrentStateCounter
- CurrentThread
- Language
- MethodCounter
- MethodStack
- Process
- PropertiesToNew
- PyMethodCounter
- StateCounterStack
- StateStack
- ThreadCounter
- ThreadStack
Method Inventory
- CompileStream()
- CreateAlarmCall()
- CurrentMethodGet()
- CurrentStateCounterGet()
- CurrentThreadGet()
- EndMethod()
- EndResponseMethod()
- EndThread()
- EvaluateIndirection()
- GenerateClass()
- GenerateCode()
- GenerateXML()
- GetStateForLabel()
- LanguageGet()
- StartMethod()
- StartThread()
Parameters
parameter ObjectScriptVariableNameForPythonReturn = ensPyExecReturnVariable;
Reserved variable name for result of Python method invocation.
Required to support handling of status error and stack unwind
Properties
property BreakStack as Ens.BPL.Stack;
This holds the stack of states which may be broken to
Property methods: BreakStackGet(), BreakStackGetSwizzled(), BreakStackIsValid(), BreakStackNewObject(), BreakStackSet()
property CompensationHandlers as %String [ MultiDimensional ];
This holds the collection of compensatation handlers
which are active for the current scope
Property methods: CompensationHandlersDisplayToLogical(), CompensationHandlersGet(), CompensationHandlersIsValid(), CompensationHandlersLogicalToDisplay(), CompensationHandlersLogicalToOdbc(), CompensationHandlersNormalize(), CompensationHandlersSet()
property Context as %Dictionary.ClassDefinition;
This holds the business class being generated
Property methods: ContextGet(), ContextGetObject(), ContextGetObjectId(), ContextGetSwizzled(), ContextIsValid(), ContextNewObject(), ContextSet(), ContextSetObject(), ContextSetObjectId(), ContextUnSwizzle()
property ContextStack as Ens.BPL.ContextStack;
This holds the current context of the compilation. It supports
a 'Path' property which defines the current position in the nesting
hierarchy of the parse tree being traversed.
Property methods: ContextStackGet(), ContextStackGetSwizzled(), ContextStackIsValid(), ContextStackNewObject(), ContextStackSet()
property ContinueStack as Ens.BPL.Stack;
This holds the stack of states which may be continued to
Property methods: ContinueStackGet(), ContinueStackGetSwizzled(), ContinueStackIsValid(), ContinueStackNewObject(), ContinueStackSet()
property CurrentMethod as %Dictionary.MethodDefinition [ Calculated ];
This holds the current method being generated
property CurrentStateCounter as Ens.BPL.Counter [ Calculated ];
This holds the counter for the current state
property CurrentThread as Ens.BPL.CompilerThread [ Calculated ];
This holds the current thread being generated
property Language as %String;
This holds the language for the generated classes
Property methods: LanguageDisplayToLogical(), LanguageIsValid(), LanguageLogicalToDisplay(), LanguageLogicalToOdbc(), LanguageNormalize(), LanguageSet()
property MethodCounter as Ens.BPL.Counter;
This holds the method counter
Property methods: MethodCounterGet(), MethodCounterGetSwizzled(), MethodCounterIsValid(), MethodCounterNewObject(), MethodCounterSet()
property MethodStack as Ens.BPL.Stack;
This holds the stack of methods being generated
Property methods: MethodStackGet(), MethodStackGetSwizzled(), MethodStackIsValid(), MethodStackNewObject(), MethodStackSet()
property Process as Ens.BPL.Process;
This holds the root of the parse tree being compiled
Property methods: ProcessGet(), ProcessGetSwizzled(), ProcessIsValid(), ProcessNewObject(), ProcessSet()
property PropertiesToNew as list of %String;
This holds the list of properties which must be instantiated
in the %OnNew() method of the context class
Property methods: PropertiesToNewBuildValueArray(), PropertiesToNewCollectionToDisplay(), PropertiesToNewCollectionToOdbc(), PropertiesToNewDisplayToCollection(), PropertiesToNewDisplayToLogical(), PropertiesToNewGet(), PropertiesToNewGetObject(), PropertiesToNewGetObjectId(), PropertiesToNewGetSwizzled(), PropertiesToNewIsValid(), PropertiesToNewLogicalToDisplay(), PropertiesToNewLogicalToOdbc(), PropertiesToNewNormalize(), PropertiesToNewOdbcToCollection(), PropertiesToNewSet(), PropertiesToNewSetObject(), PropertiesToNewSetObjectId()
property PyMethodCounter as Ens.BPL.Counter;
Counter for Python Method name suffix
to ensure unique method name regardless of thread or context location
Property methods: PyMethodCounterGet(), PyMethodCounterGetSwizzled(), PyMethodCounterIsValid(), PyMethodCounterNewObject(), PyMethodCounterSet()
property StateCounterStack as Ens.BPL.Counter;
This holds the state counter
Property methods: StateCounterStackGet(), StateCounterStackGetSwizzled(), StateCounterStackIsValid(), StateCounterStackNewObject(), StateCounterStackSet()
property StateStack as Ens.BPL.Stack;
This holds the stack of states
Property methods: StateStackGet(), StateStackGetSwizzled(), StateStackIsValid(), StateStackNewObject(), StateStackSet()
property ThreadCounter as Ens.BPL.Counter;
This holds the thread counter
Property methods: ThreadCounterGet(), ThreadCounterGetSwizzled(), ThreadCounterIsValid(), ThreadCounterNewObject(), ThreadCounterSet()
property ThreadStack as Ens.BPL.Stack;
This holds the stack of thread classes being generated. There is at minimum
a single thread class which implements the top-level activities of the process.
Property methods: ThreadStackGet(), ThreadStackGetSwizzled(), ThreadStackIsValid(), ThreadStackNewObject(), ThreadStackSet()
Methods
classmethod CompileStream(pStream As %BinaryStream, pPackage As %String) as %Status
Parse the BPL contained in the supplied stream and generate/compile
the resulting Business Process and its supporting Classes. The Package parameter
must contain the name of the cache package prefix which will be prepended to the
names of the generated classes
method CreateAlarmCall(Output pCall As Ens.BPL.Call, pCallName As %String, pDuration As %String, pUntil As %String = "") as %Status
method CurrentMethodGet() as %Dictionary.MethodDefinition
Accessor for the CurrentMethod property.
method CurrentStateCounterGet() as Ens.BPL.Counter
Accessor for the CurrentStateCounter property.
method CurrentThreadGet() as Ens.BPL.CompilerThread
Accessor for the CurrentThread property.
method EndMethod() as %Status
method EndResponseMethod() as %Status
method EndThread() as %Status
method GenerateClass() as %Status
classmethod GenerateCode(pProcess As Ens.BPL.Process) as %Status
Given the root of the parse tree, ( an instance of Ens.BPL.Process ), generate
the classes corresponding to the process definition
classmethod GenerateXML(pProcess As Ens.BPL.Process) as %Status
method LanguageGet() as %String
Accesor for Language
method StartMethod(pName As %String, pThread As Ens.BPL.CompilerThread, pThreadMethod=1, pContext=0) as %Status
Generate definition
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()