AddNode() public method

public AddNode ( String sourceId, ulong timeId, String nodeId ) : void
sourceId String
timeId ulong
nodeId String
return void
示例#1
0
        private static void AddNodeWithLabel(NetStreamSender stream, string sourceId, ref ulong timeId, string name)
        {
            if (lastNode != null)
                stream.RemoveNodeAttribute(sourceId, timeId++, lastNode, "ui.class");

            stream.AddNode(sourceId, timeId++, name);
            stream.AddNodeAttribute(sourceId, timeId++, name, "ui.label", name);
            stream.AddNodeAttribute(sourceId, timeId++, name, "ui.class", "active");
            lastNode = name;
        }
示例#2
0
        private static void AddNodeWithLabel(NetStreamSender stream, string sourceId, ref ulong timeId, string name)
        {
            if (lastNode != null)
            {
                stream.RemoveNodeAttribute(sourceId, timeId++, lastNode, "ui.class");
            }

            stream.AddNode(sourceId, timeId++, name);
            stream.AddNodeAttribute(sourceId, timeId++, name, "ui.label", name);
            stream.AddNodeAttribute(sourceId, timeId++, name, "ui.class", "active");
            lastNode = name;
        }
示例#3
0
        private static void Endless()
        {
            const string sourceId = "C++_netstream_test";
            ulong        timeId   = 0L;
            var          stream   = new NetStreamSender("default", "localhost", 2001);
            const string n1       = "node";

            while (timeId < 1000)
            {
                stream.AddNode(sourceId, timeId++, n1 + timeId);
            }
            stream.Close();
        }
示例#4
0
        private static void EventsTest()
        {
            const string sourceId = "C++_netstream_test";
            ulong        timeId   = 0L;
            var          stream   = new NetStreamSender("localhost", 2001);

            stream.AddNode(sourceId, timeId++, "node0");
            stream.AddEdge(sourceId, timeId++, "edge", "node0", "node1", true);
            stream.AddNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute", 0);
            stream.ChangeNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute", 0, 1);
            stream.RemoveNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute");
            stream.AddEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute", 0);
            stream.ChangeEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute", 0, 1);
            stream.RemoveEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute");
            stream.AddGraphAttribute(sourceId, timeId++, "graphAttribute", 0);
            stream.ChangeGraphAttribute(sourceId, timeId++, "graphAttribute", 0, 1);
            stream.RemoveGraphAttribute(sourceId, timeId++, "graphAttribute");
            stream.StepBegins(sourceId, timeId++, 1.1);
            stream.RemoveEdge(sourceId, timeId++, "edge");
            stream.RemoveNode(sourceId, timeId++, "node0");
            stream.GraphClear(sourceId, timeId++);
            stream.Close();
        }
示例#5
0
 private static void EventsTest()
 {
     const string sourceId = "C++_netstream_test";
     ulong timeId = 0L;
     var stream = new NetStreamSender("localhost", 2001);
     stream.AddNode(sourceId, timeId++, "node0");
     stream.AddEdge(sourceId, timeId++, "edge", "node0", "node1", true);
     stream.AddNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute", 0);
     stream.ChangeNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute", 0, 1);
     stream.RemoveNodeAttribute(sourceId, timeId++, "node0", "nodeAttribute");
     stream.AddEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute", 0);
     stream.ChangeEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute", 0, 1);
     stream.RemoveEdgeAttribute(sourceId, timeId++, "edge", "edgeAttribute");
     stream.AddGraphAttribute(sourceId, timeId++, "graphAttribute", 0);
     stream.ChangeGraphAttribute(sourceId, timeId++, "graphAttribute", 0, 1);
     stream.RemoveGraphAttribute(sourceId, timeId++, "graphAttribute");
     stream.StepBegins(sourceId, timeId++, 1.1);
     stream.RemoveEdge(sourceId, timeId++, "edge");
     stream.RemoveNode(sourceId, timeId++, "node0");
     stream.GraphClear(sourceId, timeId++);
     stream.Close();
 }
示例#6
0
 private static void Endless()
 {
     const string sourceId = "C++_netstream_test";
     ulong timeId = 0L;
     var stream = new NetStreamSender("default", "localhost", 2001);
     const string n1 = "node";
     while (timeId < 1000)
     {
         stream.AddNode(sourceId, timeId++, n1 + timeId);
     }
     stream.Close();
 }