Beispiel #1
0
 internal override bool Traverse(ScopeTree.DirectedScopeTreeVisitor visitor)
 {
     if (visitor(base.Scope))
     {
         return(ScopeTreeNode.TraverseNode(visitor, m_parentScope));
     }
     return(false);
 }
 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;
     }
 }
 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;
 }
 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);
 }
Beispiel #5
0
 internal SubScopeNode(IRIFDataScope scope, ScopeTreeNode parentScope)
     : base(scope)
 {
     m_parentScope = parentScope;
     if (m_parentScope != null)
     {
         m_parentScope.AddChildScope(scope);
     }
 }
Beispiel #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>();
 }
 private void AddScope(ScopeTreeNode scopeNode)
 {
     AddScope(scopeNode, scopeNode.Scope);
 }
Beispiel #8
0
 protected static bool TraverseNode(ScopeTree.DirectedScopeTreeVisitor visitor, ScopeTreeNode node)
 {
     return(node?.Traverse(visitor) ?? true);
 }