本文整理汇总了C++中NetStreamStorage::writeByte方法的典型用法代码示例。如果您正苦于以下问题:C++ NetStreamStorage::writeByte方法的具体用法?C++ NetStreamStorage::writeByte怎么用?C++ NetStreamStorage::writeByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetStreamStorage
的用法示例。
在下文中一共展示了NetStreamStorage::writeByte方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addEdge
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);
}
示例2: addEdge
void NetStreamSender::addEdge(const GS_STRING & source_id, GS_LONG time_id, const GS_STRING & edge_id, const GS_STRING & from_node, const GS_STRING & to_node, GS_BOOL directed){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_ADD_EDGE);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
event.writeString(edge_id);
event.writeString(from_node);
event.writeString(to_node);
event.writeByte(directed?1:0);
_sendEvent(event);
}
示例3: graphClear
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);
}
示例4: graphClear
void NetStreamSender::graphClear(const GS_STRING & source_id, GS_LONG time_id){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_CLEARED);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
_sendEvent(event);
}
示例5: removeGraphAttribute
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);
}
示例6: stepBegins
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);
}
示例7: removeEdge
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);
}
示例8: addNode
// ==================
// = 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);
}
示例9: removeGraphAttribute
void NetStreamSender::removeGraphAttribute(const GS_STRING & source_id, GS_LONG time_id, const GS_STRING & attribute){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_DEL_GRAPH_ATTR);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
event.writeString(attribute);
_sendEvent(event);
}
示例10: stepBegins
void NetStreamSender::stepBegins(const GS_STRING & source_id, GS_LONG time_id, GS_DOUBLE timestamp){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_STEP);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
event.writeDouble(timestamp);
_sendEvent(event);
}
示例11: removeEdge
void NetStreamSender::removeEdge(const GS_STRING & source_id, GS_LONG time_id, const GS_STRING & edge_id){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_DEL_EDGE);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
event.writeString(edge_id);
_sendEvent(event);
}
示例12: addNode
// ==================
// = Element events =
// ==================
void NetStreamSender::addNode(const GS_STRING & source_id, GS_LONG time_id, const GS_STRING & node_id){
NetStreamStorage event = NetStreamStorage();
event.writeByte(EVENT_ADD_NODE);
event.writeString(source_id);
event.writeUnsignedVarInt(time_id);
event.writeString(node_id);
_sendEvent(event);
}
示例13: _encode
void NetStreamSender::_encode(NetStreamStorage & event, const vector<bool> & value){
event.writeInt(value.size());
for(vector<bool>::const_iterator i = value.begin(); i != value.end(); i++){
event.writeByte((*i));
}
}
示例14: _encode
// =================
// = data encoding =
// =================
void NetStreamSender::_encode(NetStreamStorage & event, GS_CHAR value){
event.writeByte((GS_INT)value);
}