Search in sources :

Example 1 with SimpleScopeInstance

use of pcgen.base.formula.inst.SimpleScopeInstance in project pcgen by PCGen.

the class LoadContextInst method dropIntoContext.

private LoadContext dropIntoContext(LegalScope lvs) {
    LegalScope parent = lvs.getParentScope();
    if (parent == null) {
        //is Global
        return this;
    }
    LoadContext parentLC = dropIntoContext(parent);
    SimpleScopeInstance localInst = new SimpleScopeInstance(parentLC.getActiveScope(), lvs, new DummyVarScoped(lvs));
    return new DerivedLoadContext(parentLC, localInst);
}
Also used : SimpleScopeInstance(pcgen.base.formula.inst.SimpleScopeInstance) LegalScope(pcgen.base.formula.base.LegalScope)

Example 2 with SimpleScopeInstance

use of pcgen.base.formula.inst.SimpleScopeInstance in project pcgen by PCGen.

the class LoadContextInst method getActiveScope.

@Override
public ScopeInstance getActiveScope() {
    if (scopeInst == null) {
        LegalScope legalScope = var.getScope("Global");
        scopeInst = new SimpleScopeInstance(null, legalScope, new DummyVarScoped(legalScope));
    }
    return scopeInst;
}
Also used : SimpleScopeInstance(pcgen.base.formula.inst.SimpleScopeInstance) LegalScope(pcgen.base.formula.base.LegalScope)

Aggregations

LegalScope (pcgen.base.formula.base.LegalScope)2 SimpleScopeInstance (pcgen.base.formula.inst.SimpleScopeInstance)2