コード例 #1
0
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);  
}
コード例 #2
0
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);
}
コード例 #3
0
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);
}
コード例 #4
0
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);
}
コード例 #5
0
// ==================
// = 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);
}
コード例 #6
0
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);
}
コード例 #7
0
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));
  }  
}
コード例 #8
0
void NetStreamSender::_encode(NetStreamStorage & event, long value){
  event.writeLong(value);
}