Ejemplo n.º 1
0
 internal override bool Traverse(ScopeTree.DirectedScopeTreeVisitor visitor)
 {
     if (visitor(base.Scope))
     {
         return(ScopeTreeNode.TraverseNode(visitor, m_parentScope));
     }
     return(false);
 }
Ejemplo n.º 2
0
 private void AddScope(ScopeTreeNode scopeNode, IRIFDataScope scope)
 {
     m_activeScopes  = m_activeScopes.Add(scopeNode);
     m_scopes[scope] = scopeNode;
     if (!string.IsNullOrEmpty(scopeNode.ScopeName))
     {
         m_scopesByName[scopeNode.ScopeName] = scopeNode;
     }
 }
Ejemplo n.º 3
0
 private void AddCanonicalCellScope(ScopeTreeNode rowScope, ScopeTreeNode colScope, ScopeTreeNode cellScope)
 {
     if (!m_canonicalCellScopes.TryGetValue(rowScope.Scope.Name, out Dictionary <string, ScopeTreeNode> value))
     {
         value = new Dictionary <string, ScopeTreeNode>();
         m_canonicalCellScopes.Add(rowScope.Scope.Name, value);
     }
     value[colScope.Scope.Name] = cellScope;
 }
Ejemplo n.º 4
0
 private bool TryGetCanonicalCellScope(ScopeTreeNode rowScope, ScopeTreeNode colScope, out ScopeTreeNode canonicalCellScope)
 {
     if (m_canonicalCellScopes.TryGetValue(rowScope.Scope.Name, out Dictionary <string, ScopeTreeNode> value) && value.TryGetValue(colScope.Scope.Name, out canonicalCellScope))
     {
         return(true);
     }
     canonicalCellScope = null;
     return(false);
 }
Ejemplo n.º 5
0
 internal SubScopeNode(IRIFDataScope scope, ScopeTreeNode parentScope)
     : base(scope)
 {
     m_parentScope = parentScope;
     if (m_parentScope != null)
     {
         m_parentScope.AddChildScope(scope);
     }
 }
Ejemplo n.º 6
0
 internal IntersectScopeNode(IRIFDataScope scope, ScopeTreeNode parentRowScope, ScopeTreeNode parentColScope)
     : base(scope)
 {
     m_parentRowScope = parentRowScope;
     if (m_parentRowScope != null)
     {
         m_parentRowScope.AddChildScope(scope);
     }
     m_parentColumnScope = parentColScope;
     if (m_parentColumnScope != null)
     {
         m_parentColumnScope.AddChildScope(scope);
     }
     m_peerDataCells = new List <IRIFDataScope>();
 }
Ejemplo n.º 7
0
 private void AddScope(ScopeTreeNode scopeNode)
 {
     AddScope(scopeNode, scopeNode.Scope);
 }
Ejemplo n.º 8
0
 protected static bool TraverseNode(ScopeTree.DirectedScopeTreeVisitor visitor, ScopeTreeNode node)
 {
     return(node?.Traverse(visitor) ?? true);
 }