示例#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);
     }
 }
示例#2
0
 public void addVertex(string containingKey, string thisKey)
 {
     Attributed val = new Attributed("label", thisKey);
     _builder.add(containingKey, thisKey, val, false);
 }
示例#3
0
 public void addSubgraph(string containingKey, string thisKey)
 {
     Attributed val = new Attributed("label", thisKey);
     _builder.add(containingKey, thisKey, val, true);
 }
示例#4
0
 public void clearAttribs()
 {
     _mainGraphAttribs = new Attributed();
     _subgraphAttribs = new Attributed();
     _mainGraphNodeAttribs = new Attributed();
     _subgraphNodeAttribs = new Attributed();
 }
示例#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);
     }
 }