Esempio n. 1
0
 public Attributed(Attributed a)
 {
     string val;
     foreach (string key in a._attribs.Keys)
     {
         if (!_attribs.TryGetValue(key, out val))
         {
             throw new Exception("shouldn't get here if single-threaded");
         }
         _attribs.Add(key, val);
     }
 }
Esempio n. 2
0
 public void addVertex(string containingKey, string thisKey)
 {
     Attributed val = new Attributed("label", thisKey);
     _builder.add(containingKey, thisKey, val, false);
 }
Esempio n. 3
0
 public void addSubgraph(string containingKey, string thisKey)
 {
     Attributed val = new Attributed("label", thisKey);
     _builder.add(containingKey, thisKey, val, true);
 }
Esempio n. 4
0
 public void clearAttribs()
 {
     _mainGraphAttribs = new Attributed();
     _subgraphAttribs = new Attributed();
     _mainGraphNodeAttribs = new Attributed();
     _subgraphNodeAttribs = new Attributed();
 }
Esempio n. 5
0
 // append entries from src into this
 // on matching keys, overwrite with values from src
 public void graft(Attributed src)
 {
     foreach (KeyValuePair<string, string> kvp in src.attribs)
     {
         if (hasKey(kvp.Key))
             attribs[kvp.Key] = kvp.Value;
         else
             attribs.Add(kvp.Key, kvp.Value);
     }
 }