1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Convert plUUID and its cascade of dependencies to plString

This commit is contained in:
2012-01-25 21:17:35 -08:00
parent acd47d9f91
commit a1852ad385
16 changed files with 135 additions and 111 deletions

View File

@ -256,6 +256,18 @@ int plMsgStdStringHelper::PokeBig(const char * buf, UInt32 bufsz, hsStream* stre
return stream->GetPosition();
}
int plMsgStdStringHelper::Poke(const plString & stringref, hsStream* stream, const UInt32 peekOptions)
{
std::string temp = stringref.c_str();
return Poke(temp, stream, peekOptions);
}
int plMsgStdStringHelper::PokeBig(const plString & stringref, hsStream* stream, const UInt32 peekOptions)
{
std::string temp = stringref.c_str();
return PokeBig(temp, stream, peekOptions);
}
// STATIC
int plMsgStdStringHelper::Peek(std::string & stringref, hsStream* stream, const UInt32 peekOptions)
{
@ -301,6 +313,22 @@ int plMsgStdStringHelper::PeekBig(std::string & stringref, hsStream* stream, co
return stream->GetPosition();
}
int plMsgStdStringHelper::Peek(plString & stringref, hsStream* stream, const UInt32 peekOptions)
{
std::string temp;
int pos = Peek(temp, stream, peekOptions);
stringref = plString::FromIso8859_1(temp.c_str(), temp.size());
return pos;
}
int plMsgStdStringHelper::PeekBig(plString & stringref, hsStream* stream, const UInt32 peekOptions)
{
std::string temp;
int pos = PeekBig(temp, stream, peekOptions);
stringref = plString::FromIso8859_1(temp.c_str(), temp.size());
return pos;
}
/////////////////////////////////////////////////////////////////
// STATIC

View File

@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class plKey;
class hsStream;
class plString;
// Base class for messages only has enough info to route it
// and send it over the wire (Read/Write).
@ -171,8 +172,12 @@ struct plMsgStdStringHelper
static int PokeBig(const std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int PokeBig(const char * buf, UInt32 bufsz, hsStream* stream, const UInt32 peekOptions=0);
static int Poke(const plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PokeBig(const plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PeekBig(std::string & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int Peek(plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
static int PeekBig(plString & stringref, hsStream* stream, const UInt32 peekOptions=0);
};
/////////////////////////////////////////////////////////////////