2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Remove global Windows.h include

This is the beginning of efforts to reduce the scope of Windows.h. I have
shuttled it into hsWindows.h (again) and fixed the compilation of the
major apps. There is still some scope work that needs to be done, and the
Max plugin has not yet been addressed.
This commit is contained in:
2012-11-17 16:11:17 -05:00
parent 5de87cdaca
commit 7785c9c85e
71 changed files with 223 additions and 151 deletions

View File

@ -184,18 +184,16 @@ PyObject* pyAgeVault::GetSubAgeLink( const pyAgeInfoStruct & info )
PYTHON_RETURN_NONE;
}
const char* pyAgeVault::GetAgeGuid( void )
plUUID pyAgeVault::GetAgeGuid( void )
{
RelVaultNode * rvn = VaultGetAgeInfoNodeIncRef();
if (rvn) {
VaultAgeInfoNode ageInfo(rvn);
GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid));
plUUID uuid = plUUID(ageInfo.ageInstUuid);
rvn->DecRef();
return uuid;
}
else {
fAgeGuid[0] = 0;
}
return fAgeGuid;
return plUUID();
}

View File

@ -64,12 +64,10 @@ class pyAgeInfoStruct;
class pyVaultChronicleNode;
class pySDLStateDataRecord;
class pyVaultTextNoteNode;
class plUUID;
class pyAgeVault
{
private:
mutable char fAgeGuid[MAX_PATH]; // for getting Age GUID
protected:
pyAgeVault();
@ -84,7 +82,7 @@ public:
static void AddPlasmaClasses(PyObject *m);
const char* GetAgeGuid( void );
plUUID GetAgeGuid( void );
PyObject * GetAgeSDL() const; // returns pySDLStateDataRecord
void UpdateAgeSDL( pySDLStateDataRecord & pyrec );

View File

@ -117,7 +117,7 @@ PYTHON_METHOD_DEFINITION(ptAgeVault, getSubAgeLink, args)
PYTHON_METHOD_DEFINITION_NOARGS(ptAgeVault, getAgeGuid)
{
return PyString_FromString(self->fThis->GetAgeGuid());
return PyString_FromString(self->fThis->GetAgeGuid().AsString().c_str());
}
PYTHON_METHOD_DEFINITION(ptAgeVault, addDevice, args)

View File

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop
#include "pyDniInfoSource.h"
#include "pnUtils/pnUtils.h"
#include "pnUUID/pnUUID.h"
#include "plUnifiedTime/plUnifiedTime.h"
#include "plVault/plAgeInfoSource.h"
#include "plVault/plVault.h"
@ -100,16 +100,16 @@ const char * pyDniInfoSource::GetAgeName( void ) const
return fAgeName;
}
const char * pyDniInfoSource::GetAgeGuid( void ) const
plUUID pyDniInfoSource::GetAgeGuid( void ) const
{
RelVaultNode * node = VaultGetAgeInfoNodeIncRef();
if (!node)
return "";
if (RelVaultNode * node = VaultGetAgeInfoNodeIncRef())
{
VaultAgeInfoNode ageInfo(node);
plUUID uuid = plUUID(ageInfo.ageInstUuid);
node->DecRef();
VaultAgeInfoNode ageInfo(node);
return uuid;
}
GuidToString(ageInfo.ageInstUuid, fAgeGuid, arrsize(fAgeGuid));
node->DecRef();
return fAgeGuid;
return plUUID();
}

View File

@ -46,12 +46,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGlueHelpers.h"
class pyDniCoordinates;
class plUUID;
class pyDniInfoSource
{
private:
mutable char * fAgeName;
mutable char fAgeGuid[MAX_PATH];
protected:
pyDniInfoSource();
@ -74,7 +74,7 @@ public:
// name of current age
const char * GetAgeName( void ) const;
// unique identifier for this age instance
const char * GetAgeGuid( void ) const;
plUUID GetAgeGuid( void ) const;
};

View File

@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#pragma hdrstop
#include "pyDniInfoSource.h"
#include "pnUUID/pnUUID.h"
// glue functions
PYTHON_CLASS_DEFINITION(ptDniInfoSource, pyDniInfoSource);
@ -73,7 +74,7 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeName)
PYTHON_METHOD_DEFINITION_NOARGS(ptDniInfoSource, getAgeGuid)
{
return PyString_FromString(self->fThis->GetAgeGuid());
return PyString_FromString(self->fThis->GetAgeGuid().AsString().c_str());
}
PYTHON_START_METHODS_TABLE(ptDniInfoSource)