void NetStreamSender::graphClear(const string & source_id, long time_id){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_CLEARED); event.writeString(source_id); event.writeLong(time_id); _sendEvent(event); }
void NetStreamSender::removeGraphAttribute(const string & source_id, long time_id, const string & attribute){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_DEL_GRAPH_ATTR); event.writeString(source_id); event.writeLong(time_id); event.writeString(attribute); _sendEvent(event); }
void NetStreamSender::stepBegins(const string & source_id, long time_id, double timestamp){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_STEP); event.writeString(source_id); event.writeLong(time_id); event.writeDouble(timestamp); _sendEvent(event); }
void NetStreamSender::removeEdge(const string & source_id, long time_id, const string & edge_id){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_DEL_EDGE); event.writeString(source_id); event.writeLong(time_id); event.writeString(edge_id); _sendEvent(event); }
// ================== // = Element events = // ================== void NetStreamSender::addNode(const string & source_id, long time_id, const string & node_id){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_ADD_NODE); event.writeString(source_id); event.writeLong(time_id); event.writeString(node_id); _sendEvent(event); }
void NetStreamSender::addEdge(const string & source_id, long time_id, const string & edge_id, const string & from_node, const string & to_node, bool directed){ NetStreamStorage event = NetStreamStorage(); event.writeByte(EVENT_ADD_EDGE); event.writeString(source_id); event.writeLong(time_id); event.writeString(edge_id); event.writeString(from_node); event.writeString(to_node); event.writeByte(directed?1:0); _sendEvent(event); }
void NetStreamSender::_encode(NetStreamStorage & event, const vector<long> & value){ event.writeInt(value.size()); for(vector<long>::const_iterator i = value.begin(); i != value.end(); i++){ event.writeLong((*i)); } }
void NetStreamSender::_encode(NetStreamStorage & event, long value){ event.writeLong(value); }