public CodegenExpressionRef GetAddInitSvc(CodegenMethodScope scope) { if (optionalInitServicesRef == null) { optionalInitServicesRef = REF_INITSVC; } scope.AddSymbol(optionalInitServicesRef); return optionalInitServicesRef; }
public CodegenExpressionRef GetAddLeftResult(CodegenMethodScope scope) { if (optionalLeftResult == null) { optionalLeftResult = REF_LEFTRESULT; } scope.AddSymbol(optionalLeftResult); return optionalLeftResult; }
public CodegenExpressionRef GetAddEventType(CodegenMethodScope scope) { if (optionalEventTypeRef == null) { optionalEventTypeRef = REF_EVENTTYPE; } scope.AddSymbol(optionalEventTypeRef); return optionalEventTypeRef; }
public CodegenExpressionRef GetAddEvent(CodegenMethodScope scope) { if (optionalEventRef == null) { optionalEventRef = Ref("@event"); } scope.AddSymbol(optionalEventRef); return optionalEventRef; }
public CodegenExpressionRef GetAddMatchingEvents(CodegenMethodScope scope) { if (optionalMatchingEventRef == null) { optionalMatchingEventRef = REF_MATCHINGEVENTS; } scope.AddSymbol(optionalMatchingEventRef); return optionalMatchingEventRef; }
public CodegenExpressionRef GetAddExprEvalCtx(CodegenMethodScope scope) { if (optionalExprEvalCtxRef == null) { optionalExprEvalCtxRef = ExprForgeCodegenNames.REF_EXPREVALCONTEXT; } scope.AddSymbol(optionalExprEvalCtxRef); return optionalExprEvalCtxRef; }
public CodegenExpressionRef GetAddState(CodegenMethodScope scope) { if (optionalStateRef == null) { optionalStateRef = REF_AGENTSTATE; } scope.AddSymbol(optionalStateRef); return optionalStateRef; }
// -------------------------------------------------------------------------------- // Adding the following elements to scope is a fundamental wash because the // scope for a lambda is the same as it's parent (assuming we're dealing with // a lambda). // -------------------------------------------------------------------------------- public CodegenExpressionRef GetAddEPS(CodegenMethodScope scope) { if (optionalEPSRef == null) { optionalEPSRef = ExprForgeCodegenNames.REF_EPS; } scope.AddSymbol(optionalEPSRef); return optionalEPSRef; }
public CodegenExpression GetAddIsNewData(CodegenMethodScope scope) { if (newDataValue != null) { // new-data can be a const return Constant(newDataValue); } if (optionalIsNewDataRef == null) { optionalIsNewDataRef = ExprForgeCodegenNames.REF_ISNEWDATA; } scope.AddSymbol(optionalIsNewDataRef); return optionalIsNewDataRef; }
// -------------------------------------------------------------------------------- public CodegenExpressionRef GetAddRequiredUnderlying( CodegenMethodScope scope, int streamNum, EventType eventType, bool optionalEvent) { if (underlyingStreamNums.IsEmpty()) { underlyingStreamNums = new Dictionary<int, EventTypeWithOptionalFlag>(); } var existing = underlyingStreamNums.Get(streamNum); if (existing != null) { scope.AddSymbol(existing.Ref); return existing.Ref; } var assigned = Ref("u" + currentParamNum); underlyingStreamNums.Put(streamNum, new EventTypeWithOptionalFlag(assigned, eventType, optionalEvent)); currentParamNum++; scope.AddSymbol(assigned); return assigned; }