2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04: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

@ -117,7 +117,7 @@ void pyAgeInfoStruct::SetAgeDescription( const char * v )
const char * pyAgeInfoStruct::GetAgeInstanceGuid() const
{
fAgeInstanceGuidStr = fAgeInfo.GetAgeInstanceGuid()->AsStdString();
fAgeInstanceGuidStr = fAgeInfo.GetAgeInstanceGuid()->AsString();
return fAgeInstanceGuidStr.c_str();
}
@ -161,9 +161,9 @@ const char * pyAgeInfoStruct::GetDisplayName() const
{
Int32 seq = GetAgeSequenceNumber();
if ( seq>0 )
xtl::format( fDisplayName, "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
fDisplayName = plString::Format( "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
else
xtl::format( fDisplayName, "%s %s", GetAgeUserDefinedName(), GetAgeInstanceName() );
fDisplayName = plString::Format( "%s %s", GetAgeUserDefinedName(), GetAgeInstanceName() );
return fDisplayName.c_str();
}
@ -214,7 +214,7 @@ void pyAgeInfoStructRef::SetAgeUserDefinedName( const char * v )
const char * pyAgeInfoStructRef::GetAgeInstanceGuid() const
{
fAgeInstanceGuidStr = fAgeInfo.GetAgeInstanceGuid()->AsStdString();
fAgeInstanceGuidStr = fAgeInfo.GetAgeInstanceGuid()->AsString();
return fAgeInstanceGuidStr.c_str();
}
@ -237,8 +237,8 @@ const char * pyAgeInfoStructRef::GetDisplayName() const
{
Int32 seq = GetAgeSequenceNumber();
if ( seq>0 )
xtl::format( fDisplayName, "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
fDisplayName = plString::Format( "%s (%d) %s", GetAgeUserDefinedName(), seq, GetAgeInstanceName() );
else
xtl::format( fDisplayName, "%s %s", GetAgeUserDefinedName(), GetAgeInstanceName() );
fDisplayName = plString::Format( "%s %s", GetAgeUserDefinedName(), GetAgeInstanceName() );
return fDisplayName.c_str();
}

View File

@ -57,14 +57,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class pyVaultAgeInfoNode;
class pyAgeInfoStructRef;
class plString;
class pyAgeInfoStruct
{
private:
plAgeInfoStruct fAgeInfo;
mutable std::string fAgeInstanceGuidStr; // for getting Age Instance GUID
mutable std::string fDisplayName; // used by GetDisplayName()
mutable plString fAgeInstanceGuidStr; // for getting Age Instance GUID
mutable plString fDisplayName; // used by GetDisplayName()
protected:
pyAgeInfoStruct();
@ -112,8 +113,8 @@ private:
static plAgeInfoStruct fDefaultAgeInfo; // created so a default constructor could be made for python. Do NOT use
plAgeInfoStruct & fAgeInfo;
mutable std::string fAgeInstanceGuidStr; // for getting Age Instance GUID
mutable std::string fDisplayName; // used by GetDisplayName()
mutable plString fAgeInstanceGuidStr; // for getting Age Instance GUID
mutable plString fDisplayName; // used by GetDisplayName()
protected:
pyAgeInfoStructRef(): fAgeInfo( fDefaultAgeInfo ) {} // only here for the python glue... do NOT call directly

View File

@ -92,7 +92,7 @@ public:
UInt8 GetServerType() const { return fInfo.GetServerType(); }
const char * GetServerAddr() const { return fInfo.GetServerAddr(); }
UInt16 GetServerPort() const { return fInfo.GetServerPort(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString().c_str(); }
};
@ -132,7 +132,7 @@ public:
UInt8 GetServerType() const { return fInfo.GetServerType(); }
const char * GetServerAddr() const { return fInfo.GetServerAddr(); }
UInt16 GetServerPort() const { return fInfo.GetServerPort(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString(); }
const char * GetServerGuid() const { fServerGuid.CopyFrom( fInfo.GetServerGuid() ); return fServerGuid.AsString().c_str(); }
};