void OnStartEdge(int kind, int _id, int _sourceID, int _targetID, const AttrMap & attrs) { std::string id = UIntToString(_id); if (m_edgeStructs.find(id) == m_edgeStructs.end()) { std::string sourceID = UIntToString(_sourceID); std::string targetID = UIntToString(_targetID); m_edgeStructs[id] = new CDotEdge(kind, id, sourceID, targetID, attrs); } }
KDssize KD_APIENTRY Ultostr(KDchar *buffer, KDsize buflen, KDuint number, KDint base) { EVENT("(KDchar *buffer = 0x%0.8p, KDsize buflen = %d, KDuint number = %d, KDint base = %d)", buffer, buflen, number, base); return UIntToString(buffer, buflen, number, base); }
void NetInOrderTestCallback(NetSender* conn, NetMessage& msg) { UNUSED(conn); std::string orderTestDebugString = "\nNetInOrderTestCallback => "; BinaryBufferParser bp(msg.messageBuffer, msg.GetMessageLength() + msg.GetHeaderLength()); uint16_t msgLen = bp.ReadNextUShort(); UNUSED(msgLen); Byte msgType = bp.ReadNextUChar(); UNUSED(msgType); uint16_t msgReliableID; if (msg.IsReliable()) { msgReliableID = bp.ReadNextUShort(); } uint16_t msgOrderID; if (msg.IsInOrder()) { msgOrderID = bp.ReadNextUShort(); } unsigned int msgTestNum = bp.ReadNextUInt(); orderTestDebugString += UIntToString(msgTestNum); ConsolePrintString(orderTestDebugString); OUTPUT_STRING_TO_CONSOLE(orderTestDebugString, 1000); }
std::string valueToString( unsigned int value ) { char buffer[32]; char *current = buffer + sizeof(buffer); UIntToString( value, current ); assert( current >= buffer ); return current; }
void OnStartVertex(int _id, const AttrMap & attrs) { std::string id = UIntToString(_id); if (m_vertexStructs.find(id) == m_vertexStructs.end()) { IVertexPtr v = GetVertex(m_graph, m_clusterStack.top(), id, m_merge); m_vertexStructs[id] = new CDotVertex(id, attrs); v->SetProperty(DOT_PROP_CDOTITEM, m_vertexStructs[id]); } }
static AString GetVar(UInt32 index) { AString res = "$"; if (index < 10) res += UIntToString(index); else if (index < 20) { res += "R"; res += UIntToString(index - 10); } else if (index < 20 + kNumVarStrings) res += kVarStrings[index - 20]; else { res += "["; res += UIntToString(index); res += "]"; } return res; }
std::string valueToString( Value::Int value ) { char buffer[32]; char *current = buffer + sizeof(buffer); bool isNegative = value < 0; if ( isNegative ) value = -value; UIntToString( (unsigned int)(value), current ); if ( isNegative ) *--current = '-'; assert( current >= buffer ); return current; }
static AString GetShellString(int index) { AString res = "$"; if (index < kNumShellStrings) { const char *sz = kShellStrings[index]; if (sz[0] != 0) return res + sz; } res += "SHELL["; res += UIntToString(index); res += "]"; return res; }
void CGraphItem::SetID(unsigned int id) { m_id = id; m_idString = UIntToString(id); }
const char *UpdateFloorText(void) { static char floorText[] = "00"; // Needs to be static because it's used by the system later. UIntToString(floorText,GetCurrentFloor()); return floorText; }