[Python-ogre-commit] SF.net SVN: python-ogre: [540] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-01-13 00:55:49
|
Revision: 540
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=540&view=rev
Author: andy_miller
Date: 2008-01-12 16:55:51 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
Further updates for sts::string alais and general cleanup
Modified Paths:
--------------
trunk/python-ogre/BuildModule.py
trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h
trunk/python-ogre/code_generators/et/generate_code.py
trunk/python-ogre/code_generators/et/python_et_aliases.h
trunk/python-ogre/code_generators/et/python_et_sizeof.h
trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h
trunk/python-ogre/environment.py
Modified: trunk/python-ogre/BuildModule.py
===================================================================
--- trunk/python-ogre/BuildModule.py 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/BuildModule.py 2008-01-13 00:55:51 UTC (rev 540)
@@ -33,14 +33,14 @@
def getClassList ():
- """ create a dictionary of classes from the enfironment modules
+ """ create a dictionary of classes from the environment modules
"""
dict = {}
for c in dir(environment):
var = environment.__dict__[c]
if isinstance ( var, types.ClassType ) : ## OK so we know it's a class
# logger.debug ( "getClassList: Checking %s" % c )
- if hasattr(var, 'active') and hasattr(var, 'pythonModule'): # and it looks like one we can about
+ if hasattr(var, 'active') and hasattr(var, 'pythonModule'): # and it looks like one we care about
# logger.debug ( "getClassList: it's one of ours")
dict[c] = var
return dict
@@ -192,11 +192,11 @@
if classList[ moduleName ].pythonModule == True:
generateCode ( classList[ moduleName ] )
else:
- exit ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName )
+ print ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName )
if options.compilecode :
if classList[ moduleName ].pythonModule == True:
compileCode ( classList[ moduleName ] )
else:
- exit ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName )
+ print ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName )
Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h
===================================================================
--- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-13 00:55:51 UTC (rev 540)
@@ -26,16 +26,16 @@
// Define the dll export qualifier if compiling for Windows
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
- #ifdef CAELUM_LIB
- #define DllExport __declspec (dllexport)
- #else
- #ifdef __MINGW32__
- #define DllExport
- #else
- #define DllExport __declspec (dllimport)
- #endif
- #endif
-#else
+// #ifdef CAELUM_LIB
+// #define DllExport __declspec (dllexport)
+// #else
+// #ifdef __MINGW32__
+// #define DllExport
+// #else
+// #define DllExport __declspec (dllimport)
+// #endif
+// #endif
+// #else
#define DllExport
#endif
Modified: trunk/python-ogre/code_generators/et/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/et/generate_code.py 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/code_generators/et/generate_code.py 2008-01-13 00:55:51 UTC (rev 540)
@@ -66,7 +66,18 @@
if f.return_type.decl_string.startswith("::std::pair"):
print "Excluding Class (%s) Function(%s) which return %s. These return List[bool,tuple(x,y,x)] " % (f.name, f.parent, f.return_type)
f.exclude()
-
+ std_ns = global_ns.namespace("std")
+
+ excludes=['::ET::SplattingManager::createColourMap', # forces a vector(Ogre::ColourValue) which fails
+ '::ET::SplattingManager::createBaseTexture'
+ ]
+ for e in excludes:
+ print "excluding function", e
+ global_ns.member_functions(e).exclude()
+
+# std_ns.class_('vector<Ogre::ColourValue, std::allocator<Ogre::ColourValue> >').exclude()
+# std_ns.class_('vector<Ogre::Image, std::allocator<Ogre::Image> >').exclude()
+
############################################################
##
## And there are things that manually need to be INCLUDED
@@ -79,7 +90,8 @@
main_ns = global_ns.namespace( MAIN_NAMESPACE )
else:
main_ns = global_ns
-
+ global_ns.namespace( 'Ogre' ).class_('MaterialPtr').include(already_exposed=True)
+
############################################################
##
## And things that need manual fixes, but not necessarly hand wrapped
@@ -174,30 +186,30 @@
# the 'main'function
#
def generate_code():
- messages.disable(
-# Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X
- messages.W1020
- , messages.W1021
- , messages.W1022
- , messages.W1023
- , messages.W1024
- , messages.W1025
- , messages.W1026
- , messages.W1027
- , messages.W1028
- , messages.W1029
- , messages.W1030
- , messages.W1031
- , messages.W1035
- , messages.W1040
- , messages.W1038
- , messages.W1041
- , messages.W1036 # pointer to Python immutable member
- , messages.W1033 # unnamed variables
- , messages.W1018 # expose unnamed classes
- , messages.W1049 # returns reference to local variable
- , messages.W1014 # unsupported '=' operator
- )
+# messages.disable(
+# # Warnings 1020 - 1031 are all about why Py++ generates wrapper for class X
+# messages.W1020
+# , messages.W1021
+# , messages.W1022
+# , messages.W1023
+# , messages.W1024
+# , messages.W1025
+# , messages.W1026
+# , messages.W1027
+# , messages.W1028
+# , messages.W1029
+# , messages.W1030
+# , messages.W1031
+# , messages.W1035
+# , messages.W1040
+# , messages.W1038
+# , messages.W1041
+# , messages.W1036 # pointer to Python immutable member
+# , messages.W1033 # unnamed variables
+# , messages.W1018 # expose unnamed classes
+# , messages.W1049 # returns reference to local variable
+# , messages.W1014 # unsupported '=' operator
+# )
#
# Use GCCXML to create the controlling XML file.
# If the cache file (../cache/*.xml) doesn't exist it gets created, otherwise it just gets loaded
Modified: trunk/python-ogre/code_generators/et/python_et_aliases.h
===================================================================
--- trunk/python-ogre/code_generators/et/python_et_aliases.h 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/code_generators/et/python_et_aliases.h 2008-01-13 00:55:51 UTC (rev 540)
@@ -10,18 +10,11 @@
typedef std::pair<bool, float> StdPairBoolFloat;
typedef std::pair<bool, std::allocator<Ogre::Vector3> > stdPairBoolVector;
-//1
-//typedef std::vector<Ogre::ColourValue, std::allocator<Ogre::ColourValue> > ColourList;
-//typedef std::vector<Ogre::Image, std::allocator<Ogre::Image> > ImageList;
//2
-//typedef std::vector<Ogre::ColourValue> ColourList;
-//typedef std::vector<Ogre::Image> ImageList;
+// typedef std::vector<Ogre::ColourValue> ColourList;
+// typedef std::vector<Ogre::Image> ImageList;
-//3
-// typedef ET::ColourList ColourList;
-// typedef ET::ImageList ImageList;
-
// these are uglys to remove messages in the generate_code output - doesn't impact the generated code :)
//typedef std::vector<Ogre::Image> ImageList;
Modified: trunk/python-ogre/code_generators/et/python_et_sizeof.h
===================================================================
--- trunk/python-ogre/code_generators/et/python_et_sizeof.h 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/code_generators/et/python_et_sizeof.h 2008-01-13 00:55:51 UTC (rev 540)
@@ -12,3 +12,5 @@
//sizeof ( ::std::pair<bool, Ogre::Vector3> );
//sizeof (std::pair<bool, Ogre::Vector3> );
sizeof ( std::pair<bool, std::allocator<Ogre::Vector3> > );
+// sizeof ( std::vector<Ogre::ColourValue> );
+// sizeof ( std::vector<Ogre::Image> );
Modified: trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h
===================================================================
--- trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/code_generators/particleuniverse/python_particleuniverse_aliases.h 2008-01-13 00:55:51 UTC (rev 540)
@@ -1 +1,2 @@
// typedef name nicename;
+typedef std::string String;
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2008-01-12 06:01:54 UTC (rev 539)
+++ trunk/python-ogre/environment.py 2008-01-13 00:55:51 UTC (rev 540)
@@ -201,8 +201,8 @@
class newton:
pythonModule = False
active = True
- if not os.path.exists( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt')):
- os.makedirs ( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt') )
+# if not os.path.exists( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt')):
+# os.makedirs ( os.path.join(os.getcwd(), 'ogreaddons/ogrenewt') )
if isLinux():
base = 'newton'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|