From: <br...@us...> - 2010-08-13 03:34:35
|
Revision: 4171 http://openvrml.svn.sourceforge.net/openvrml/?rev=4171&view=rev Author: braden Date: 2010-08-13 03:34:28 +0000 (Fri, 13 Aug 2010) Log Message: ----------- Doesn't need to include <boost/thread.hpp>. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/browser.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-12 08:18:53 UTC (rev 4170) +++ trunk/ChangeLog 2010-08-13 03:34:28 UTC (rev 4171) @@ -1,5 +1,10 @@ 2010-08-12 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.h: Doesn't need to include + <boost/thread.hpp>. + +2010-08-12 Braden McDaniel <br...@en...> + Updates for Doxygen 1.7.1. * doc/Doxyfile Modified: trunk/src/libopenvrml/openvrml/browser.h =================================================================== --- trunk/src/libopenvrml/openvrml/browser.h 2010-08-12 08:18:53 UTC (rev 4170) +++ trunk/src/libopenvrml/openvrml/browser.h 2010-08-13 03:34:28 UTC (rev 4171) @@ -22,7 +22,6 @@ # ifndef OPENVRML_BROWSER_H # define OPENVRML_BROWSER_H -# include <boost/thread.hpp> # include <openvrml/script.h> namespace openvrml { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-13 03:47:12
|
Revision: 4173 http://openvrml.svn.sourceforge.net/openvrml/?rev=4173&view=rev Author: braden Date: 2010-08-13 03:47:06 +0000 (Fri, 13 Aug 2010) Log Message: ----------- deref will never throw; use OPENVRML_NOTHROW. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/node_impl_util.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-13 03:37:33 UTC (rev 4172) +++ trunk/ChangeLog 2010-08-13 03:47:06 UTC (rev 4173) @@ -1,5 +1,11 @@ 2010-08-12 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/node_impl_util.h + (openvrml::node_impl_util::ptr_to_polymorphic_mem): deref will + never throw; use OPENVRML_NOTHROW. + +2010-08-12 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.h: Doesn't need to include <boost/thread.hpp>. Modified: trunk/src/libopenvrml/openvrml/node_impl_util.h =================================================================== --- trunk/src/libopenvrml/openvrml/node_impl_util.h 2010-08-13 03:37:33 UTC (rev 4172) +++ trunk/src/libopenvrml/openvrml/node_impl_util.h 2010-08-13 03:47:06 UTC (rev 4173) @@ -109,8 +109,9 @@ class ptr_to_polymorphic_mem { public: virtual ~ptr_to_polymorphic_mem() OPENVRML_NOTHROW = 0; - virtual MemberBase & deref(Object & obj) = 0; - virtual const MemberBase & deref(const Object & obj) = 0; + virtual MemberBase & deref(Object & obj) OPENVRML_NOTHROW = 0; + virtual const MemberBase & deref(const Object & obj) + OPENVRML_NOTHROW = 0; }; template <typename MemberBase, typename Object> @@ -129,8 +130,9 @@ explicit ptr_to_polymorphic_mem_impl(Member Object::* ptr_to_mem); virtual ~ptr_to_polymorphic_mem_impl() OPENVRML_NOTHROW; - virtual MemberBase & deref(Object & obj); - virtual const MemberBase & deref(const Object & obj); + virtual MemberBase & deref(Object & obj) OPENVRML_NOTHROW; + virtual const MemberBase & deref(const Object & obj) + OPENVRML_NOTHROW; }; template <typename MemberBase, typename Member, typename Object> @@ -147,7 +149,7 @@ template <typename MemberBase, typename Member, typename Object> MemberBase & ptr_to_polymorphic_mem_impl<MemberBase, Member, Object>:: - deref(Object & obj) + deref(Object & obj) OPENVRML_NOTHROW { return obj.*this->ptr_to_mem; } @@ -155,7 +157,7 @@ template <typename MemberBase, typename Member, typename Object> const MemberBase & ptr_to_polymorphic_mem_impl<MemberBase, Member, Object>:: - deref(const Object & obj) + deref(const Object & obj) OPENVRML_NOTHROW { return obj.*this->ptr_to_mem; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-13 06:07:11
|
Revision: 4174 http://openvrml.svn.sourceforge.net/openvrml/?rev=4174&view=rev Author: braden Date: 2010-08-13 06:07:04 +0000 (Fri, 13 Aug 2010) Log Message: ----------- Doc-comment improvements: mark private data member documentation "@internal". Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/browser.cpp trunk/src/libopenvrml/openvrml/field_value.cpp trunk/src/libopenvrml/openvrml/frustum.cpp trunk/src/libopenvrml/openvrml/node_impl_util.cpp trunk/src/libopenvrml/openvrml/script.cpp trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/ChangeLog 2010-08-13 06:07:04 UTC (rev 4174) @@ -1,3 +1,15 @@ +2010-08-13 Braden McDaniel <br...@en...> + + Doc-comment improvements: mark private data member documentation + "@internal". + + * src/libopenvrml/openvrml/browser.cpp + * src/libopenvrml/openvrml/field_value.cpp + * src/libopenvrml/openvrml/frustum.cpp + * src/libopenvrml/openvrml/node_impl_util.cpp + * src/libopenvrml/openvrml/script.cpp + * src/libopenvrml-gl/openvrml/gl/viewer.cpp + 2010-08-12 Braden McDaniel <br...@en...> * src/libopenvrml/openvrml/node_impl_util.h Modified: trunk/src/libopenvrml/openvrml/browser.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/browser.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml/openvrml/browser.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -991,12 +991,16 @@ */ /** + * @internal + * * @var boost::scoped_ptr<openvrml::local::node_metatype_registry_impl> openvrml::node_metatype_registry::impl_ * * @brief A pointer to the implementation object. */ /** + * @internal + * * @brief Construct. * * @param[in] b a @c browser. @@ -1315,12 +1319,16 @@ */ /** + * @internal + * * @var bool openvrml::browser::modified_ * * @brief Flag to indicate whether the @c browser has been modified. */ /** + * @internal + * * @var boost::shared_mutex openvrml::browser::modified_mutex_ * * @brief Mutex protecting @c #modified_. @@ -1406,24 +1414,32 @@ } /** + * @internal + * * @var boost::mutex openvrml::browser::out_mutex_ * * @brief Mutex guarding @c #out_. */ /** + * @internal + * * @var std::ostream & openvrml::browser::out_ * * @brief Output stream, generally for console output. */ /** + * @internal + * * @var boost::mutex openvrml::browser::err_mutex_ * * @brief Mutex guarding @c #err_. */ /** + * @internal + * * @var std::ostream & openvrml::browser::err_ * * @brief Error output stream. Modified: trunk/src/libopenvrml/openvrml/field_value.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/field_value.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml/openvrml/field_value.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -207,6 +207,8 @@ */ /** + * @internal + * * @var std::auto_ptr<openvrml::field_value::counted_impl_base> openvrml::field_value::counted_impl_ * * @brief Reference-counted implementation. Modified: trunk/src/libopenvrml/openvrml/frustum.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/frustum.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml/openvrml/frustum.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -142,6 +142,8 @@ } /** + * @internal + * * @brief Update the plane equations. * * The plane equations are derived from the other members. Modified: trunk/src/libopenvrml/openvrml/node_impl_util.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml/openvrml/node_impl_util.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -304,6 +304,8 @@ */ /** + * @internal + * * @var Member Object::* openvrml::node_impl_util::ptr_to_polymorphic_mem_impl::ptr_to_mem * * @brief Pointer-to-member. @@ -482,6 +484,8 @@ */ /** + * @internal + * * @var openvrml::node_interface_set openvrml::node_impl_util::node_type_impl<Node>::interfaces_ * * @brief The set of @c node_interfaces for the @@ -489,6 +493,8 @@ */ /** + * @internal + * * @typedef std::map<std::string, openvrml::node_impl_util::node_type_impl<Node>::field_ptr_ptr> openvrml::node_impl_util::node_type_impl<Node>::field_value_map_t * * @brief Map of pointers to @c openvrml::field_value node @@ -496,6 +502,8 @@ */ /** + * @internal + * * @typedef std::map<std::string, openvrml::node_impl_util::node_type_impl<Node>::event_listener_ptr_ptr> openvrml::node_impl_util::node_type_impl<Node>::event_listener_map_t * * @brief Map of pointers to @c openvrml::event_listener node @@ -503,6 +511,8 @@ */ /** + * @internal + * * @typedef std::map<std::string, openvrml::node_impl_util::node_type_impl<Node>::event_emitter_ptr_ptr> openvrml::node_impl_util::node_type_impl<Node>::event_emitter_map_t * * @brief Map of pointers to @c openvrml::event_emitter node @@ -510,6 +520,8 @@ */ /** + * @internal + * * @var openvrml::node_impl_util::node_type_impl<Node>::field_value_map_t openvrml::node_impl_util::node_type_impl<Node>::field_value_map * * @brief Map of pointers to @c openvrml::field_value node @@ -517,6 +529,8 @@ */ /** + * @internal + * * @var openvrml::node_impl_util::node_type_impl<Node>::event_listener_map_t openvrml::node_impl_util::node_type_impl<Node>::event_listener_map * * @brief Map of pointers to @c openvrml::event_listener node @@ -524,6 +538,8 @@ */ /** + * @internal + * * @var openvrml::node_impl_util::node_type_impl<Node>::event_emitter_map_t openvrml::node_impl_util::node_type_impl<Node>::event_emitter_map * * @brief Map of pointers to @c openvrml::event_emitter node @@ -543,18 +559,24 @@ */ /** + * @internal + * * @typedef openvrml::node_impl_util::node_type_impl<Node> openvrml::node_impl_util::event_listener_base<Node>::node_type_t * * @brief The concrete @c node_type. */ /** + * @internal + * * @typedef openvrml::node_impl_util::event_listener_base<Node>::node_type_t::event_listener_map_t openvrml::node_impl_util::event_listener_base<Node>::event_listener_map_t * * @brief The map of @c event_listeners. */ /** + * @internal + * * @struct openvrml::node_impl_util::event_listener_base::event_listener_equal_to * * @brief A model of @@ -624,24 +646,32 @@ */ /** + * @internal + * * @var openvrml::node * openvrml::node_impl_util::event_emitter_base::node_ * * @brief The @c node with which the @c event_emitter is associated. */ /** + * @internal + * * @typedef openvrml::node_impl_util::node_type_impl<Node> openvrml::node_impl_util::event_emitter_base::node_type_t * * @brief The concrete @c node_type. */ /** + * @internal + * * @typedef openvrml::node_impl_util::event_emitter_base::node_type_t::event_emitter_map_t openvrml::node_impl_util::event_emitter_base::event_emitter_map_t * * @brief The map of @c event_emitters. */ /** + * @internal + * * @struct openvrml::node_impl_util::event_emitter_base::event_emitter_equal_to * * @brief A model of @@ -654,6 +684,8 @@ */ /** + * @internal + * * @var const openvrml::node_impl_util::event_emitter_base<Node> * openvrml::node_impl_util::event_emitter_base::event_emitter_equal_to::emitter_ * * @brief The @c event_emitter to test against. Modified: trunk/src/libopenvrml/openvrml/script.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/script.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml/openvrml/script.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -581,6 +581,8 @@ } /** + * @internal + * * @var boost::scoped_ptr<openvrml::script_factory_registry::impl> openvrml::script_factory_registry::impl_ * * @brief A pointer to the implementation instance. @@ -708,24 +710,32 @@ */ /** + * @internal + * * @var openvrml::script_node & openvrml::script_node::eventout::node_ * * @brief The containing @c script_node. */ /** + * @internal + * * @var boost::scoped_ptr<openvrml::field_value> openvrml::script_node::eventout::value_ * * @brief The value. */ /** + * @internal + * * @var bool openvrml::script_node::eventout::modified_ * * @brief Flag to indicate whether @a value_ has been modified. */ /** + * @internal + * * @var boost::scoped_ptr<openvrml::event_emitter> openvrml::script_node::eventout::emitter_ * * @brief Event emitter. @@ -1758,18 +1768,24 @@ */ /** + * @internal + * * @var openvrml::script_node::set_metadata_listener openvrml::script_node::set_metadata_listener_ * * @brief @c set_metadata @c eventIn handler. */ /** + * @internal + * * @var openvrml::sfnode openvrml::script_node::metadata_ * * @brief @c metadata field value. */ /** + * @internal + * * @var openvrml::script_node::metadata_changed_emitter openvrml::script_node::metadata_changed_emitter_ * * @brief @c metadata_changed @c eventOut emitter. Modified: trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp =================================================================== --- trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2010-08-13 03:47:06 UTC (rev 4173) +++ trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2010-08-13 06:07:04 UTC (rev 4174) @@ -496,12 +496,16 @@ */ /** + * @internal + * * @var size_t openvrml::gl::viewer::modelview_matrix_stack::size * * @brief The current stack depth. */ /** + * @internal + * * @var std::stack<openvrml::mat4f> openvrml::gl::viewer::modelview_matrix_stack::spillover * * @brief Any matrices that won't fit on the OpenGL modelview matrix stack get This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-14 09:03:04
|
Revision: 4178 http://openvrml.svn.sourceforge.net/openvrml/?rev=4178&view=rev Author: braden Date: 2010-08-14 09:02:54 +0000 (Sat, 14 Aug 2010) Log Message: ----------- Added Visual C++ 2010 project files. These files are now interspersed in the source directories. Modified Paths: -------------- trunk/ChangeLog trunk/Makefile.am trunk/examples/Makefile.am trunk/examples/sdl_viewer.cpp trunk/src/Makefile.am trunk/src/libopenvrml/openvrml/basetypes.cpp trunk/src/libopenvrml/openvrml/local/error.cpp trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp trunk/src/libopenvrml/openvrml/local/proto.cpp trunk/src/libopenvrml/openvrml/local/uri.cpp trunk/src/libopenvrml/openvrml/node.h trunk/src/libopenvrml/openvrml/node_impl_util.h trunk/src/libopenvrml/openvrml/script.cpp trunk/src/libopenvrml/openvrml-common.h trunk/src/libopenvrml-gl/openvrml-gl-common.h trunk/src/node/vrml97/grouping_node_base.h trunk/tests/Makefile.am Added Paths: ----------- trunk/OpenVRML.sln trunk/examples/pretty-print.vcxproj trunk/examples/sdl-viewer.vcxproj trunk/src/libopenvrml/openvrml-config-win32.h trunk/src/libopenvrml/openvrml.rc trunk/src/libopenvrml/openvrml.vcxproj trunk/src/libopenvrml-gl/openvrml-gl-config-win32.h trunk/src/libopenvrml-gl/openvrml-gl.rc trunk/src/libopenvrml-gl/openvrml-gl.vcxproj trunk/src/local/libopenvrml-dl/openvrml-dl.vcxproj trunk/src/node/vrml97/vrml97.vcxproj trunk/src/node/x3d-cad-geometry/x3d-cad-geometry.vcxproj trunk/src/node/x3d-core/x3d-core.vcxproj trunk/src/node/x3d-dis/x3d-dis.vcxproj trunk/src/node/x3d-environmental-effects/x3d-environmental-effects.vcxproj trunk/src/node/x3d-event-utilities/x3d-event-utilities.vcxproj trunk/src/node/x3d-geometry2d/x3d-geometry2d.vcxproj trunk/src/node/x3d-geospatial/x3d-geospatial.vcxproj trunk/src/node/x3d-grouping/x3d-grouping.vcxproj trunk/src/node/x3d-h-anim/x3d-h-anim.vcxproj trunk/src/node/x3d-interpolation/x3d-interpolation.vcxproj trunk/src/node/x3d-key-device-sensor/x3d-key-device-sensor.vcxproj trunk/src/node/x3d-networking/x3d-networking.vcxproj trunk/src/node/x3d-nurbs/x3d-nurbs.vcxproj trunk/src/node/x3d-rendering/x3d-rendering.vcxproj trunk/src/node/x3d-shape/x3d-shape.vcxproj trunk/src/node/x3d-texturing/x3d-texturing.vcxproj trunk/src/script/javascript.vcxproj trunk/tests/parse-vrml97.vcxproj trunk/tests/parse-x3dvrml.vcxproj Removed Paths: ------------- trunk/ide-projects/ Property Changed: ---------------- trunk/ trunk/examples/ trunk/src/libopenvrml/ trunk/src/libopenvrml-gl/ trunk/src/local/libopenvrml-dl/ trunk/src/node/vrml97/ trunk/src/node/x3d-cad-geometry/ trunk/src/node/x3d-core/ trunk/src/node/x3d-dis/ trunk/src/node/x3d-environmental-effects/ trunk/src/node/x3d-event-utilities/ trunk/src/node/x3d-geometry2d/ trunk/src/node/x3d-geospatial/ trunk/src/node/x3d-grouping/ trunk/src/node/x3d-h-anim/ trunk/src/node/x3d-interpolation/ trunk/src/node/x3d-key-device-sensor/ trunk/src/node/x3d-networking/ trunk/src/node/x3d-nurbs/ trunk/src/node/x3d-rendering/ trunk/src/node/x3d-shape/ trunk/src/node/x3d-texturing/ trunk/src/script/ trunk/tests/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in aclocal.m4 autom4te*.cache config.h config.h.in config.guess config.sub configure depcomp install-sh ltmain.sh missing mkinstalldirs stamp-h stamp-h.in stamp-h1 openvrml.pc openvrml-gl.pc + Makefile Makefile.in aclocal.m4 autom4te*.cache config.h config.h.in config.guess config.sub configure depcomp install-sh ipch ltmain.sh missing mkinstalldirs stamp-h stamp-h.in stamp-h1 openvrml.pc openvrml-gl.pc OpenVRML.sdf OpenVRML.opensdf OpenVRML.suo x64 Win32 Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/ChangeLog 2010-08-14 09:02:54 UTC (rev 4178) @@ -1,3 +1,156 @@ +2010-08-14 Braden McDaniel <br...@en...> + + Added Visual C++ 2010 project files. These files are now + interspersed in the source directories. + + * Makefile.am + (EXTRA_DIST): Add OpenVRML.sln. + * OpenVRML.sln: Added file. + * examples/sdl_viewer.cpp + (resource_fetcher::do_get_resource(const + std::string&)::file_resource_istream::do_type() const): Fully + qualify boost::next. + * examples/Makefile.am + (EXTRA_DIST): Add Visual Studio 2010 project files. + * examples/sdl-viewer.vcxproj: Added file. + * examples/pretty-print.vcxproj: Added file. + * ide-projects/Makefile.am: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/OpenVRML.sln: Removed + file. + * ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc: + Moved to src/libopenvrml/openvrml.rc. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h: + Moved to src/libopenvrml/openvrml-config-win32.h. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-dl/openvrml-dl.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc: + Moved to src/libopenvrml-gl/openvrml-gl.rc. + * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl-config.h: + Moved to src/libopenvrml-gl/openvrml-gl-config-win32.h. + * ide-projects/Windows/VisualC9_0/OpenVRML/parse-vrml97/parse-vrml97.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/parse-x3dvrml/parse-x3dvrml.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/pretty-print/pretty-print.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/sdl-viewer/sdl-viewer.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/vrml97/vrml97.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-cad-geometry/x3d-cad-geometry.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-core/x3d-core.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-dis/x3d-dis.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-environmental-effects/x3d-environmental-effects.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-event-utilities/x3d-event-utilities.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-geometry2d/x3d-geometry2d.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-geospatial/x3d-geospatial.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-grouping/x3d-grouping.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-h-anim/x3d-h-anim.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-interpolation/x3d-interpolation.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-key-device-sensor/x3d-key-device-sensor.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-networking/x3d-networking.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-nurbs/x3d-nurbs.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-rendering/x3d-rendering.vcproj: Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-shape/x3d-shape.vcproj: + Removed file. + * ide-projects/Windows/VisualC9_0/OpenVRML/x3d-texturing/x3d-texturing.vcproj: + Removed file. + * src/Makefile.am + (EXTRA_DIST): Add Visual C++ project files, resource scripts, and + Windows-specific config headers. + * src/libopenvrml/openvrml/basetypes.cpp + (det3(const openvrml::mat4f &, size_t, size_t, size_t, size_t, + size_t, size_t)): Use size_t instead of int to suppress a warning + from the Microsoft compiler. + * src/libopenvrml/openvrml/local/error.cpp + (openvrml::local::throw_runtime_error_from_win32_system_error(LONG)): + Cast to DWORD to suppress a warning from the Microsoft compiler. + * src/libopenvrml/openvrml/local/parse_vrml.cpp + (error_handler::operator()(const ScannerT &, const ErrorT &) + const): static_cast to size_t to suppress warnings from the + Microsoft compiler. + * src/libopenvrml/openvrml/local/proto.cpp + (resolve_node_path(const node_path_t &, const + std::vector<boost::intrusive_ptr<openvrml::node> > &)): Fully + qualify boost::next. + (field_value_cloner::clone_node(const + boost::intrusive_ptr<openvrml::node> &)): Fully qualify + boost::bind. + * src/libopenvrml/openvrml/local/uri.cpp + (openvrml::local::uri::swap(uri &)): Use difference_type instead + of size_type to suppress a warning from the Microsoft compiler. + * src/libopenvrml/openvrml/script.cpp + (openvrml::script_node::script_node(script_node_metatype &, const + boost::shared_ptr<openvrml::scope> &, const node_interface_set &, + const initial_value_map &)): Initialize "succeeded" to suppress + warning. + * src/libopenvrml/openvrml/node_impl_util.h + (openvrml::node_impl_util::exposedfield<FieldValue>::exposedfield(openvrml::node&, + const typename FieldValue::value_type &)): cl 16.0 still has the + "typename" bustage. + * src/libopenvrml/openvrml/node.h + (openvrml::find_interface(const node_interface_set &, const + std::string &)): Fully qualify boost::bind. + * src/libopenvrml/openvrml.rc: Moved from + ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.rc. + * src/libopenvrml/openvrml-config-win32.h: Moved from + ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-config.h. + * src/libopenvrml/openvrml.vcxproj: Added file. + * src/libopenvrml/openvrml-common.h: Include + <openvrml-config-win32.h> on Windows. + * src/libopenvrml-gl/openvrml-gl.rc: Moved from + ide-projects/Windows/VisualC9_0/OpenVRML/openvrml-gl/openvrml-gl.rc. + * src/libopenvrml-gl/openvrml-gl-config-win32.h: Moved from + ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml-gl-config.h. + * src/libopenvrml-gl/openvrml-gl.vcxproj: Added file. + * src/libopenvrml-gl/openvrml-gl-common.h: Include + <openvrml-gl-config-win32.h> on Windows. + * src/local/libopenvrml-dl/openvrml-dl.vcxproj: Added file. + * src/node/vrml97/grouping_node_base.h + (openvrml_node_vrml97::grouping_node_base<Derived>::add_children_listener::do_process_event(const + openvrml::mfnode &, double)): The Microsoft compiler requires + openvrml::node to be fully qualified here. + * src/node/vrml97/vrml97.vcxproj: Added file. + * src/node/x3d-cad-geometry/x3d-cad-geometry.vcxproj: Added file. + * src/node/x3d-core/x3d-core.vcxproj: Added file. + * src/node/x3d-dis/x3d-dis.vcxproj: Added file. + * src/node/x3d-environmental-effects/x3d-environmental-effects.vcxproj: + Added file. + * src/node/x3d-event-utilities/x3d-event-utilities.vcxproj: Added + file. + * src/node/x3d-geometry2d/x3d-geometry2d.vcxproj: Added file. + * src/node/x3d-geospatial/x3d-geospatial.vcxproj: Added file. + * src/node/x3d-grouping/x3d-grouping.vcxproj: Added file. + * src/node/x3d-h-anim/x3d-h-anim.vcxproj: Added file. + * src/node/x3d-interpolation/x3d-interpolation.vcxproj: Added + file. + * src/node/x3d-key-device-sensor/x3d-key-device-sensor.vcxproj: + Added file. + * src/node/x3d-networking/x3d-networking.vcxproj: Added file. + * src/node/x3d-nurbs/x3d-nurbs.vcxproj: Added file. + * src/node/x3d-rendering/x3d-rendering.vcxproj: Added file. + * src/node/x3d-shape/x3d-shape.vcxproj: Added file. + * src/node/x3d-texturing/x3d-texturing.vcxproj: Added file. + * src/script/javascript.vcxproj: Added file. + * tests/parse-vrml97.vcxproj: Added file. + * tests/parse-x3dvrml.vcxproj: Added file. + * tests/Makefile.am + (EXTRA_DIST): Add Visual Studio 2010 project files. + 2010-08-13 Braden McDaniel <br...@en...> * src/libopenvrml/openvrml/node_impl_util.cpp: Doc-comment Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/Makefile.am 2010-08-14 09:02:54 UTC (rev 4178) @@ -1,10 +1,11 @@ -SUBDIRS = doc ide-projects models src data examples tests +SUBDIRS = doc models src data examples tests ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ openvrml.pc.in \ - openvrml-gl.pc.in + openvrml-gl.pc.in \ + OpenVRML.sln pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = openvrml.pc Added: trunk/OpenVRML.sln =================================================================== --- trunk/OpenVRML.sln (rev 0) +++ trunk/OpenVRML.sln 2010-08-14 09:02:54 UTC (rev 4178) @@ -0,0 +1,268 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "javascript", "src\script\javascript.vcxproj", "{FE4F0469-ADE7-4BC3-8501-590F810BF569}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml-dl", "src\local\libopenvrml-dl\openvrml-dl.vcxproj", "{95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml-gl", "src\libopenvrml-gl\openvrml-gl.vcxproj", "{141F90C2-6630-4D7A-834F-D5D57C6CFC24}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openvrml", "src\libopenvrml\openvrml.vcxproj", "{E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}" + ProjectSection(ProjectDependencies) = postProject + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C} = {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parse-vrml97", "tests\parse-vrml97.vcxproj", "{B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parse-x3dvrml", "tests\parse-x3dvrml.vcxproj", "{38979260-FBDB-49E6-A0AD-15E3C8C553A3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pretty-print", "examples\pretty-print.vcxproj", "{EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sdl-viewer", "examples\sdl-viewer.vcxproj", "{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vrml97", "src\node\vrml97\vrml97.vcxproj", "{5ED398C0-0529-40D5-AB2C-C7EF0769002B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-cad-geometry", "src\node\x3d-cad-geometry\x3d-cad-geometry.vcxproj", "{D9D29F52-CFE0-42A1-A150-47CBAAE89030}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-core", "src\node\x3d-core\x3d-core.vcxproj", "{78133A10-3ADF-474C-B32A-74124A976482}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-dis", "src\node\x3d-dis\x3d-dis.vcxproj", "{D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-environmental-effects", "src\node\x3d-environmental-effects\x3d-environmental-effects.vcxproj", "{12C5E485-59BD-40EB-9BE9-F856FBDC18B6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-event-utilities", "src\node\x3d-event-utilities\x3d-event-utilities.vcxproj", "{CE946E0C-4880-4AB0-9170-42D6692791CC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-geometry2d", "src\node\x3d-geometry2d\x3d-geometry2d.vcxproj", "{61A31C6F-23A1-4243-A338-EF749912592A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-geospatial", "src\node\x3d-geospatial\x3d-geospatial.vcxproj", "{3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-grouping", "src\node\x3d-grouping\x3d-grouping.vcxproj", "{1D32E4EB-6613-4270-8295-7113712BC6C5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-h-anim", "src\node\x3d-h-anim\x3d-h-anim.vcxproj", "{3DA77516-5D3A-42AA-8D99-BF87643A75A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-interpolation", "src\node\x3d-interpolation\x3d-interpolation.vcxproj", "{BFF962C6-4CC1-4DD1-965A-163EADE74986}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-key-device-sensor", "src\node\x3d-key-device-sensor\x3d-key-device-sensor.vcxproj", "{E20E0E24-C0B6-4448-82E0-32CCDBA88957}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-networking", "src\node\x3d-networking\x3d-networking.vcxproj", "{430B1A48-8E64-43DF-8CC4-AD09C41BA735}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-nurbs", "src\node\x3d-nurbs\x3d-nurbs.vcxproj", "{D884D3FB-79C4-497A-AD7C-7D7877F9768E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-rendering", "src\node\x3d-rendering\x3d-rendering.vcxproj", "{7DAC4CA0-9382-4ED0-A26E-A5F84776054C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-shape", "src\node\x3d-shape\x3d-shape.vcxproj", "{95D646C4-B759-469D-BDBB-A370A5778CA5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x3d-texturing", "src\node\x3d-texturing\x3d-texturing.vcxproj", "{20B850E9-E417-49A2-A66C-38827401597B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Debug|Win32.Build.0 = Debug|Win32 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Debug|x64.ActiveCfg = Debug|x64 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Debug|x64.Build.0 = Debug|x64 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Release|Win32.ActiveCfg = Release|Win32 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Release|Win32.Build.0 = Release|Win32 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Release|x64.ActiveCfg = Release|x64 + {FE4F0469-ADE7-4BC3-8501-590F810BF569}.Release|x64.Build.0 = Release|x64 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Debug|Win32.ActiveCfg = Debug|Win32 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Debug|Win32.Build.0 = Debug|Win32 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Debug|x64.ActiveCfg = Debug|x64 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Debug|x64.Build.0 = Debug|x64 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Release|Win32.ActiveCfg = Release|Win32 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Release|Win32.Build.0 = Release|Win32 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Release|x64.ActiveCfg = Release|x64 + {95FA0E9B-DF2F-48C3-B07D-AB3A93E44E5C}.Release|x64.Build.0 = Release|x64 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.ActiveCfg = Debug|Win32 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|Win32.Build.0 = Debug|Win32 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|x64.ActiveCfg = Debug|x64 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Debug|x64.Build.0 = Debug|x64 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.ActiveCfg = Release|Win32 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|Win32.Build.0 = Release|Win32 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|x64.ActiveCfg = Release|x64 + {141F90C2-6630-4D7A-834F-D5D57C6CFC24}.Release|x64.Build.0 = Release|x64 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|Win32.Build.0 = Debug|Win32 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|x64.ActiveCfg = Debug|x64 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Debug|x64.Build.0 = Debug|x64 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.ActiveCfg = Release|Win32 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|Win32.Build.0 = Release|Win32 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|x64.ActiveCfg = Release|x64 + {E5287CD2-4BAC-4341-AF28-A1F9C0F5949C}.Release|x64.Build.0 = Release|x64 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Debug|Win32.Build.0 = Debug|Win32 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Debug|x64.ActiveCfg = Debug|x64 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Debug|x64.Build.0 = Debug|x64 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Release|Win32.ActiveCfg = Release|Win32 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Release|Win32.Build.0 = Release|Win32 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Release|x64.ActiveCfg = Release|x64 + {B7ACAA17-A1BE-4221-8F9D-503EA2AF0EDF}.Release|x64.Build.0 = Release|x64 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Debug|Win32.Build.0 = Debug|Win32 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Debug|x64.ActiveCfg = Debug|x64 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Debug|x64.Build.0 = Debug|x64 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Release|Win32.ActiveCfg = Release|Win32 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Release|Win32.Build.0 = Release|Win32 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Release|x64.ActiveCfg = Release|x64 + {38979260-FBDB-49E6-A0AD-15E3C8C553A3}.Release|x64.Build.0 = Release|x64 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Debug|Win32.Build.0 = Debug|Win32 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Debug|x64.ActiveCfg = Debug|x64 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Debug|x64.Build.0 = Debug|x64 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Release|Win32.ActiveCfg = Release|Win32 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Release|Win32.Build.0 = Release|Win32 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Release|x64.ActiveCfg = Release|x64 + {EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}.Release|x64.Build.0 = Release|x64 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.ActiveCfg = Debug|Win32 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|Win32.Build.0 = Debug|Win32 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|x64.ActiveCfg = Debug|x64 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Debug|x64.Build.0 = Debug|x64 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.ActiveCfg = Release|Win32 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|Win32.Build.0 = Release|Win32 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|x64.ActiveCfg = Release|x64 + {2DD5D192-3E85-4E64-854B-DF7A1FF06B76}.Release|x64.Build.0 = Release|x64 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Debug|Win32.Build.0 = Debug|Win32 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Debug|x64.ActiveCfg = Debug|x64 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Debug|x64.Build.0 = Debug|x64 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|Win32.ActiveCfg = Release|Win32 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|Win32.Build.0 = Release|Win32 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|x64.ActiveCfg = Release|x64 + {5ED398C0-0529-40D5-AB2C-C7EF0769002B}.Release|x64.Build.0 = Release|x64 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Debug|Win32.ActiveCfg = Debug|Win32 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Debug|Win32.Build.0 = Debug|Win32 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Debug|x64.ActiveCfg = Debug|x64 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Debug|x64.Build.0 = Debug|x64 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Release|Win32.ActiveCfg = Release|Win32 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Release|Win32.Build.0 = Release|Win32 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Release|x64.ActiveCfg = Release|x64 + {D9D29F52-CFE0-42A1-A150-47CBAAE89030}.Release|x64.Build.0 = Release|x64 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|Win32.ActiveCfg = Debug|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|Win32.Build.0 = Debug|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|x64.ActiveCfg = Debug|x64 + {78133A10-3ADF-474C-B32A-74124A976482}.Debug|x64.Build.0 = Debug|x64 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|Win32.ActiveCfg = Release|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|Win32.Build.0 = Release|Win32 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|x64.ActiveCfg = Release|x64 + {78133A10-3ADF-474C-B32A-74124A976482}.Release|x64.Build.0 = Release|x64 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Debug|Win32.Build.0 = Debug|Win32 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Debug|x64.ActiveCfg = Debug|x64 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Debug|x64.Build.0 = Debug|x64 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Release|Win32.ActiveCfg = Release|Win32 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Release|Win32.Build.0 = Release|Win32 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Release|x64.ActiveCfg = Release|x64 + {D5FF853A-6BD3-49AC-A5B6-ACA754C766F5}.Release|x64.Build.0 = Release|x64 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Debug|Win32.ActiveCfg = Debug|Win32 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Debug|Win32.Build.0 = Debug|Win32 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Debug|x64.ActiveCfg = Debug|x64 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Debug|x64.Build.0 = Debug|x64 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Release|Win32.ActiveCfg = Release|Win32 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Release|Win32.Build.0 = Release|Win32 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Release|x64.ActiveCfg = Release|x64 + {12C5E485-59BD-40EB-9BE9-F856FBDC18B6}.Release|x64.Build.0 = Release|x64 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Debug|Win32.Build.0 = Debug|Win32 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Debug|x64.ActiveCfg = Debug|x64 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Debug|x64.Build.0 = Debug|x64 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Release|Win32.ActiveCfg = Release|Win32 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Release|Win32.Build.0 = Release|Win32 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Release|x64.ActiveCfg = Release|x64 + {CE946E0C-4880-4AB0-9170-42D6692791CC}.Release|x64.Build.0 = Release|x64 + {61A31C6F-23A1-4243-A338-EF749912592A}.Debug|Win32.ActiveCfg = Debug|Win32 + {61A31C6F-23A1-4243-A338-EF749912592A}.Debug|Win32.Build.0 = Debug|Win32 + {61A31C6F-23A1-4243-A338-EF749912592A}.Debug|x64.ActiveCfg = Debug|x64 + {61A31C6F-23A1-4243-A338-EF749912592A}.Debug|x64.Build.0 = Debug|x64 + {61A31C6F-23A1-4243-A338-EF749912592A}.Release|Win32.ActiveCfg = Release|Win32 + {61A31C6F-23A1-4243-A338-EF749912592A}.Release|Win32.Build.0 = Release|Win32 + {61A31C6F-23A1-4243-A338-EF749912592A}.Release|x64.ActiveCfg = Release|x64 + {61A31C6F-23A1-4243-A338-EF749912592A}.Release|x64.Build.0 = Release|x64 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Debug|Win32.ActiveCfg = Debug|Win32 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Debug|Win32.Build.0 = Debug|Win32 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Debug|x64.ActiveCfg = Debug|x64 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Debug|x64.Build.0 = Debug|x64 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Release|Win32.ActiveCfg = Release|Win32 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Release|Win32.Build.0 = Release|Win32 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Release|x64.ActiveCfg = Release|x64 + {3C7DA0E4-D769-4C8A-9911-BE5C2651ED30}.Release|x64.Build.0 = Release|x64 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Debug|Win32.ActiveCfg = Debug|Win32 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Debug|Win32.Build.0 = Debug|Win32 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Debug|x64.ActiveCfg = Debug|x64 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Debug|x64.Build.0 = Debug|x64 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Release|Win32.ActiveCfg = Release|Win32 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Release|Win32.Build.0 = Release|Win32 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Release|x64.ActiveCfg = Release|x64 + {1D32E4EB-6613-4270-8295-7113712BC6C5}.Release|x64.Build.0 = Release|x64 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Debug|Win32.Build.0 = Debug|Win32 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Debug|x64.ActiveCfg = Debug|x64 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Debug|x64.Build.0 = Debug|x64 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Release|Win32.ActiveCfg = Release|Win32 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Release|Win32.Build.0 = Release|Win32 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Release|x64.ActiveCfg = Release|x64 + {3DA77516-5D3A-42AA-8D99-BF87643A75A2}.Release|x64.Build.0 = Release|x64 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Debug|Win32.Build.0 = Debug|Win32 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Debug|x64.ActiveCfg = Debug|x64 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Debug|x64.Build.0 = Debug|x64 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Release|Win32.ActiveCfg = Release|Win32 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Release|Win32.Build.0 = Release|Win32 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Release|x64.ActiveCfg = Release|x64 + {BFF962C6-4CC1-4DD1-965A-163EADE74986}.Release|x64.Build.0 = Release|x64 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Debug|Win32.ActiveCfg = Debug|Win32 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Debug|Win32.Build.0 = Debug|Win32 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Debug|x64.ActiveCfg = Debug|x64 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Debug|x64.Build.0 = Debug|x64 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Release|Win32.ActiveCfg = Release|Win32 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Release|Win32.Build.0 = Release|Win32 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Release|x64.ActiveCfg = Release|x64 + {E20E0E24-C0B6-4448-82E0-32CCDBA88957}.Release|x64.Build.0 = Release|x64 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Debug|Win32.ActiveCfg = Debug|Win32 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Debug|Win32.Build.0 = Debug|Win32 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Debug|x64.ActiveCfg = Debug|x64 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Debug|x64.Build.0 = Debug|x64 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Release|Win32.ActiveCfg = Release|Win32 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Release|Win32.Build.0 = Release|Win32 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Release|x64.ActiveCfg = Release|x64 + {430B1A48-8E64-43DF-8CC4-AD09C41BA735}.Release|x64.Build.0 = Release|x64 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Debug|Win32.Build.0 = Debug|Win32 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Debug|x64.ActiveCfg = Debug|x64 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Debug|x64.Build.0 = Debug|x64 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Release|Win32.ActiveCfg = Release|Win32 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Release|Win32.Build.0 = Release|Win32 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Release|x64.ActiveCfg = Release|x64 + {D884D3FB-79C4-497A-AD7C-7D7877F9768E}.Release|x64.Build.0 = Release|x64 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Debug|Win32.ActiveCfg = Debug|Win32 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Debug|Win32.Build.0 = Debug|Win32 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Debug|x64.ActiveCfg = Debug|x64 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Debug|x64.Build.0 = Debug|x64 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Release|Win32.ActiveCfg = Release|Win32 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Release|Win32.Build.0 = Release|Win32 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Release|x64.ActiveCfg = Release|x64 + {7DAC4CA0-9382-4ED0-A26E-A5F84776054C}.Release|x64.Build.0 = Release|x64 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Debug|Win32.ActiveCfg = Debug|Win32 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Debug|Win32.Build.0 = Debug|Win32 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Debug|x64.ActiveCfg = Debug|x64 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Debug|x64.Build.0 = Debug|x64 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Release|Win32.ActiveCfg = Release|Win32 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Release|Win32.Build.0 = Release|Win32 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Release|x64.ActiveCfg = Release|x64 + {95D646C4-B759-469D-BDBB-A370A5778CA5}.Release|x64.Build.0 = Release|x64 + {20B850E9-E417-49A2-A66C-38827401597B}.Debug|Win32.ActiveCfg = Debug|Win32 + {20B850E9-E417-49A2-A66C-38827401597B}.Debug|Win32.Build.0 = Debug|Win32 + {20B850E9-E417-49A2-A66C-38827401597B}.Debug|x64.ActiveCfg = Debug|x64 + {20B850E9-E417-49A2-A66C-38827401597B}.Debug|x64.Build.0 = Debug|x64 + {20B850E9-E417-49A2-A66C-38827401597B}.Release|Win32.ActiveCfg = Release|Win32 + {20B850E9-E417-49A2-A66C-38827401597B}.Release|Win32.Build.0 = Release|Win32 + {20B850E9-E417-49A2-A66C-38827401597B}.Release|x64.ActiveCfg = Release|x64 + {20B850E9-E417-49A2-A66C-38827401597B}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Property changes on: trunk/examples ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in sdl-viewer + Makefile Makefile.in sdl-viewer *.vcxproj.user x64 Win32 Modified: trunk/examples/Makefile.am =================================================================== --- trunk/examples/Makefile.am 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/examples/Makefile.am 2010-08-14 09:02:54 UTC (rev 4178) @@ -29,4 +29,6 @@ -I$(top_srcdir)/src/libopenvrml pretty_print_LDADD = $(top_builddir)/src/libopenvrml/libopenvrml.la -EXTRA_DIST = $(sdl_viewer_SOURCES) $(pretty_print_SOURCES) +EXTRA_DIST = $(sdl_viewer_SOURCES) $(pretty_print_SOURCES) \ + pretty-print.vcxproj \ + sdl-viewer.vcxproj Added: trunk/examples/pretty-print.vcxproj =================================================================== --- trunk/examples/pretty-print.vcxproj (rev 0) +++ trunk/examples/pretty-print.vcxproj 2010-08-14 09:02:54 UTC (rev 4178) @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EFCFAB14-FC2B-4816-AD49-DC0E6F4D04E1}</ProjectGuid> + <RootNamespace>prettyprint</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;OPENVRML_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <AdditionalIncludeDirectories>..\src\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_SECURE_SCL=0;_CONSOLE;OPENVRML_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <FunctionLevelLinking>true</FunctionLevelLinking> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="pretty_print.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\src\libopenvrml\openvrml.vcxproj"> + <Project>{e5287cd2-4bac-4341-af28-a1f9c0f5949c}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Added: trunk/examples/sdl-viewer.vcxproj =================================================================== --- trunk/examples/sdl-viewer.vcxproj (rev 0) +++ trunk/examples/sdl-viewer.vcxproj 2010-08-14 09:02:54 UTC (rev 4178) @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{2DD5D192-3E85-4E64-854B-DF7A1FF06B76}</ProjectGuid> + <RootNamespace>sdl-viewer</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration" /> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\braden\Documents\Visual Studio 2010\Projects\SDL-1.2.14\include;$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Users\braden\Documents\Visual Studio 2010\Projects\SDL-1.2.14\lib;$(LibraryPath)</LibraryPath> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\braden\Documents\Visual Studio 2010\Projects\SDL-1.2.14\include;$(IncludePath)</IncludePath> + <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Users\braden\Documents\Visual Studio 2010\Projects\SDL-1.2.14\lib;$(LibraryPath)</LibraryPath> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\bin\</OutDir> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\src\libopenvrml-gl;..\src\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>Default</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>opengl32.lib;glu32.lib;SDLmain.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies> + <IgnoreSpecificDefaultLibraries>msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <Optimization>Full</Optimization> + <WholeProgramOptimization>true</WholeProgramOptimization> + <AdditionalIncludeDirectories>..\src\libopenvrml-gl;..\src\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_SECURE_SCL=0;OPENVRML_USE_DLL;OPENVRML_GL_USE_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <RuntimeTypeInfo>true</RuntimeTypeInfo> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <Link> + <AdditionalDependencies>opengl32.lib;glu32.lib;SDLmain.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> + <DataExecutionPrevention> + </DataExecutionPrevention> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="sdl_viewer.cpp" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\src\libopenvrml-gl\openvrml-gl.vcxproj"> + <Project>{141f90c2-6630-4d7a-834f-d5d57c6cfc24}</Project> + </ProjectReference> + <ProjectReference Include="..\src\libopenvrml\openvrml.vcxproj"> + <Project>{e5287cd2-4bac-4341-af28-a1f9c0f5949c}</Project> + </ProjectReference> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> \ No newline at end of file Modified: trunk/examples/sdl_viewer.cpp =================================================================== --- trunk/examples/sdl_viewer.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/examples/sdl_viewer.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -180,16 +180,15 @@ using std::find; using std::string; using boost::algorithm::iequals; - using boost::next; string media_type = "application/octet-stream"; const string::const_reverse_iterator dot_pos = find(this->url_.rbegin(), this->url_.rend(), '.'); if (dot_pos == this->url_.rend() - || next(dot_pos.base()) == this->url_.end()) { + || boost::next(dot_pos.base()) == this->url_.end()) { return media_type; } const string::const_iterator hash_pos = - find(next(dot_pos.base()), this->url_.end(), '#'); + find(boost::next(dot_pos.base()), this->url_.end(), '#'); const string ext(dot_pos.base(), hash_pos); if (iequals(ext, "wrl")) { media_type = openvrml::vrml_media_type; Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/Makefile.am 2010-08-14 09:02:54 UTC (rev 4178) @@ -919,7 +919,29 @@ EXTRA_DIST = \ libopenvrml/openvrml-config.h.in \ + libopenvrml/openvrml-config-win32.h \ + libopenvrml/openvrml.rc \ + libopenvrml/openvrml.vcxproj \ libopenvrml-gl/openvrml-gl-config.h.in \ + libopenvrml-gl/openvrml-gl-config-win32.h \ + libopenvrml/openvrml-gl.rc \ + libopenvrml/openvrml-gl.vcxproj \ + node/vrml97/vrml97.vcxproj \ + node/x3d-core/x3d-core.vcxproj \ + node/x3d-event-utilities/x3d-event-utilities.vcxproj \ + node/x3d-grouping/x3d-grouping.vcxproj \ + node/x3d-shape/x3d-shape.vcxproj \ + node/x3d-rendering/x3d-rendering.vcxproj \ + node/x3d-geometry2d/x3d-geometry2d.vcxproj \ + node/x3d-texturing/x3d-texturing.vcxproj \ + node/x3d-environmental-effects/x3d-environmental-effects.vcxproj \ + node/x3d-networking/x3d-networking.vcxproj \ + node/x3d-key-device-sensor/x3d-key-device-sensor.vcxproj \ + node/x3d-nurbs/x3d-nurbs.vcxproj \ + node/x3d-geospatial/x3d-geospatial.vcxproj \ + node/x3d-h-anim/x3d-h-anim.vcxproj \ + node/x3d-dis/x3d-dis.vcxproj \ + node/x3d-cad-geometry/x3d-cad-geometry.vcxproj \ openvrml-xembed/org.openvrml.BrowserControl.service.in CLEANFILES = $(BUILT_SOURCES) Property changes on: trunk/src/libopenvrml ___________________________________________________________________ Modified: svn:ignore - + *.vcxproj.user x64 Win32 Modified: trunk/src/libopenvrml/openvrml/basetypes.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/basetypes.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/libopenvrml/openvrml/basetypes.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -3574,8 +3574,10 @@ namespace { - OPENVRML_LOCAL float det3(const openvrml::mat4f & mat, - int r1, int r2, int r3, int c1, int c2, int c3) + OPENVRML_LOCAL + float det3(const openvrml::mat4f & mat, + const size_t r1, const size_t r2, const size_t r3, + const size_t c1, const size_t c2, const size_t c3) OPENVRML_NOTHROW { return mat[r1][c1] * mat[r2][c2] * mat[r3][c3] Modified: trunk/src/libopenvrml/openvrml/local/error.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/local/error.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/libopenvrml/openvrml/local/error.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -36,7 +36,7 @@ result, LANG_USER_DEFAULT, reinterpret_cast< LPTSTR >(&buf), - 0, + DWORD(0), 0); throw std::runtime_error(buf); Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -47,8 +47,8 @@ {} template <typename ScannerT, typename ErrorT> - boost::spirit::classic::error_status<> operator()(const ScannerT & scan, - const ErrorT & err) const + boost::spirit::classic::error_status<> + operator()(const ScannerT & scan, const ErrorT & err) const { using std::endl; using std::string; @@ -79,8 +79,8 @@ // need enough information to create an invalid_vrml exception in // parse_vrml. // - this->error_.line = fpos.line; - this->error_.column = fpos.column; + this->error_.line = static_cast<size_t>(fpos.line); + this->error_.column = static_cast<size_t>(fpos.column); this->error_.message = x3d_vrml_parse_error_msg(err.descriptor); return error_status<>(error_status<>::fail); Modified: trunk/src/libopenvrml/openvrml/local/proto.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/local/proto.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/libopenvrml/openvrml/local/proto.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -376,7 +376,6 @@ const node_path_t & path, const std::vector<boost::intrusive_ptr<openvrml::node> > & root) { - using boost::next; using boost::prior; using openvrml::node; using openvrml::field_value; @@ -396,7 +395,7 @@ } else if (path_element->field_type == field_value::mfnode_id) { result = result->field<mfnode>(path_element->field_id) - .value()[next(path_element)->index].get(); + .value()[boost::next(path_element)->index].get(); } else { assert(!"invalid path_element->field_type"); } @@ -676,15 +675,19 @@ // node_interface_set::const_iterator proto_interface = - find_if(this->node_metatype.interfaces_.begin(), - this->node_metatype.interfaces_.end(), - bind(logical_or<bool>(), - bind(node_interface_matches_exposedfield(), - _1, - is_mapping->first), - bind(node_interface_matches_field(), - _1, - is_mapping->first))); + find_if( + this->node_metatype.interfaces_.begin(), + this->node_metatype.interfaces_.end(), + boost::bind( + logical_or<bool>(), + boost::bind( + node_interface_matches_exposedfield(), + _1, + is_mapping->first), + boost::bind( + node_interface_matches_field(), + _1, + is_mapping->first))); if (proto_interface != this->node_metatype.interfaces_.end()) { Modified: trunk/src/libopenvrml/openvrml/local/uri.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/local/uri.cpp 2010-08-13 07:51:33 UTC (rev 4177) +++ trunk/src/libopenvrml/openvrml/local/uri.cpp 2010-08-14 09:02:54 UTC (rev 4178) @@ -145,93 +145,96 @@ using std::string; using std::swap; - const string::size_type id_scheme_begin_distance = + typedef std::iterator_traits<string::const_iterator>::difference_type + diff_t; + + const diff_t id_scheme_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.scheme_begin); - const string::size_type id_scheme_end_distance = + const diff_t id_scheme_end_distance = distance<string::const_iterator>(id.str_.begin(), id.scheme_end); - const string::size_type id_scheme_specific_part_begin_distance = + const diff_t id_scheme_specific_part_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.scheme_specific_part_begin); - const string::size_type id_scheme_specific_part_end_distance = + const diff_t id_scheme_specific_part_end_distance = distance<string::const_iterator>(id.str_.begin(), id.scheme_specific_part_end); - const string::size_type id_authority_begin_distance = + const diff_t id_authority_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.authority_begin); - const string::size_type id_authority_end_distance = + const diff_t id_authority_end_distance = distance<string::const_iterator>(id.str_.begin(), id.authority_end); - const string::size_type id_userinfo_begin_distance = + const diff_t id_userinfo_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.userinfo_begin); - const string::size_type id_userinfo_end_distance = + const diff_t id_userinfo_end_distance = distance<string::const_iterator>(id.str_.begin(), id.userinfo_end); - const string::size_type id_host_begin_distance = + const diff_t id_host_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.host_begin); - const string::size_type id_host_end_distance = + const diff_t id_host_end_distance = distance<string::const_iterator>(id.str_.begin(), id.host_end); - const string::size_type id_port_begin_distance = + const diff_t id_port_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.port_begin); - const string::size_type id_port_end_distance = + const diff_t id_port_end_distance = distance<string::const_iterator>(id.str_.begin(), id.port_end); - const string::size_type id_path_begin_distance = + const diff_t id_path_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.path_begin); - const string::size_type id_path_end_distance = + const diff_t id_path_end_distance = distance<string::const_iterator>(id.str_.begin(), id.path_end); - const string::size_type id_query_begin_distance = + const diff_t id_query_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.query_begin); - const string::size_type id_query_end_distance = + const diff_t id_query_end_distance = distance<string::const_iterator>(id.str_.begin(), id.query_end); - const string::size_type id_fragment_begin_distance = + const diff_t id_fragment_begin_distance = distance<string::const_iterator>(id.str_.begin(), id.fragment_begin); - const string::size_type id_fragment_end_distance = + const diff_t id_fragment_end_distance = distance<string::const_iterator>(id.str_.begin(), id.fragment_end); - const string::size_type this_scheme_begin_distance = + const diff_t this_scheme_begin_distance = distance<string::const_iterator>(this->str_.begin(), this->scheme_begin); - const string::size_type this_scheme_end_distance = + const diff_t this_scheme_end_distance = distance<string::const_iterator>(this->str_.begin(), this->scheme_end); - const string::size_type this_scheme_specific_part_begin_distance = + const diff_t this_scheme_specific_part_begin_distance = distance<string::const_iterator>(this->str_.begin(), this->scheme_specific_part_begin); - const string::size_type this_scheme_specific_part_end_distance = + const diff_t this_scheme_specific_part_end_distance = distance<string::const_iterator>(this->str_.begin(), this->scheme_specific_part_end); - const string::size_type this_authority_begin_distance = + const diff_t this_authority_begin_distance = distance<string::const_iterator>(this->str_.begin(), this->authority_begin); - const string::size_type this_authority_end_distance = + const diff_t this_authority_end_distance = distance<string::const_iterator>(this->str_.begin(), this->authority_end); - const string::size_type this_useri... [truncated message content] |
From: <br...@us...> - 2010-08-14 09:07:20
|
Revision: 4179 http://openvrml.svn.sourceforge.net/openvrml/?rev=4179&view=rev Author: braden Date: 2010-08-14 09:07:13 +0000 (Sat, 14 Aug 2010) Log Message: ----------- Set svn:eol-style for Visual C++ project files. Property Changed: ---------------- trunk/OpenVRML.sln trunk/examples/pretty-print.vcxproj trunk/examples/sdl-viewer.vcxproj trunk/src/libopenvrml/openvrml.vcxproj trunk/src/libopenvrml-gl/openvrml-gl.vcxproj trunk/src/local/libopenvrml-dl/openvrml-dl.vcxproj trunk/src/node/vrml97/vrml97.vcxproj trunk/src/node/x3d-cad-geometry/x3d-cad-geometry.vcxproj trunk/src/node/x3d-core/x3d-core.vcxproj trunk/src/node/x3d-dis/x3d-dis.vcxproj trunk/src/node/x3d-environmental-effects/x3d-environmental-effects.vcxproj trunk/src/node/x3d-event-utilities/x3d-event-utilities.vcxproj trunk/src/node/x3d-geometry2d/x3d-geometry2d.vcxproj trunk/src/node/x3d-geospatial/x3d-geospatial.vcxproj trunk/src/node/x3d-grouping/x3d-grouping.vcxproj trunk/src/node/x3d-h-anim/x3d-h-anim.vcxproj trunk/src/node/x3d-interpolation/x3d-interpolation.vcxproj trunk/src/node/x3d-key-device-sensor/x3d-key-device-sensor.vcxproj trunk/src/node/x3d-networking/x3d-networking.vcxproj trunk/src/node/x3d-nurbs/x3d-nurbs.vcxproj trunk/src/node/x3d-rendering/x3d-rendering.vcxproj trunk/src/node/x3d-shape/x3d-shape.vcxproj trunk/src/node/x3d-texturing/x3d-texturing.vcxproj trunk/src/script/javascript.vcxproj trunk/tests/parse-vrml97.vcxproj trunk/tests/parse-x3dvrml.vcxproj Property changes on: trunk/OpenVRML.sln ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/examples/pretty-print.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/examples/sdl-viewer.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/libopenvrml/openvrml.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/libopenvrml-gl/openvrml-gl.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/local/libopenvrml-dl/openvrml-dl.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/vrml97/vrml97.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-cad-geometry/x3d-cad-geometry.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-core/x3d-core.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-dis/x3d-dis.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-environmental-effects/x3d-environmental-effects.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-event-utilities/x3d-event-utilities.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-geometry2d/x3d-geometry2d.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-geospatial/x3d-geospatial.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-grouping/x3d-grouping.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-h-anim/x3d-h-anim.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-interpolation/x3d-interpolation.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-key-device-sensor/x3d-key-device-sensor.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-networking/x3d-networking.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-nurbs/x3d-nurbs.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-rendering/x3d-rendering.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-shape/x3d-shape.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/node/x3d-texturing/x3d-texturing.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/src/script/javascript.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/tests/parse-vrml97.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF Property changes on: trunk/tests/parse-x3dvrml.vcxproj ___________________________________________________________________ Added: svn:eol-style + CRLF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-15 05:06:26
|
Revision: 4181 http://openvrml.svn.sourceforge.net/openvrml/?rev=4181&view=rev Author: braden Date: 2010-08-15 05:06:19 +0000 (Sun, 15 Aug 2010) Log Message: ----------- Removed reference to ide-projects/Makefile. Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-14 09:17:04 UTC (rev 4180) +++ trunk/ChangeLog 2010-08-15 05:06:19 UTC (rev 4181) @@ -1,3 +1,7 @@ +2010-08-15 Braden McDaniel <br...@en...> + + * configure.ac: Removed reference to ide-projects/Makefile. + 2010-08-14 Braden McDaniel <br...@en...> Added Visual C++ 2010 project files. These files are now Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2010-08-14 09:17:04 UTC (rev 4180) +++ trunk/configure.ac 2010-08-15 05:06:19 UTC (rev 4181) @@ -4,7 +4,6 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_FILES([Makefile] [doc/Makefile] - [ide-projects/Makefile] [models/Makefile] [models/audio/Makefile] [models/textures/Makefile] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-20 03:58:33
|
Revision: 4183 http://openvrml.svn.sourceforge.net/openvrml/?rev=4183&view=rev Author: braden Date: 2010-08-20 03:58:26 +0000 (Fri, 20 Aug 2010) Log Message: ----------- Added an accessor to get the set of listeners listening to an event emitter. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/event.cpp trunk/src/libopenvrml/openvrml/event.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-15 05:29:25 UTC (rev 4182) +++ trunk/ChangeLog 2010-08-20 03:58:26 UTC (rev 4183) @@ -1,3 +1,16 @@ +2010-08-19 Braden McDaniel <br...@en...> + + Added an accessor to get the set of listeners listening to an + event emitter. + + * src/libopenvrml/openvrml/event.cpp: Added doc-comments for + listener accessors. + * src/libopenvrml/openvrml/event.h + (openvrml::event_emitter::listeners<FieldValue>() const): Added + member function template to get (a copy of) the set of listeners. + (openvrml::field_value_emitter<FieldValue>::listeners() const): + Added member function template to get the set of listeners. + 2010-08-15 Braden McDaniel <br...@en...> * configure.ac: Removed reference to ide-projects/Makefile. Modified: trunk/src/libopenvrml/openvrml/event.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/event.cpp 2010-08-15 05:29:25 UTC (rev 4182) +++ trunk/src/libopenvrml/openvrml/event.cpp 2010-08-20 03:58:26 UTC (rev 4183) @@ -545,6 +545,16 @@ */ /** + * @fn const std::set<field_value_listener<FieldValue> *> event_emitter::listeners() const + * + * @brief The event listeners currently listening to the emitter. + * + * @tparam FieldValue a @link FieldValueConcept Field Value@endlink. + * + * @return the event listeners currently listening to the emitter. + */ + +/** * @fn void openvrml::event_emitter::emit_event<FieldValue>(double timestamp) * * @brief Emit an event. @@ -636,6 +646,16 @@ */ /** + * @fn const std::set<field_value_listener<FieldValue> *> field_value_emitter<FieldValue>::listeners() const + * + * @brief The event listeners currently listening to the emitter. + * + * @tparam FieldValue a @link FieldValueConcept Field Value@endlink. + * + * @return the event listeners currently listening to the emitter. + */ + +/** * @typedef openvrml::sfbool_emitter * * @brief @c sfbool event emitter. Modified: trunk/src/libopenvrml/openvrml/event.h =================================================================== --- trunk/src/libopenvrml/openvrml/event.h 2010-08-15 05:29:25 UTC (rev 4182) +++ trunk/src/libopenvrml/openvrml/event.h 2010-08-20 03:58:26 UTC (rev 4183) @@ -188,6 +188,10 @@ explicit event_emitter(const field_value & value) OPENVRML_NOTHROW; template <typename FieldValue> + const std::set<field_value_listener<FieldValue> *> listeners() const + OPENVRML_THROW1(std::bad_alloc); + + template <typename FieldValue> void emit_event(double timestamp) OPENVRML_THROW1(std::bad_alloc); private: @@ -217,6 +221,27 @@ } template <typename FieldValue> + const std::set<field_value_listener<FieldValue> *> + event_emitter::listeners() const + OPENVRML_THROW1(std::bad_alloc) + { + struct cast { + field_value_listener<FieldValue> * + operator()(event_listener * listener) const OPENVRML_NOTHROW + { + return boost::polymorphic_downcast< + field_value_listener<FieldValue> *>(listener); + } + }; + boost::shared_lock<boost::shared_mutex> lock(this->listeners_mutex_); + std::set<field_value_listener<FieldValue> *> result; + std::transform(this->listeners_.begin(), this->listeners_.end(), + inserter(result, result.begin()), + cast()); + return result; + } + + template <typename FieldValue> void event_emitter::emit_event(const double timestamp) OPENVRML_THROW1(std::bad_alloc) { @@ -253,6 +278,9 @@ bool remove(field_value_listener<FieldValue> & listener) OPENVRML_NOTHROW; + const std::set<field_value_listener<FieldValue> *> listeners() const + OPENVRML_THROW1(std::bad_alloc); + private: virtual void emit_event(double timestamp) OPENVRML_THROW1(std::bad_alloc); @@ -295,6 +323,14 @@ return this->event_emitter::template remove<FieldValue>(listener); } + template <typename FieldValue> + const std::set<field_value_listener<FieldValue> *> + field_value_emitter<FieldValue>::listeners() const + OPENVRML_THROW1(std::bad_alloc) + { + return this->event_emitter::template listeners<FieldValue>(); + } + typedef field_value_emitter<sfbool> sfbool_emitter; typedef field_value_emitter<sfcolor> sfcolor_emitter; typedef field_value_emitter<sfcolorrgba> sfcolorrgba_emitter; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-20 04:53:52
|
Revision: 4185 http://openvrml.svn.sourceforge.net/openvrml/?rev=4185&view=rev Author: braden Date: 2010-08-20 04:53:46 +0000 (Fri, 20 Aug 2010) Log Message: ----------- Changed add and remove member function templates from public to protected access. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/event.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-20 04:01:40 UTC (rev 4184) +++ trunk/ChangeLog 2010-08-20 04:53:46 UTC (rev 4185) @@ -1,3 +1,9 @@ +2010-08-20 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/event.h + (openvrml::event_emitter): Changed add and remove member function + templates from public to protected access. + 2010-08-19 Braden McDaniel <br...@en...> Added an accessor to get the set of listeners listening to an Modified: trunk/src/libopenvrml/openvrml/event.h =================================================================== --- trunk/src/libopenvrml/openvrml/event.h 2010-08-20 04:01:40 UTC (rev 4184) +++ trunk/src/libopenvrml/openvrml/event.h 2010-08-20 04:53:46 UTC (rev 4185) @@ -177,6 +177,9 @@ const std::string eventout_id() const OPENVRML_NOTHROW; double last_time() const OPENVRML_NOTHROW; + protected: + explicit event_emitter(const field_value & value) OPENVRML_NOTHROW; + template <typename FieldValue> bool add(field_value_listener<FieldValue> & listener) OPENVRML_THROW1(std::bad_alloc); @@ -184,9 +187,6 @@ bool remove(field_value_listener<FieldValue> & listener) OPENVRML_NOTHROW; - protected: - explicit event_emitter(const field_value & value) OPENVRML_NOTHROW; - template <typename FieldValue> const std::set<field_value_listener<FieldValue> *> listeners() const OPENVRML_THROW1(std::bad_alloc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-08-20 19:19:36
|
Revision: 4186 http://openvrml.svn.sourceforge.net/openvrml/?rev=4186&view=rev Author: braden Date: 2010-08-20 19:19:29 +0000 (Fri, 20 Aug 2010) Log Message: ----------- Must use dynamic_cast due to virtual inheritance. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/event.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-20 04:53:46 UTC (rev 4185) +++ trunk/ChangeLog 2010-08-20 19:19:29 UTC (rev 4186) @@ -1,6 +1,12 @@ 2010-08-20 Braden McDaniel <br...@en...> * src/libopenvrml/openvrml/event.h + (openvrml::event_emitter::listeners<FieldValue>() const): Must use + dynamic_cast due to virtual inheritance. + +2010-08-20 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/event.h (openvrml::event_emitter): Changed add and remove member function templates from public to protected access. Modified: trunk/src/libopenvrml/openvrml/event.h =================================================================== --- trunk/src/libopenvrml/openvrml/event.h 2010-08-20 04:53:46 UTC (rev 4185) +++ trunk/src/libopenvrml/openvrml/event.h 2010-08-20 19:19:29 UTC (rev 4186) @@ -229,8 +229,10 @@ field_value_listener<FieldValue> * operator()(event_listener * listener) const OPENVRML_NOTHROW { - return boost::polymorphic_downcast< - field_value_listener<FieldValue> *>(listener); + field_value_listener<FieldValue> * const result = + dynamic_cast<field_value_listener<FieldValue> *>(listener); + assert(result); + return result; } }; boost::shared_lock<boost::shared_mutex> lock(this->listeners_mutex_); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-13 18:14:05
|
Revision: 4188 http://openvrml.svn.sourceforge.net/openvrml/?rev=4188&view=rev Author: braden Date: 2010-09-13 18:13:59 +0000 (Mon, 13 Sep 2010) Log Message: ----------- Add (partially) parsed nodes to the scene in the event of an exception during parsing; ensure that the browser::initialized event gets send and scene::scene_loaded gets called in the event of an exception during parsing. Modified Paths: -------------- trunk/ChangeLog trunk/src/libopenvrml/openvrml/browser.cpp trunk/src/libopenvrml/openvrml/local/parse_vrml.h trunk/src/libopenvrml/openvrml/scene.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-08-20 19:26:31 UTC (rev 4187) +++ trunk/ChangeLog 2010-09-13 18:13:59 UTC (rev 4188) @@ -1,3 +1,24 @@ +2010-09-13 Braden McDaniel <br...@en...> + + Add (partially) parsed nodes to the scene in the event of an + exception during parsing; ensure that the browser::initialized + event gets send and scene::scene_loaded gets called in the event + of an exception during parsing. + + * src/libopenvrml/openvrml/local/parse_vrml.h + (openvrml::local::vrml97_parse_actions::~vrml97_parse_actions()): + Add (partially) parsed nodes to the scene if the parse_scope stack + is not empty (that is, parsing was terminated prior to the end of + correctly formed input). + * src/libopenvrml/openvrml/scene.cpp + (openvrml::scene::load(resource_istream &)): Ensure that + scene_loaded gets called in the event of an exception during + parsing. + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::set_world(resource_istream &)): Ensure that + the browser::initialized event gets sent in the event of an + exception during parsing. + 2010-08-20 Braden McDaniel <br...@en...> * src/libopenvrml/openvrml/event.h Modified: trunk/src/libopenvrml/openvrml/browser.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/browser.cpp 2010-08-20 19:26:31 UTC (rev 4187) +++ trunk/src/libopenvrml/openvrml/browser.cpp 2010-09-13 18:13:59 UTC (rev 4188) @@ -33,6 +33,7 @@ # include <boost/function.hpp> # include <boost/functional.hpp> # include <boost/lexical_cast.hpp> +# include <boost/scope_exit.hpp> # include <algorithm> # include <functional> # include <cerrno> @@ -1913,6 +1914,22 @@ using std::for_each; using boost::shared_lock; using boost::shared_mutex; + + // + // Ensure that the "initialized" event is sent even if parsing throws. + // + browser & self = *this; + shared_mutex & listeners_mutex = this->listeners_mutex_; + std::set<browser_listener *> & listeners = this->listeners_; + + BOOST_SCOPE_EXIT((&self)(&listeners_mutex)(&listeners)) { + shared_lock<shared_mutex> listeners_lock(listeners_mutex); + for_each(listeners.begin(), listeners.end(), + boost::bind2nd( + boost::mem_fun(&browser_listener::browser_changed), + browser_event(self, browser_event::initialized))); + } BOOST_SCOPE_EXIT_END + { using std::string; using boost::upgrade_lock; @@ -1993,11 +2010,6 @@ this->modified(true); this->new_view = true; // Force resetUserNav } // unlock this->scene_mutex_, this->active_viewpoint_mutex_ - - shared_lock<shared_mutex> listeners_lock(this->listeners_mutex_); - for_each(this->listeners_.begin(), this->listeners_.end(), - boost::bind2nd(boost::mem_fun(&browser_listener::browser_changed), - browser_event(*this, browser_event::initialized))); } /** Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.h =================================================================== --- trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2010-08-20 19:26:31 UTC (rev 4187) +++ trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2010-09-13 18:13:59 UTC (rev 4188) @@ -2,7 +2,7 @@ // // OpenVRML // -// Copyright 2009 Braden McDaniel +// Copyright 2009, 2010 Braden McDaniel // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by @@ -85,6 +85,75 @@ nodes_(nodes) {} + ~vrml97_parse_actions() + { + // + // If the parse scope stack is not empty, we must have hit a + // parse error. Since all inner scopes are associated with + // PROTOs, we'll just drop them. Back up to the top-level + // parse scope and use whatever nodes we have there. + // + if (!this->ps.empty()) { + while (this->ps.size() > 1) { this->ps.pop(); } + + parse_scope & ps = this->ps.top(); + + // + // When we start out, the children stack is one bigger + // than the node_data stack. The node_data stack doesn't + // get pushed until we start parsing a node; and it gets + // popped when we finish parsing a node. Once we start + // parsing a contained node, children gets pushed again + // and it's again one bigger than node_data. + // + // So, if the node_data and children stacks are the same + // size, that means we started parsing a node, but haven't + // gotten as far as parsing any contained nodes. In this + // case, just go ahead and call on_node_finish to create + // the "current" node and pop the node_data stack. + // + if (ps.node_data_.size() == ps.children.size()) { + this->on_node_finish(); + } + + try { + while (ps.children.size() > 1) { + assert(!ps.node_data_.empty()); + node_data & nd = ps.node_data_.top(); + assert(nd.current_field_value); + const field_value::type_id current_field_type = + nd.current_field_value->second->type(); + if (current_field_type == field_value::sfnode_id) { + nd.current_field_value->second->assign( + sfnode(ps.children.top().front())); + } else if (current_field_type + == field_value::mfnode_id) { + nd.current_field_value->second->assign( + mfnode(ps.children.top())); + } else { + assert(false); + } + ps.children.pop(); + + this->on_node_finish(); + } + + this->on_scene_finish(); + + } catch (std::exception & ex) { + // + // Known possible exceptions here are std::bad_alloc, + // std::bad_cast, and openvrml::unsupported_interface. + // We're in a destructor here, so we don't want to + // throw. + // + this->scene_.browser().err( + "caught exception while constructing scene from " + "invalid data: " + std::string(ex.what())); + } + } + } + struct on_scene_start_t { explicit on_scene_start_t(vrml97_parse_actions & actions): actions_(actions) @@ -144,6 +213,7 @@ add_route(*from, r->eventout, *to, r->eventin); } this->actions_.ps.pop(); + assert(this->actions_.ps.empty()); } private: @@ -760,7 +830,7 @@ .current_field_value->second->assign( sfnode(ps.children.top().front())); } - actions_.ps.top().children.pop(); + ps.children.pop(); } private: @@ -775,13 +845,13 @@ void operator()() const { assert(!this->actions_.ps.empty()); - assert(!this->actions_.ps.top().node_data_.empty()); - assert(!this->actions_.ps.top().children.empty()); - this->actions_.ps.top().node_data_.top() - .current_field_value->second - ->assign( - mfnode(this->actions_.ps.top().children.top())); - this->actions_.ps.top().children.pop(); + parse_scope & ps = this->actions_.ps.top(); + + assert(!ps.node_data_.empty()); + assert(!ps.children.empty()); + ps.node_data_.top().current_field_value->second + ->assign(mfnode(ps.children.top())); + ps.children.pop(); } private: @@ -1180,6 +1250,9 @@ // // We push a parse_scope onto the stack // * at the scene root + // * when starting a PROTO definition + // * when starting an SFNode or MFNode PROTO default value + // std::stack<parse_scope> ps; private: Modified: trunk/src/libopenvrml/openvrml/scene.cpp =================================================================== --- trunk/src/libopenvrml/openvrml/scene.cpp 2010-08-20 19:26:31 UTC (rev 4187) +++ trunk/src/libopenvrml/openvrml/scene.cpp 2010-09-13 18:13:59 UTC (rev 4188) @@ -3,7 +3,7 @@ // OpenVRML // // Copyright 1998 Chris Morley -// Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Braden McDaniel +// Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 Braden McDaniel // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by @@ -25,6 +25,7 @@ # include <openvrml/local/parse_vrml.h> # include <private.h> # include <boost/function.hpp> +# include <boost/scope_exit.hpp> # ifdef HAVE_CONFIG_H # include <config.h> @@ -161,6 +162,9 @@ /** * @brief Load the @c scene from a stream. * + * This function calls @c #scene_loaded once parsing the scene from @p in has + * completed. + * * @param[in,out] in an input stream. * * @exception bad_media_type if @p in.type() is not @@ -171,6 +175,14 @@ */ void openvrml::scene::load(resource_istream & in) { + // + // Ensure that scene_loaded gets called even if parsing throws. + // + scene & self = *this; + BOOST_SCOPE_EXIT((&self)) { + self.scene_loaded(); + } BOOST_SCOPE_EXIT_END + { using boost::unique_lock; using boost::shared_mutex; @@ -185,7 +197,6 @@ local::parse_vrml(in, in.url(), in.type(), *this, this->nodes_, this->meta_); } - this->scene_loaded(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-14 06:20:31
|
Revision: 4190 http://openvrml.svn.sourceforge.net/openvrml/?rev=4190&view=rev Author: braden Date: 2010-09-14 06:20:25 +0000 (Tue, 14 Sep 2010) Log Message: ----------- Added missing descriptions of LineProperties and FillProperties. Modified Paths: -------------- trunk/ChangeLog trunk/data/component/shape.xml Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-14 03:46:08 UTC (rev 4189) +++ trunk/ChangeLog 2010-09-14 06:20:25 UTC (rev 4190) @@ -1,3 +1,8 @@ +2010-09-14 Braden McDaniel <br...@en...> + + * data/component/shape.xml: Added missing descriptions of + LineProperties and FillProperties. + 2010-09-13 Braden McDaniel <br...@en...> Add (partially) parsed nodes to the scene in the event of an Modified: trunk/data/component/shape.xml =================================================================== --- trunk/data/component/shape.xml 2010-09-14 03:46:08 UTC (rev 4189) +++ trunk/data/component/shape.xml 2010-09-14 06:20:25 UTC (rev 4190) @@ -36,6 +36,13 @@ <field id="texture" type="SFNode" access-type="inputOutput" /> <field id="textureTransform" type="SFNode" access-type="inputOutput" /> </node> + <node id="LineProperties" + metatype-id="urn:X-openvrml:node:LineProperties"> + <field id="metadata" type="SFNode" access-type="inputOutput" /> + <field id="applied" type="SFBool" access-type="inputOutput" /> + <field id="linetype" type="SFInt32" access-type="inputOutput" /> + <field id="linewidthScaleFactor" type="SFFloat" access-type="inputOutput" /> + </node> </level> <level> <node id="Appearance" @@ -47,5 +54,13 @@ <field id="texture" type="SFNode" access-type="inputOutput" /> <field id="textureTransform" type="SFNode" access-type="inputOutput" /> </node> + <node id="FillProperties" + metatype-id="urn:X-openvrml:node:FillProperties"> + <field id="metadata" type="SFNode" access-type="inputOutput" /> + <field id="filled" type="SFBool" access-type="inputOutput" /> + <field id="hatchColor" type="SFColor" access-type="inputOutput" /> + <field id="hatched" type="SFBool" access-type="inputOutput" /> + <field id="hatchStyle" type="SFInt32" access-type="inputOutput" /> + </node> </level> </component> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-15 06:55:25
|
Revision: 4192 http://openvrml.svn.sourceforge.net/openvrml/?rev=4192&view=rev Author: braden Date: 2010-09-15 06:55:19 +0000 (Wed, 15 Sep 2010) Log Message: ----------- JS_NewDoubleValue is deprecated; use JS_NewNumberValue instead. Modified Paths: -------------- trunk/ChangeLog trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-14 06:23:40 UTC (rev 4191) +++ trunk/ChangeLog 2010-09-15 06:55:19 UTC (rev 4192) @@ -1,3 +1,8 @@ +2010-09-15 Braden McDaniel <br...@en...> + + * src/script/javascript.cpp: JS_NewDoubleValue is deprecated; use + JS_NewNumberValue instead. + 2010-09-14 Braden McDaniel <br...@en...> * data/component/shape.xml: Added missing descriptions of Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2010-09-14 06:23:40 UTC (rev 4191) +++ trunk/src/script/javascript.cpp 2010-09-15 06:55:19 UTC (rev 4192) @@ -1329,7 +1329,7 @@ using openvrml::sffloat; const sffloat & f = *polymorphic_downcast<const sffloat *>(&fieldValue); - if (!JS_NewDoubleValue(cx, f.value(), &rval)) { + if (!JS_NewNumberValue(cx, f.value(), &rval)) { rval = JSVAL_NULL; } } @@ -1340,7 +1340,7 @@ using openvrml::sfdouble; const sfdouble & f = *polymorphic_downcast<const sfdouble *>(&fieldValue); - if (!JS_NewDoubleValue(cx, f.value(), &rval)) { + if (!JS_NewNumberValue(cx, f.value(), &rval)) { rval = JSVAL_NULL; } } @@ -1401,7 +1401,7 @@ { const openvrml::sftime & sftime = *polymorphic_downcast<const openvrml::sftime *>(&fieldValue); - if (!JS_NewDoubleValue(cx, sftime.value(), &rval)) { + if (!JS_NewNumberValue(cx, sftime.value(), &rval)) { rval = JSVAL_NULL; } } @@ -1955,7 +1955,7 @@ size_t i; for (i = 0; i < numFloats; ++i) { - if (!JS_NewDoubleValue(cx, floats[i], &jsvec[i])) { + if (!JS_NewNumberValue(cx, floats[i], &jsvec[i])) { return JS_FALSE; } if (!JS_AddRoot(cx, &jsvec[i])) { return JS_FALSE; } @@ -2821,7 +2821,7 @@ if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 3) { - if (!JS_NewDoubleValue(cx, thisColor.value()[JSVAL_TO_INT(id)], rval)) + if (!JS_NewNumberValue(cx, thisColor.value()[JSVAL_TO_INT(id)], rval)) { return JS_FALSE; } @@ -3679,7 +3679,7 @@ if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { - if (!JS_NewDoubleValue(cx, thisRot.value()[JSVAL_TO_INT(id)], rval)) { + if (!JS_NewNumberValue(cx, thisRot.value()[JSVAL_TO_INT(id)], rval)) { return JS_FALSE; } } @@ -4162,7 +4162,7 @@ const sfvec2_t & thisVec = *boost::polymorphic_downcast<sfvec2_t *>(&sfdata.field_value()); - if (!JS_NewDoubleValue(cx, thisVec.value()[JSVAL_TO_INT(id)], rval)) { + if (!JS_NewNumberValue(cx, thisVec.value()[JSVAL_TO_INT(id)], rval)) { return JS_FALSE; } } @@ -4345,7 +4345,7 @@ *boost::polymorphic_downcast<sfvec2_t *>(&arg_sfdata.field_value()); const jsdouble result = thisVec.value().dot(argVec.value()); - if (!JS_NewDoubleValue(cx, result, rval)) { return JS_FALSE; } + if (!JS_NewNumberValue(cx, result, rval)) { return JS_FALSE; } return JS_TRUE; } @@ -4365,7 +4365,7 @@ const sfvec2_t & thisVec = *boost::polymorphic_downcast<sfvec2_t *>(&sfdata.field_value()); - if (!JS_NewDoubleValue(cx, thisVec.value().length(), rval)) { + if (!JS_NewNumberValue(cx, thisVec.value().length(), rval)) { return JS_FALSE; } return JS_TRUE; @@ -4781,7 +4781,7 @@ const sfvec3_t & thisVec = *boost::polymorphic_downcast<sfvec3_t *>(&sfdata.field_value()); - if (!JS_NewDoubleValue(cx, thisVec.value()[JSVAL_TO_INT(id)], vp)) { + if (!JS_NewNumberValue(cx, thisVec.value()[JSVAL_TO_INT(id)], vp)) { return JS_FALSE; } } @@ -5022,7 +5022,7 @@ *boost::polymorphic_downcast<sfvec3_t *>(&arg_sfdata.field_value()); const jsdouble result = thisVec.value().dot(argVec.value()); - if (!JS_NewDoubleValue(cx, result, rval)) { return JS_FALSE; } + if (!JS_NewNumberValue(cx, result, rval)) { return JS_FALSE; } return JS_TRUE; } @@ -5042,7 +5042,7 @@ const sfvec3_t & thisVec = *boost::polymorphic_downcast<sfvec3_t *>(&sfdata.field_value()); - if (!JS_NewDoubleValue(cx, thisVec.value().length(), rval)) { + if (!JS_NewNumberValue(cx, thisVec.value().length(), rval)) { return JS_FALSE; } return JS_TRUE; @@ -5747,7 +5747,7 @@ // try { for (size_t i = length; i < newArray.size(); ++i) { - if (!JS_NewDoubleValue(cx, 0.0, &newArray[i])) { + if (!JS_NewNumberValue(cx, 0.0, &newArray[i])) { throw std::bad_alloc(); } } @@ -6140,7 +6140,7 @@ MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, mffloatObj)); for (size_t i = 0; i < floats.size(); ++i) { - if (!JS_NewDoubleValue(cx, floats[i], &mfdata->array[i])) { + if (!JS_NewNumberValue(cx, floats[i], &mfdata->array[i])) { return JS_FALSE; } } @@ -6212,7 +6212,7 @@ MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, mfdoubleObj)); for (size_t i = 0; i < doubles.size(); ++i) { - if (!JS_NewDoubleValue(cx, doubles[i], &mfdata->array[i])) { + if (!JS_NewNumberValue(cx, doubles[i], &mfdata->array[i])) { return JS_FALSE; } } @@ -7189,7 +7189,7 @@ MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, mftimeObj)); for (size_t i = 0; i < times.size(); ++i) { - if (!JS_NewDoubleValue(cx, times[i], &mfdata->array[i])) { + if (!JS_NewNumberValue(cx, times[i], &mfdata->array[i])) { return JS_FALSE; } } @@ -7599,7 +7599,7 @@ const float (&row)[4] = *static_cast<float (*)[4]>(JS_GetPrivate(cx, obj)); - if (!JS_NewDoubleValue(cx, row[JSVAL_TO_INT(id)], vp)) { + if (!JS_NewNumberValue(cx, row[JSVAL_TO_INT(id)], vp)) { return JS_FALSE; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-15 16:46:37
|
Revision: 4194 http://openvrml.svn.sourceforge.net/openvrml/?rev=4194&view=rev Author: braden Date: 2010-09-15 16:46:30 +0000 (Wed, 15 Sep 2010) Log Message: ----------- JS_NewDouble is deprecated; use JS_NewNumberValue instead. Modified Paths: -------------- trunk/ChangeLog trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-15 06:58:25 UTC (rev 4193) +++ trunk/ChangeLog 2010-09-15 16:46:30 UTC (rev 4194) @@ -1,5 +1,10 @@ 2010-09-15 Braden McDaniel <br...@en...> + * src/script/javascript.cpp: JS_NewDouble is deprecated; use + JS_NewNumberValue instead. + +2010-09-15 Braden McDaniel <br...@en...> + * src/script/javascript.cpp: JS_NewDoubleValue is deprecated; use JS_NewNumberValue instead. Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2010-09-15 06:58:25 UTC (rev 4193) +++ trunk/src/script/javascript.cpp 2010-09-15 16:46:30 UTC (rev 4194) @@ -2210,14 +2210,12 @@ uintN, jsval *, jsval * const rval) OPENVRML_NOTHROW { - script * const s = - static_cast<script *>(JS_GetContextPrivate(cx)); + script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); - float speed = s->script_node().node::type().metatype() - .browser().current_speed(); - *rval = DOUBLE_TO_JSVAL(JS_NewDouble( cx, speed )); - return JS_TRUE; + const jsdouble speed = + s->script_node().type().metatype().browser().current_speed(); + return JS_NewNumberValue(cx, speed, rval); } JSBool getCurrentFrameRate(JSContext * const cx, @@ -2230,11 +2228,9 @@ script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); - jsdouble * d = JS_NewDouble(cx, - s->script_node().node::type().metatype() - .browser().frame_rate()); - *rval = DOUBLE_TO_JSVAL(d); - return JS_TRUE; + const jsdouble frame_rate = + s->script_node().type().metatype().browser().frame_rate(); + return JS_NewNumberValue(cx, frame_rate, rval); } JSBool getWorldURL(JSContext * const cx, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-18 17:54:58
|
Revision: 4196 http://openvrml.svn.sourceforge.net/openvrml/?rev=4196&view=rev Author: braden Date: 2010-09-18 17:54:51 +0000 (Sat, 18 Sep 2010) Log Message: ----------- SpiderMonkey included in the forthcoming XULRunner 1.9.3 includes changes to the JSPropertyOp function signature: a parameter that was a jsval in previous versions is now a jsid. Test for this and adjust our usage accordingly. Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-15 16:50:40 UTC (rev 4195) +++ trunk/ChangeLog 2010-09-18 17:54:51 UTC (rev 4196) @@ -1,3 +1,13 @@ +2010-09-18 Braden McDaniel <br...@en...> + + SpiderMonkey included in the forthcoming XULRunner 1.9.3 includes + changes to the JSPropertyOp function signature: a parameter that + was a jsval in previous versions is now a jsid. Test for this and + adjust our usage accordingly. + + * configure.ac + * src/script/javascript.cpp + 2010-09-15 Braden McDaniel <br...@en...> * src/script/javascript.cpp: JS_NewDouble is deprecated; use Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2010-09-15 16:50:40 UTC (rev 4195) +++ trunk/configure.ac 2010-09-18 17:54:51 UTC (rev 4196) @@ -149,6 +149,36 @@ CPPFLAGS=$ov_save_CPPFLAGS # +# The JSPropertyOp function signature changed from XULRunner 1.9.2 to +# 1.9.3: the third argument changed from jsval to jsid. +# +AC_CACHE_CHECK([whether JSPropertyOp uses jsid], +[ov_cv_jspropertyop_uses_jsid], +[ov_cv_jspropertyop_uses_jsid=no +# +# Test using C++ since C probably doesn't care so much about the type. +# +ov_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$JS_CFLAGS $CPPFLAGS" +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <jsapi.h>]], +[[ +JSBool (*fn)(JSContext *, JSObject *, jsval, jsval*); +JSPropertyOp op = fn; +]])], , +[ov_cv_jspropertyop_uses_jsid=yes]) +AC_LANG_POP([C++]) +CPPFLAGS=$ov_save_CPPFLAGS +]) +AS_IF([test X$ov_cv_jspropertyop_uses_jsid = Xyes], + [jspropertyop_uses_jsid=1], + [jspropertyop_uses_jsid=0]) +AC_DEFINE_UNQUOTED([OPENVRML_JSPROPERTYOP_USES_JSID], + [$jspropertyop_uses_jsid], + [Whether JSPropertyOp function signatures use jsid]) + +# # openvrml-xembed and openvrml-player both use GOption, which was # introduced in GLib 2.6. # Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2010-09-15 16:50:40 UTC (rev 4195) +++ trunk/src/script/javascript.cpp 2010-09-18 17:54:51 UTC (rev 4196) @@ -38,6 +38,30 @@ namespace { +# if OPENVRML_JSPROPERTYOP_USES_JSID + typedef jsid jspropertyop_id; +# else + typedef jsval jspropertyop_id; +# endif + + JSBool jspropertyop_id_is_int(const jspropertyop_id id) + { +# if OPENVRML_JSPROPERTYOP_USES_JSID + return JSID_IS_INT(id); +# else + return JSVAL_IS_INT(id); +# endif + } + + ::int32 jspropertyop_id_to_int(const jspropertyop_id id) + { +# if OPENVRML_JSPROPERTYOP_USES_JSID + return JSID_TO_INT(id); +# else + return JSVAL_TO_INT(id); +# endif + } + class SFNode; class MFNode; @@ -98,7 +122,7 @@ private: static JSBool field_setProperty(JSContext * cx, JSObject * obj, - jsval id, jsval * val) + jspropertyop_id id, jsval * val) OPENVRML_NOTHROW; virtual void do_initialize(double timeStamp); @@ -359,10 +383,12 @@ static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&rgb)[3]) OPENVRML_NOTHROW; - static JSBool getProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; - static JSBool setProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; + static JSBool getProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; + static JSBool setProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool setHSV(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -392,10 +418,12 @@ uint32 x, uint32 y, uint32 comp, JSObject * pixels_obj) OPENVRML_NOTHROW; - static JSBool getProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; - static JSBool setProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; + static JSBool getProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; + static JSBool setProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; }; class OPENVRML_JAVASCRIPT_LOCAL SFNode : public sfield { @@ -419,10 +447,10 @@ JSString * vrmlstring) OPENVRML_NOTHROW; static JSBool getProperty(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setProperty(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; }; @@ -446,10 +474,12 @@ static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&rot)[4]) OPENVRML_NOTHROW; - static JSBool getProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; - static JSBool setProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; + static JSBool getProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; + static JSBool setProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool getAxis(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -483,11 +513,11 @@ static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&vec)[2]) OPENVRML_NOTHROW; - static JSBool getProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * rval) + static JSBool getProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * rval) OPENVRML_NOTHROW; - static JSBool setProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) + static JSBool setProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool add(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) @@ -558,10 +588,12 @@ static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&vec)[3]) OPENVRML_NOTHROW; - static JSBool getProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; - static JSBool setProperty(JSContext * cx, JSObject * obj, jsval id, - jsval * vp) OPENVRML_NOTHROW; + static JSBool getProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; + static JSBool setProperty(JSContext * cx, JSObject * obj, + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool add(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; static JSBool cross(JSContext * cx, JSObject * obj, @@ -638,9 +670,11 @@ OPENVRML_NOTHROW; static JSBool getElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool getLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; private: MField(); @@ -661,9 +695,11 @@ uintN argc, jsval * argv, jsval * vp) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -690,9 +726,11 @@ uintN argc, jsval * argv, jsval * vp) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -721,9 +759,9 @@ static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv); static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp); + jspropertyop_id id, jsval * vp); static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp); + jspropertyop_id id, jsval * vp); static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static void finalize(JSContext * cx, JSObject * obj); @@ -785,9 +823,9 @@ static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv); static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp); + jspropertyop_id id, jsval * vp); static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp); + jspropertyop_id id, jsval * vp); static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static void finalize(JSContext * cx, JSObject * obj); @@ -818,9 +856,11 @@ static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -861,9 +901,11 @@ static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) OPENVRML_NOTHROW; + jspropertyop_id id, jsval * vp) + OPENVRML_NOTHROW; static JSBool toString(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; @@ -956,10 +998,10 @@ jsval * vp) OPENVRML_NOTHROW; static JSBool getElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; }; @@ -975,10 +1017,10 @@ const jsdouble (&mat)[16]) OPENVRML_NOTHROW; static JSBool getElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, - jsval id, jsval * vp) + jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setTransform(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) @@ -1018,7 +1060,7 @@ OPENVRML_JAVASCRIPT_LOCAL JSBool eventOut_setProperty(JSContext * cx, JSObject * obj, - jsval id, + jspropertyop_id id, jsval * val) OPENVRML_NOTHROW; @@ -1607,7 +1649,7 @@ JSBool eventOut_setProperty(JSContext * const cx, JSObject *, - const jsval id, + const jspropertyop_id id, jsval * const val) OPENVRML_NOTHROW { @@ -1662,7 +1704,7 @@ JSBool script::field_setProperty(JSContext * const cx, JSObject *, - const jsval id, + const jspropertyop_id id, jsval * const val) OPENVRML_NOTHROW { @@ -2803,7 +2845,7 @@ JSBool SFColor::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const rval) OPENVRML_NOTHROW { @@ -2814,10 +2856,11 @@ *boost::polymorphic_downcast<openvrml::sfcolor *>( &sfdata.field_value()); - if (JSVAL_IS_INT(id) - && JSVAL_TO_INT(id) >= 0 - && JSVAL_TO_INT(id) < 3) { - if (!JS_NewNumberValue(cx, thisColor.value()[JSVAL_TO_INT(id)], rval)) + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 + && jspropertyop_id_to_int(id) < 3) { + if (!JS_NewNumberValue(cx, thisColor.value()[jspropertyop_id_to_int(id)], + rval)) { return JS_FALSE; } @@ -2827,7 +2870,7 @@ JSBool SFColor::setProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -2838,8 +2881,8 @@ *boost::polymorphic_downcast<openvrml::sfcolor *>( &sfdata.field_value()); - if (!JSVAL_IS_INT(id) - || JSVAL_TO_INT(id) < 0 || JSVAL_TO_INT(id) > 2) { + if (!jspropertyop_id_is_int(id) + || jspropertyop_id_to_int(id) < 0 || jspropertyop_id_to_int(id) > 2) { JS_ReportError(cx, "component index out of range"); return JS_FALSE; } @@ -2854,7 +2897,7 @@ openvrml::color val = thisColor.value(); - switch (JSVAL_TO_INT(id)) { + switch (jspropertyop_id_to_int(id)) { case 0: val.r(float(d)); break; @@ -3132,7 +3175,7 @@ */ JSBool SFImage::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -3143,8 +3186,8 @@ *boost::polymorphic_downcast<openvrml::sfimage *>( &sfdata.field_value()); - if (JSVAL_IS_INT(id)) { - switch (JSVAL_TO_INT(id)) { + if (jspropertyop_id_is_int(id)) { + switch (jspropertyop_id_to_int(id)) { case 0: *vp = INT_TO_JSVAL(thisImage.value().x()); break; @@ -3167,7 +3210,8 @@ * * @todo Implement me! */ - JSBool SFImage::setProperty(JSContext *, JSObject *, jsval , jsval *) + JSBool SFImage::setProperty(JSContext *, JSObject *, + jspropertyop_id, jsval *) OPENVRML_NOTHROW { // ... @@ -3363,7 +3407,7 @@ // JSBool SFNode::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -3395,7 +3439,7 @@ JSBool SFNode::setProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -3662,7 +3706,7 @@ JSBool SFRotation::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const rval) OPENVRML_NOTHROW { @@ -3673,9 +3717,10 @@ *boost::polymorphic_downcast<openvrml::sfrotation *>( &sfdata.field_value()); - if (JSVAL_IS_INT(id) - && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { - if (!JS_NewNumberValue(cx, thisRot.value()[JSVAL_TO_INT(id)], rval)) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 4) { + if (!JS_NewNumberValue(cx, thisRot.value()[jspropertyop_id_to_int(id)], rval)) + { return JS_FALSE; } } @@ -3684,7 +3729,7 @@ JSBool SFRotation::setProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -3695,15 +3740,15 @@ *boost::polymorphic_downcast<openvrml::sfrotation *>( &sfdata.field_value()); - if (JSVAL_IS_INT(id) - && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 4) { jsdouble d; if (!JS_ValueToNumber(cx, *vp, &d)) { return JS_FALSE; } openvrml::vec3f axis = thisRot.value().axis(); float angle = thisRot.value().angle(); - switch (JSVAL_TO_INT(id)) { + switch (jspropertyop_id_to_int(id)) { case 0: axis.x(float(d)); break; @@ -4145,20 +4190,22 @@ template <typename SFVec2> JSBool sfvec2_jsobject<SFVec2>::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const rval) OPENVRML_NOTHROW { typedef typename SFVec2::field_type sfvec2_t; - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 2) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 2) { assert(JS_GetPrivate(cx, obj)); const sfield::sfdata & sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); const sfvec2_t & thisVec = *boost::polymorphic_downcast<sfvec2_t *>(&sfdata.field_value()); - if (!JS_NewNumberValue(cx, thisVec.value()[JSVAL_TO_INT(id)], rval)) { + if (!JS_NewNumberValue(cx, thisVec.value()[jspropertyop_id_to_int(id)], + rval)) { return JS_FALSE; } } @@ -4168,14 +4215,15 @@ template <typename SFVec2> JSBool sfvec2_jsobject<SFVec2>::setProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { typedef typename SFVec2::field_type sfvec2_t; typedef typename SFVec2::value_type vec2_t; - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 2) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 2) { assert(JS_GetPrivate(cx, obj)); sfield::sfdata & sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); @@ -4190,7 +4238,7 @@ } vec2_t temp = thisVec.value(); - switch (JSVAL_TO_INT(id)) { + switch (jspropertyop_id_to_int(id)) { case 0: temp.x(d); break; @@ -4764,20 +4812,22 @@ template <typename SFVec3> JSBool sfvec3_jsobject<SFVec3>::getProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { typedef typename SFVec3::field_type sfvec3_t; - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 3) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 3) { assert(JS_GetPrivate(cx, obj)); const sfield::sfdata & sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); const sfvec3_t & thisVec = *boost::polymorphic_downcast<sfvec3_t *>(&sfdata.field_value()); - if (!JS_NewNumberValue(cx, thisVec.value()[JSVAL_TO_INT(id)], vp)) { + if (!JS_NewNumberValue(cx, thisVec.value()[jspropertyop_id_to_int(id)], + vp)) { return JS_FALSE; } } @@ -4787,14 +4837,15 @@ template <typename SFVec3> JSBool sfvec3_jsobject<SFVec3>::setProperty(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { typedef typename SFVec3::field_type sfvec3_t; typedef typename SFVec3::value_type vec3_t; - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 3) { + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 3) { assert(JS_GetPrivate(cx, obj)); sfield::sfdata & sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); @@ -4809,7 +4860,7 @@ } vec3_t temp = thisVec.value(); - switch (JSVAL_TO_INT(id)) { + switch (jspropertyop_id_to_int(id)) { case 0: temp.x(d); break; @@ -5316,7 +5367,7 @@ JSBool MField::getElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -5326,17 +5377,17 @@ MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); - if (JSVAL_IS_INT(id) - && JSVAL_TO_INT(id) >= 0 - && size_t(JSVAL_TO_INT(id)) < mfdata->array.size()) { - *vp = mfdata->array[JSVAL_TO_INT(id)]; + if (jspropertyop_id_is_int(id) + && jspropertyop_id_to_int(id) >= 0 + && size_t(jspropertyop_id_to_int(id)) < mfdata->array.size()) { + *vp = mfdata->array[jspropertyop_id_to_int(id)]; } return JS_TRUE; } JSBool MField::getLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) OPENVRML_NOTHROW { @@ -5437,14 +5488,15 @@ template <typename Subclass> JSBool MFJSObject<Subclass>::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { assert(cx); assert(obj); assert(vp); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) > 0) { + + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) > 0) { MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); @@ -5461,15 +5513,15 @@ // // Grow array if necessary. // - if (size_t(JSVAL_TO_INT(id)) >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + if (size_t(jspropertyop_id_to_int(id)) >= mfdata->array.size()) { + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } // // Put the new element in the array. // - mfdata->array[JSVAL_TO_INT(id)] = *vp; + mfdata->array[jspropertyop_id_to_int(id)] = *vp; mfdata->changed = true; } return JS_TRUE; @@ -5478,7 +5530,7 @@ template <typename Subclass> JSBool MFJSObject<Subclass>::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) OPENVRML_NOTHROW { @@ -5668,11 +5720,11 @@ template <typename Subclass> JSBool MFJSDouble<Subclass>::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0) { + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0) { MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); @@ -5685,15 +5737,16 @@ // // Grow array if necessary. // - if (size_t(JSVAL_TO_INT(id)) >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + if (size_t(jspropertyop_id_to_int(id)) >= mfdata->array.size()) { + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } // // Put the new element in the array. // - if (!JS_NewNumberValue(cx, number, &mfdata->array[JSVAL_TO_INT(id)])) { + if (!JS_NewNumberValue(cx, number, + &mfdata->array[jspropertyop_id_to_int(id)])) { return JS_FALSE; } mfdata->changed = true; @@ -5704,7 +5757,7 @@ template <typename Subclass> JSBool MFJSDouble<Subclass>::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) OPENVRML_NOTHROW { @@ -5924,15 +5977,15 @@ JSBool MFBool::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) { assert(cx); assert(obj); assert(vp); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0) { - const size_t index = JSVAL_TO_INT(id); + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0) { + const size_t index = jspropertyop_id_to_int(id); MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); @@ -5941,7 +5994,7 @@ // Grow array if necessary. // if (index >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } @@ -5959,7 +6012,7 @@ JSBool MFBool::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) { assert(cx); @@ -6384,15 +6437,15 @@ JSBool MFInt32::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) { assert(cx); assert(obj); assert(vp); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0) { - const size_t index = JSVAL_TO_INT(id); + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0) { + const size_t index = jspropertyop_id_to_int(id); MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); @@ -6401,7 +6454,7 @@ // Grow array if necessary. // if (index >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } @@ -6421,7 +6474,7 @@ JSBool MFInt32::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) { assert(cx); @@ -6641,7 +6694,7 @@ JSBool MFNode::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { @@ -6649,7 +6702,7 @@ assert(obj); assert(vp); - if (!JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0) { + if (!jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0) { MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); @@ -6669,15 +6722,15 @@ // // Grow array if necessary. // - if (size_t(JSVAL_TO_INT(id)) >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + if (size_t(jspropertyop_id_to_int(id)) >= mfdata->array.size()) { + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } // // Put the new element in the array. // - mfdata->array[JSVAL_TO_INT(id)] = *vp; + mfdata->array[jspropertyop_id_to_int(id)] = *vp; mfdata->changed = true; } return JS_TRUE; @@ -6685,7 +6738,7 @@ JSBool MFNode::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) OPENVRML_NOTHROW { @@ -7024,19 +7077,19 @@ JSBool MFString::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0) { + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0) { MFData * const mfdata = static_cast<MFData *>(JS_GetPrivate(cx, obj)); assert(mfdata); // // Grow array if necessary. // - if (size_t(JSVAL_TO_INT(id)) >= mfdata->array.size()) { - jsval newLength = INT_TO_JSVAL(JSVAL_TO_INT(id) + 1); + if (size_t(jspropertyop_id_to_int(id)) >= mfdata->array.size()) { + jsval newLength = INT_TO_JSVAL(jspropertyop_id_to_int(id) + 1); if (!setLength(cx, obj, 0, &newLength)) { return JS_FALSE; } } @@ -7049,7 +7102,7 @@ // // Put the new element in the array. // - mfdata->array[JSVAL_TO_INT(id)] = STRING_TO_JSVAL(str); + mfdata->array[jspropertyop_id_to_int(id)] = STRING_TO_JSVAL(str); mfdata->changed = true; } return JS_TRUE; @@ -7057,7 +7110,7 @@ JSBool MFString::setLength(JSContext * const cx, JSObject * const obj, - jsval, + jspropertyop_id, jsval * const vp) OPENVRML_NOTHROW { @@ -7583,39 +7636,41 @@ JSBool VrmlMatrix::Row::getElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { assert(cx); assert(obj); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 4) { assert(JS_GetPrivate(cx, obj)); const float (&row)[4] = *static_cast<float (*)[4]>(JS_GetPrivate(cx, obj)); - if (!JS_NewNumberValue(cx, row[JSVAL_TO_INT(id)], vp)) { + if (!JS_NewNumberValue(cx, row[jspropertyop_id_to_int(id)], vp)) { return JS_FALSE; } } return JS_TRUE; } - JSBool VrmlMatrix::Row::setElement(JSContext * const cx, JSObject * const obj, - const jsval id, jsval * const vp) + JSBool VrmlMatrix::Row::setElement(JSContext * const cx, + JSObject * const obj, + const jspropertyop_id id, + jsval * const vp) OPENVRML_NOTHROW { assert(cx); assert(obj); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 4) { jsdouble d; if (!JS_ValueToNumber(cx, *vp, &d)) { return JS_FALSE; } assert(JS_GetPrivate(cx, obj)); float (&row)[4] = *static_cast<float (*)[4]>(JS_GetPrivate(cx, obj)); - row[JSVAL_TO_INT(id)] = float(d); + row[jspropertyop_id_to_int(id)] = float(d); } return JS_TRUE; } @@ -7718,14 +7773,14 @@ JSBool VrmlMatrix::getElement(JSContext * const cx, JSObject * const obj, - const jsval id, + const jspropertyop_id id, jsval * const vp) OPENVRML_NOTHROW { assert(cx); assert(obj); - if (JSVAL_IS_INT(id) && JSVAL_TO_INT(id) >= 0 && JSVAL_TO_INT(id) < 4) { + if (jspropertyop_id_is_int(id) && jspropertyop_id_to_int(id) >= 0 && jspropertyop_id_to_int(id) < 4) { using openvrml::mat4f; mat4f * const thisMat = static_cast<mat4f *>(JS_GetPrivate(cx, obj)); @@ -7736,14 +7791,15 @@ JS_GetParent(cx, obj)); if (!robj) { return JS_FALSE; } - float (&row)[4] = (*thisMat)[JSVAL_TO_INT(id)]; + float (&row)[4] = (*thisMat)[jspropertyop_id_to_int(id)]; if (!JS_SetPrivate(cx, robj, &row)) { return JS_FALSE; } *vp = OBJECT_TO_JSVAL(robj); } return JS_TRUE; } - JSBool VrmlMatrix::setElement(JSContext *, JSObject *, jsval, jsval *) + JSBool VrmlMatrix::setElement(JSContext *, JSObject *, + jspropertyop_id, jsval *) OPENVRML_NOTHROW { return JS_TRUE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-09-20 03:09:21
|
Revision: 4201 http://openvrml.svn.sourceforge.net/openvrml/?rev=4201&view=rev Author: braden Date: 2010-09-20 03:09:12 +0000 (Mon, 20 Sep 2010) Log Message: ----------- SpiderMonkey included in the forthcoming XULRunner 1.9.3 removes JS_AddRoot and JS_RemoveRoot and replaces them with type-specific functions. Test for this and adjust our usage accordingly. Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-18 20:36:20 UTC (rev 4200) +++ trunk/ChangeLog 2010-09-20 03:09:12 UTC (rev 4201) @@ -1,3 +1,12 @@ +2010-09-19 Braden McDaniel <br...@en...> + + SpiderMonkey included in the forthcoming XULRunner 1.9.3 removes + JS_AddRoot and JS_RemoveRoot and replaces them with type-specific + functions. Test for this and adjust our usage accordingly. + + * configure.ac + * src/script/javascript.cpp + 2010-09-18 Braden McDaniel <br...@en...> * src/Makefile.am (EXTRA_DIST): Fixed directory for openvrml-gl.rc Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2010-09-18 20:36:20 UTC (rev 4200) +++ trunk/configure.ac 2010-09-20 03:09:12 UTC (rev 4201) @@ -179,6 +179,27 @@ [Whether JSPropertyOp function signatures use jsid]) # +# XULRunner 1.9.3 replaced JS_{Add,Remove}Root with type-specific +# functions. +# +AC_CACHE_CHECK([whether SpiderMonkey uses type-specific root functions], +[ov_cv_js_uses_typed_root_functions], +[ov_cv_js_uses_typed_root_functions=no +ov_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$JS_CFLAGS $CPPFLAGS" +AC_LANG_PUSH([C]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <jsapi.h>]], +[[JS_AddNamedRoot(0, 0);]])], +[ov_cv_js_uses_typed_root_functions=yes]) +AC_LANG_POP([C]) +CPPFLAGS=$ov_save_CPPFLAGS +]) +AS_IF([test X$ov_cv_js_uses_typed_root_functions = Xyes], + [AC_DEFINE([OPENVRML_JS_HAS_TYPED_ROOT_FUNCTIONS], [1], + [Defined if SpiderMonkey uses type-specific add/remove root functions])]) + +# # openvrml-xembed and openvrml-player both use GOption, which was # introduced in GLib 2.6. # Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2010-09-18 20:36:20 UTC (rev 4200) +++ trunk/src/script/javascript.cpp 2010-09-20 03:09:12 UTC (rev 4201) @@ -62,6 +62,26 @@ # endif } + OPENVRML_LOCAL JSBool add_value_root(JSContext * const cx, + jsval * const vp) + { +# ifdef OPENVRML_JS_HAS_TYPED_ROOT_FUNCTIONS + return JS_AddValueRoot(cx, vp); +# else + return JS_AddRoot(cx, vp); +# endif + } + + OPENVRML_LOCAL JSBool remove_value_root(JSContext * const cx, + jsval * const vp) + { +# ifdef OPENVRML_JS_HAS_TYPED_ROOT_FUNCTIONS + return JS_RemoveValueRoot(cx, vp); +# else + return JS_RemoveRoot(cx, vp); +# endif + } + class SFNode; class MFNode; @@ -1266,7 +1286,7 @@ assert(argv[i]); jsargv[i] = vrmlFieldToJSVal(*argv[i]); if (JSVAL_IS_GCTHING(jsargv[i])) { - if (!JS_AddRoot(this->cx, &jsargv[i])) { + if (!add_value_root(this->cx, &jsargv[i])) { throw std::bad_alloc(); } } @@ -1284,7 +1304,7 @@ for (i = 0; i < argc; ++i) { assert(jsargv[i] != JSVAL_NULL); if (JSVAL_IS_GCTHING(jsargv[i])) { - ok = JS_RemoveRoot(cx, &jsargv[i]); + ok = remove_value_root(cx, &jsargv[i]); assert(ok); } } @@ -2000,7 +2020,7 @@ if (!JS_NewNumberValue(cx, floats[i], &jsvec[i])) { return JS_FALSE; } - if (!JS_AddRoot(cx, &jsvec[i])) { return JS_FALSE; } + if (!add_value_root(cx, &jsvec[i])) { return JS_FALSE; } } JSObject * arr = 0; @@ -2009,7 +2029,7 @@ if (arr) { *rval = OBJECT_TO_JSVAL(arr); } } - for (size_t j = 0; j < i; ++j) { JS_RemoveRoot(cx, &jsvec[j]); } + for (size_t j = 0; j < i; ++j) { remove_value_root(cx, &jsvec[j]); } if (!arr) { return JS_FALSE; } @@ -5346,11 +5366,11 @@ size_t i; try { for (i = 0; i < jsvalArray.size(); ++i) { - if (!JS_AddRoot(cx, &jsvalArray[i])) { throw bad_alloc(); } + if (!add_value_root(cx, &jsvalArray[i])) { throw bad_alloc(); } } } catch (bad_alloc &) { for (size_t j = 0; j < i - 1; ++j) { - JS_RemoveRoot(cx, &jsvalArray[j]); + remove_value_root(cx, &jsvalArray[j]); } throw; } @@ -5360,7 +5380,7 @@ OPENVRML_NOTHROW { for (size_t i = 0; i < jsvalArray.size(); ++i) { - const JSBool ok = JS_RemoveRoot(cx, &jsvalArray[i]); + const JSBool ok = remove_value_root(cx, &jsvalArray[i]); assert(ok); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2010-11-02 03:08:25
|
Revision: 4203 http://openvrml.svn.sourceforge.net/openvrml/?rev=4203&view=rev Author: braden Date: 2010-11-02 03:08:18 +0000 (Tue, 02 Nov 2010) Log Message: ----------- Boost.Filesystem headers include inline functions that call Boost.System functions. Programs/libraries that use Boost.Filesystem need to link with libboost_system as well as libboost_filesystem. The Mac OS X linker seems to be the only one that actually cares about this detail. Modified Paths: -------------- trunk/ChangeLog trunk/src/Makefile.am Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-20 03:12:02 UTC (rev 4202) +++ trunk/ChangeLog 2010-11-02 03:08:18 UTC (rev 4203) @@ -1,3 +1,15 @@ +2010-11-01 Braden McDaniel <br...@en...> + + Boost.Filesystem headers include inline functions that call + Boost.System functions. Programs/libraries that use + Boost.Filesystem need to link with libboost_system as well as + libboost_filesystem. The Mac OS X linker seems to be the only one + that actually cares about this detail. + + * src/Makefile.am + (libopenvrml_libopenvrml_la_LIBADD): Link with libboost_system. + (local_libopenvrml_dl_la_LIBADD): Link with libboost_system. + 2010-09-19 Braden McDaniel <br...@en...> SpiderMonkey included in the forthcoming XULRunner 1.9.3 removes Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2010-09-20 03:12:02 UTC (rev 4202) +++ trunk/src/Makefile.am 2010-11-02 03:08:18 UTC (rev 4203) @@ -124,7 +124,8 @@ libopenvrml_libopenvrml_la_LIBADD = \ local/libopenvrml-dl.la \ -lboost_thread$(BOOST_LIB_SUFFIX) \ - -lboost_filesystem$(BOOST_LIB_SUFFIX) + -lboost_filesystem$(BOOST_LIB_SUFFIX) \ + -lboost_system$(BOOST_LIB_SUFFIX) local_libopenvrml_dl_la_SOURCES = \ local/libopenvrml-dl/openvrml/local/dl.cpp \ @@ -134,6 +135,7 @@ -I$(top_srcdir)/src/libopenvrml local_libopenvrml_dl_la_LIBADD = \ -lboost_filesystem$(BOOST_LIB_SUFFIX) \ + -lboost_system$(BOOST_LIB_SUFFIX) \ -lltdl openvrmlscriptdir = $(pkglibdir)/script This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-22 07:37:53
|
Revision: 4206 http://openvrml.svn.sourceforge.net/openvrml/?rev=4206&view=rev Author: braden Date: 2011-01-22 07:37:47 +0000 (Sat, 22 Jan 2011) Log Message: ----------- SpiderMonkey included in the forthcoming XULRunner 2.0 changes the return value of JSVAL_TO_DOUBLE to a double (instead of a pointer). Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-02 06:18:43 UTC (rev 4205) +++ trunk/ChangeLog 2011-01-22 07:37:47 UTC (rev 4206) @@ -1,3 +1,12 @@ +2011-01-22 Braden McDaniel <br...@en...> + + SpiderMonkey included in the forthcoming XULRunner 2.0 changes the + return value of JSVAL_TO_DOUBLE to a double (instead of a + pointer). + + * configure.ac + * src/script/javascript.cpp + 2010-11-01 Braden McDaniel <br...@en...> Boost.Filesystem headers include inline functions that call Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-01-02 06:18:43 UTC (rev 4205) +++ trunk/configure.ac 2011-01-22 07:37:47 UTC (rev 4206) @@ -149,6 +149,29 @@ CPPFLAGS=$ov_save_CPPFLAGS # +# jsval changed from being 32- to 64-bits in XULRunner 2.0. +# +AC_CACHE_CHECK([whether JSVAL_TO_DOUBLE returns a pointer], +[ov_cv_jsval_to_double_returns_pointer], +[ov_cv_jsval_to_double_returns_pointer=no +ov_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$JS_CFLAGS $CPPFLAGS" +AC_LANG_PUSH([C]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <jsapi.h>]], +[[ +jsval val; +*JSVAL_TO_DOUBLE; +]])], +[ov_cv_jsval_to_double_returns_pointer=yes]) +AC_LANG_POP([C]) +CPPFLAGS=$ov_save_CPPFLAGS +]) +AS_IF([test X$ov_cv_jsval_to_double_returns_pointer = Xyes], + [AC_DEFINE([OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER], [1], + [SpiderMonkey's JSVAL_TO_DOUBLE returns a pointer])]) + +# # The JSPropertyOp function signature changed from XULRunner 1.9.2 to # 1.9.3: the third argument changed from jsval to jsid. # Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2011-01-02 06:18:43 UTC (rev 4205) +++ trunk/src/script/javascript.cpp 2011-01-22 07:37:47 UTC (rev 4206) @@ -82,6 +82,15 @@ # endif } + OPENVRML_LOCAL jsdouble jsval_to_double(const jsval val) + { +# if OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER + return *JSVAL_TO_DOUBLE(val); +# else + return JSVAL_TO_DOUBLE(val); +# endif + } + class SFNode; class MFNode; @@ -5856,7 +5865,7 @@ out << '['; for (JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_DOUBLE(mfdata->array[i])); - out << *JSVAL_TO_DOUBLE(mfdata->array[i]); + out << jsval_to_double(mfdata->array[i]); if ((i + 1) < mfdata->array.size()) { out << ", "; } } out << ']'; @@ -6235,7 +6244,7 @@ std::vector<float> temp = mffloat->value(); for (MField::JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_DOUBLE(mfdata->array[i])); - temp[i] = float(*JSVAL_TO_DOUBLE(mfdata->array[i])); + temp[i] = float(jsval_to_double(mfdata->array[i])); } mffloat->value(temp); return mffloat; @@ -6307,7 +6316,7 @@ std::vector<double> temp = mfdouble->value(); for (MField::JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_DOUBLE(mfdata->array[i])); - temp[i] = *JSVAL_TO_DOUBLE(mfdata->array[i]); + temp[i] = jsval_to_double(mfdata->array[i]); } mfdouble->value(temp); return mfdouble; @@ -7284,7 +7293,7 @@ std::vector<double> temp = mftime->value(); for (MField::JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_DOUBLE(mfdata->array[i])); - temp[i] = *JSVAL_TO_DOUBLE(mfdata->array[i]); + temp[i] = jsval_to_double(mfdata->array[i]); } mftime->value(temp); return mftime; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-23 08:22:05
|
Revision: 4208 http://openvrml.svn.sourceforge.net/openvrml/?rev=4208&view=rev Author: braden Date: 2011-01-23 08:21:57 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Fix test to check whether JSVAL_TO_DOUBLE returns a pointer. Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-22 07:49:29 UTC (rev 4207) +++ trunk/ChangeLog 2011-01-23 08:21:57 UTC (rev 4208) @@ -1,3 +1,8 @@ +2011-01-23 Braden McDaniel <br...@en...> + + * configure.ac: Fix test to check whether JSVAL_TO_DOUBLE returns + a pointer. + 2011-01-22 Braden McDaniel <br...@en...> SpiderMonkey included in the forthcoming XULRunner 2.0 changes the Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-01-22 07:49:29 UTC (rev 4207) +++ trunk/configure.ac 2011-01-23 08:21:57 UTC (rev 4208) @@ -161,7 +161,7 @@ [[#include <jsapi.h>]], [[ jsval val; -*JSVAL_TO_DOUBLE; +*JSVAL_TO_DOUBLE(val); ]])], [ov_cv_jsval_to_double_returns_pointer=yes]) AC_LANG_POP([C]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-23 22:31:13
|
Revision: 4210 http://openvrml.svn.sourceforge.net/openvrml/?rev=4210&view=rev Author: braden Date: 2011-01-23 22:31:07 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Use JS_EncodeString instead of the obsolete JS_GetStringBytes. Modified Paths: -------------- trunk/configure.ac trunk/src/script/javascript.cpp Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-01-23 08:32:32 UTC (rev 4209) +++ trunk/configure.ac 2011-01-23 22:31:07 UTC (rev 4210) @@ -132,8 +132,11 @@ PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.3.0], , [have_fontconfig=no]) PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.2], , [have_freetype=no]) +# +# Require at least XULRunner 1.9 for JS_EncodeString. +# have_libmozjs=yes -PKG_CHECK_MODULES([JS], [mozilla-js >= 1.8.1.8], , [have_libmozjs=no]) +PKG_CHECK_MODULES([JS], [mozilla-js >= 1.9], , [have_libmozjs=no]) # # JS_BeginRequest should be there only if SpiderMonkey was built with # -DJS_THREADSAFE. Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2011-01-23 08:32:32 UTC (rev 4209) +++ trunk/src/script/javascript.cpp 2011-01-23 22:31:07 UTC (rev 4210) @@ -1686,7 +1686,7 @@ JSString * const str = JS_ValueToString(cx, id); if (!str) { return JS_FALSE; } - const char * const eventId = JS_GetStringBytes(str); + const char * const eventId = JS_EncodeString(cx, str); // // The script object pointer is stored as private data in the @@ -1741,7 +1741,7 @@ JSString * const str = JS_ValueToString(cx, id); if (!str) { return JS_FALSE; } - const char * const fieldId = JS_GetStringBytes(str); + const char * const fieldId = JS_EncodeString(cx, str); // // The script object pointer is stored as private data in the @@ -2126,7 +2126,7 @@ // return auto_ptr<field_value> (new sfstring(jsstring - ? JS_GetStringBytes(jsstring) + ? JS_EncodeString(cx, jsstring) : "")); } @@ -2242,7 +2242,7 @@ JSString * const str = JS_ValueToString(cx, argv[i]); if (!str) { return JS_FALSE; } s->script_node().scene()->browser() - .out(JS_GetStringBytes(str)); + .out(JS_EncodeString(cx, str)); } return JS_TRUE; } @@ -2435,7 +2435,7 @@ if (!str) { return JS_FALSE; } try { - std::istringstream in(JS_GetStringBytes(str)); + std::istringstream in(JS_EncodeString(cx, str)); assert(s.script_node().scene()); openvrml::browser & browser = s.script_node().scene()->browser(); @@ -2494,7 +2494,7 @@ return JS_FALSE; } - const char * const event = JS_GetStringBytes(event_str); + const char * const event = JS_EncodeString(cx, event_str); try { s.script_node().scene() @@ -2549,7 +2549,7 @@ // JSString * arg1_str = JS_ValueToString(cx, argv[1]); if (!arg1_str) { return JS_FALSE; } - const char * const fromEventOut = JS_GetStringBytes(arg1_str); + const char * const fromEventOut = JS_EncodeString(cx, arg1_str); // // Make sure our third argument (toNode) is a SFNode. @@ -2574,7 +2574,7 @@ // JSString * arg3_str = JS_ValueToString(cx, argv[3]); if (!arg3_str) { return JS_FALSE; } - const char * const toEventIn = JS_GetStringBytes(arg3_str); + const char * const toEventIn = JS_EncodeString(cx, arg3_str); try { add_route(*fromNode->value(), @@ -2619,7 +2619,7 @@ // JSString * arg1_str = JS_ValueToString(cx, argv[1]); if (!arg1_str) { return JS_FALSE; } - const char * const fromEventOut = JS_GetStringBytes(arg1_str); + const char * const fromEventOut = JS_EncodeString(cx, arg1_str); // // Make sure our third argument (toNode) is a SFNode. @@ -2637,7 +2637,7 @@ // JSString * arg3_str = JS_ValueToString(cx, argv[3]); if (!arg3_str) { return JS_FALSE; } - const char * const toEventIn = JS_GetStringBytes(arg3_str); + const char * const toEventIn = JS_EncodeString(cx, arg3_str); delete_route(*fromNode->value(), fromEventOut, @@ -2660,7 +2660,7 @@ assert(JS_GetContextPrivate(cx)); script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); openvrml::browser & browser = s.script_node().scene()->browser(); - browser.description(JS_GetStringBytes(str)); + browser.description(JS_EncodeString(cx, str)); *rval = JSVAL_VOID; return JS_TRUE; } @@ -3397,7 +3397,7 @@ assert(JS_GetContextPrivate(cx)); script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); - istringstream in(JS_GetStringBytes(vrmlstring)); + istringstream in(JS_EncodeString(cx, vrmlstring)); assert(s.script_node().scene()); openvrml::browser & browser = s.script_node().scene()->browser(); @@ -3455,7 +3455,7 @@ script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); try { - const char * eventOut = JS_GetStringBytes(JSVAL_TO_STRING(id)); + const char * eventOut = JS_EncodeString(cx, JSVAL_TO_STRING(id)); openvrml::event_emitter & emitter = thisNode.value()->event_emitter(eventOut); *vp = s.vrmlFieldToJSVal(emitter.value()); @@ -3487,7 +3487,8 @@ boost::intrusive_ptr<openvrml::node> nodePtr = thisNode.value(); - const char * const eventInId = JS_GetStringBytes(JSVAL_TO_STRING(id)); + const char * const eventInId = + JS_EncodeString(cx, JSVAL_TO_STRING(id)); try { using boost::shared_ptr; @@ -7044,7 +7045,7 @@ for (MField::JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_STRING(mfdata->array[i])); const char * const str = - JS_GetStringBytes(JSVAL_TO_STRING(mfdata->array[i])); + JS_EncodeString(cx, JSVAL_TO_STRING(mfdata->array[i])); temp[i] = str; } mfstring->value(temp); @@ -7208,7 +7209,7 @@ for (JsvalArray::size_type i = 0; i < mfdata->array.size(); ++i) { assert(JSVAL_IS_STRING(mfdata->array[i])); out << '\"' - << JS_GetStringBytes(JSVAL_TO_STRING(mfdata->array[i])) + << JS_EncodeString(cx, JSVAL_TO_STRING(mfdata->array[i])) << '\"'; if ((i + 1) < mfdata->array.size()) { out << ", "; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-24 04:31:28
|
Revision: 4214 http://openvrml.svn.sourceforge.net/openvrml/?rev=4214&view=rev Author: braden Date: 2011-01-24 04:31:22 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Don't hard-code Gtk/GNOME _DISABLE_DEPRECATED preprocessor symbols, as this negatively affects forward compatibility. Modified Paths: -------------- trunk/ChangeLog trunk/src/Makefile.am Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-24 03:05:49 UTC (rev 4213) +++ trunk/ChangeLog 2011-01-24 04:31:22 UTC (rev 4214) @@ -1,5 +1,12 @@ 2011-01-23 Braden McDaniel <br...@en...> + Don't hard-code Gtk/GNOME _DISABLE_DEPRECATED preprocessor + symbols, as this negatively affects forward compatibility. + + * src/Makefile.am + +2011-01-23 Braden McDaniel <br...@en...> + Use JS_EncodeString instead of the obsolete JS_GetStringBytes. * configure.ac Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2011-01-24 03:05:49 UTC (rev 4213) +++ trunk/src/Makefile.am 2011-01-24 04:31:22 UTC (rev 4214) @@ -762,8 +762,7 @@ -I$(top_builddir)/src/libopenvrml \ -I$(top_srcdir)/src/libopenvrml \ -I$(top_builddir)/src/libopenvrml-gl \ - -I$(top_srcdir)/src/libopenvrml-gl \ - -DGTK_DISABLE_DEPRECATED + -I$(top_srcdir)/src/libopenvrml-gl openvrml_xembed_openvrml_xembed_CXXFLAGS = \ $(PTHREAD_CFLAGS) \ $(DBUS_G_CFLAGS) \ @@ -832,9 +831,6 @@ endif openvrml_player_openvrml_player_CPPFLAGS = \ - -DG_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ - -DGNOME_DISABLE_DEPRECATED \ -DOPENVRML_PLAYER_PKGDATADIR_=\"$(datadir)/openvrml-player\" \ -DOPENVRML_LIBEXECDIR_=\"$(libexecdir)\" \ -Iopenvrml-player \ @@ -888,7 +884,6 @@ mozilla_plugin_openvrml_la_CPPFLAGS = \ -DMOZ_X11 \ - -DGTK_DISABLE_DEPRECATED \ -DOPENVRML_LIBEXECDIR_=\"$(libexecdir)\" \ -Imozilla-plugin mozilla_plugin_openvrml_la_CXXFLAGS = \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-01-24 05:15:18
|
Revision: 4216 http://openvrml.svn.sourceforge.net/openvrml/?rev=4216&view=rev Author: braden Date: 2011-01-24 05:15:10 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Newer SpiderMonkey (XULRunner 2.0) removes the fifth JSFunctionSpec member. Because this was always zero in OpenVRML's usage, we can safely omit the definition of that member. Modified Paths: -------------- trunk/ChangeLog trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-24 04:34:58 UTC (rev 4215) +++ trunk/ChangeLog 2011-01-24 05:15:10 UTC (rev 4216) @@ -1,3 +1,11 @@ +2011-01-24 Braden McDaniel <br...@en...> + + Newer SpiderMonkey (XULRunner 2.0) removes the fifth + JSFunctionSpec member. Because this was always zero in OpenVRML's + usage, we can safely omit the definition of that member. + + * src/script/javascript.cpp + 2011-01-23 Braden McDaniel <br...@en...> Don't hard-code Gtk/GNOME _DISABLE_DEPRECATED preprocessor Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2011-01-24 04:34:58 UTC (rev 4215) +++ trunk/src/script/javascript.cpp 2011-01-24 05:15:10 UTC (rev 4216) @@ -1153,10 +1153,9 @@ "print", // name Global::print, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, - { 0, 0, 0, 0, 0 } + { 0, 0, 0, 0 } }; JSBool ok = JS_DefineFunctions(cx, globalObj, globalFunctions); assert(ok); @@ -1837,87 +1836,75 @@ "getName", // name Browser::getName, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "getVersion", // name Browser::getVersion, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "getCurrentSpeed", // name Browser::getCurrentSpeed, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "getCurrentFrameRate", // name Browser::getCurrentFrameRate, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "getWorldURL", // name Browser::getWorldURL, // call 0, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "replaceWorld", // name Browser::replaceWorld, // call 1, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "createVrmlFromString", // name Browser::createVrmlFromString, // call 1, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "createVrmlFromURL", // name Browser::createVrmlFromURL, // call 3, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "addRoute", // name Browser::addRoute, // call 4, // nargs - 0, // flags - 0, // extra + 0 // flags }, { "deleteRoute", // name Browser::deleteRoute, // call 4, // nargs - 0, // flags - 0 // extra + 0 // flags }, { "loadURL", // name Browser::loadURL, // call 2, // nargs - 0, // flags - 0, // extra + 0 // flags }, { "setDescription", // name Browser::setDescription, // call 1, // nargs - 0, // flags - 0 // extra + 0 // flags }, - { 0, 0, 0, 0, 0 } + { 0, 0, 0, 0 } }; JSObject * const browserObj = @@ -2755,10 +2742,10 @@ static JSFunctionSpec methods[] = // name, func ptr, argc - { { "setHSV", setHSV, 3, 0, 0 }, - { "getHSV", getHSV, 0, 0, 0 }, - { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "setHSV", setHSV, 3, 0 }, + { "getHSV", getHSV, 0, 0 }, + { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &jsclass, @@ -3046,8 +3033,8 @@ static JSFunctionSpec methods[] = // name, func ptr, argc - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &jsclass, construct, 3, // constructor function, min arg count @@ -3294,8 +3281,8 @@ OPENVRML_NOTHROW { static JSFunctionSpec methods[] = - { { "toString", SFNode::toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", SFNode::toString, 0, 0 }, + { 0, 0, 0, 0 } }; script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); JSClass & jsclass = s.sfnode_class; @@ -3557,14 +3544,14 @@ static JSFunctionSpec methods[] = // name, func ptr, argc - { { "getAxis", getAxis, 0, 0, 0 }, - { "inverse", inverse, 0, 0, 0 }, - { "multiply", multiply, 1, 0, 0 }, - { "multVec", multVec, 1, 0, 0 }, - { "setAxis", setAxis, 1, 0, 0 }, - { "slerp", slerp, 2, 0, 0 }, - { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "getAxis", getAxis, 0, 0 }, + { "inverse", inverse, 0, 0 }, + { "multiply", multiply, 1, 0 }, + { "multVec", multVec, 1, 0 }, + { "setAxis", setAxis, 1, 0 }, + { "slerp", slerp, 2, 0 }, + { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &jsclass, @@ -4097,16 +4084,16 @@ static JSFunctionSpec methods[] = /* name native nargs */ - { { "add", add, 1, 0, 0 }, - { "divide", divide, 1, 0, 0 }, - { "dot", dot, 1, 0, 0 }, - { "length", length, 0, 0, 0 }, - { "multiply", multiply, 1, 0, 0 }, - { "negate", negate, 0, 0, 0 }, - { "normalize", normalize, 0, 0, 0 }, - { "subtract", subtract, 1, 0, 0 }, - { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "add", add, 1, 0 }, + { "divide", divide, 1, 0 }, + { "dot", dot, 1, 0 }, + { "length", length, 0, 0 }, + { "multiply", multiply, 1, 0 }, + { "negate", negate, 0, 0 }, + { "normalize", normalize, 0, 0 }, + { "subtract", subtract, 1, 0 }, + { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &SFVec2::jsclass, @@ -4717,17 +4704,17 @@ static JSFunctionSpec methods[] = /* name native nargs */ - { { "add", add, 1, 0, 0 }, - { "cross", cross, 1, 0, 0 }, - { "divide", divide, 1, 0, 0 }, - { "dot", dot, 1, 0, 0 }, - { "length", length, 0, 0, 0 }, - { "multiply", multiply, 1, 0, 0 }, - { "negate", negate, 0, 0, 0 }, - { "normalize", normalize, 0, 0, 0 }, - { "subtract", subtract, 1, 0, 0 }, - { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "add", add, 1, 0 }, + { "cross", cross, 1, 0 }, + { "divide", divide, 1, 0 }, + { "dot", dot, 1, 0 }, + { "length", length, 0, 0 }, + { "multiply", multiply, 1, 0 }, + { "negate", negate, 0, 0 }, + { "normalize", normalize, 0, 0 }, + { "subtract", subtract, 1, 0 }, + { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &SFVec3::jsclass, @@ -5446,8 +5433,8 @@ { 0, 0, 0, 0, 0 } }; static JSFunctionSpec methods[] = - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * proto = JS_InitClass(cx, obj, 0, &Subclass::jsclass, construct, 0, // constructor function, min arg count @@ -5684,8 +5671,8 @@ { 0, 0, 0, 0, 0 } }; static JSFunctionSpec methods[] = - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * proto = JS_InitClass(cx, obj, 0, &Subclass::jsclass, construct, 0, // constructor function, min arg count @@ -6353,8 +6340,8 @@ { 0, 0, 0, 0, 0 } }; static JSFunctionSpec methods[] = - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * proto = JS_InitClass(cx, obj, 0, &jsclass, @@ -6593,8 +6580,8 @@ { 0, 0, 0, 0, 0 } }; static JSFunctionSpec methods[] = - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * proto = JS_InitClass(cx, obj, 0, &jsclass, construct, 0, // constructor function, min arg count @@ -6988,8 +6975,8 @@ { 0, 0, 0, 0, 0 } }; static JSFunctionSpec methods[] = - { { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * proto = JS_InitClass(cx, obj, 0, &jsclass, @@ -7730,16 +7717,16 @@ OPENVRML_NOTHROW { static JSFunctionSpec methods[] = - { { "setTransform", setTransform, 0, 0, 0 }, - { "getTransform", getTransform, 0, 0, 0 }, - { "inverse", inverse, 0, 0, 0 }, - { "transpose", transpose, 0, 0, 0 }, - { "multLeft", multLeft, 1, 0, 0 }, - { "multRight", multRight, 1, 0, 0 }, - { "multVecMatrix", multVecMatrix, 1, 0, 0 }, - { "multMatrixVec", multMatrixVec, 1, 0, 0 }, - { "toString", toString, 0, 0, 0 }, - { 0, 0, 0, 0, 0 } }; + { { "setTransform", setTransform, 0, 0 }, + { "getTransform", getTransform, 0, 0 }, + { "inverse", inverse, 0, 0 }, + { "transpose", transpose, 0, 0 }, + { "multLeft", multLeft, 1, 0 }, + { "multRight", multRight, 1, 0 }, + { "multVecMatrix", multVecMatrix, 1, 0 }, + { "multMatrixVec", multMatrixVec, 1, 0 }, + { "toString", toString, 0, 0 }, + { 0, 0, 0, 0 } }; JSObject * const proto = JS_InitClass(cx, obj, 0, &jsclass, construct, 0, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-02 04:20:38
|
Revision: 4218 http://openvrml.svn.sourceforge.net/openvrml/?rev=4218&view=rev Author: braden Date: 2011-02-02 04:20:25 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Newer SpiderMonkey (XULRunner 2.0) changes the JSNative function signature and the means of accessing argv, the this JSObject, and the returned jsval. Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac trunk/src/script/javascript.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-24 05:23:27 UTC (rev 4217) +++ trunk/ChangeLog 2011-02-02 04:20:25 UTC (rev 4218) @@ -1,3 +1,12 @@ +2011-02-01 Braden McDaniel <br...@en...> + + Newer SpiderMonkey (XULRunner 2.0) changes the JSNative function + signature and the means of accessing argv, the "this" JSObject, + and the returned jsval. + + * configure.ac + * src/script/javascript.cpp + 2011-01-24 Braden McDaniel <br...@en...> Newer SpiderMonkey (XULRunner 2.0) removes the fifth Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2011-01-24 05:23:27 UTC (rev 4217) +++ trunk/configure.ac 2011-02-02 04:20:25 UTC (rev 4218) @@ -226,6 +226,26 @@ [Defined if SpiderMonkey uses type-specific add/remove root functions])]) # +# XULRunner 2.0 changes the type of JSNative to match that of JSFastNative. +# +AC_CACHE_CHECK([whether JSNative has the JSFastNative signature], +[ov_cv_fast_jsnative], +[ov_cv_fast_jsnative=no +ov_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$JS_CFLAGS $CPPFLAGS" +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#include <jsapi.h>]], +[[JSBool (*f)(JSContext *, uintN, jsval *); JSNative g = f;]])], +[ov_cv_fast_jsnative=yes]) +AC_LANG_POP([C++]) +CPPFLAGS=$ov_save_CPPFLAGS +]) +AS_IF([test X$ov_cv_fast_jsnative = Xyes], + [AC_DEFINE([OPENVRML_FAST_JSNATIVE], [1], + [Defined if JSNative is the same as JSFastNative])]) + +# # openvrml-xembed and openvrml-player both use GOption, which was # introduced in GLib 2.6. # Modified: trunk/src/script/javascript.cpp =================================================================== --- trunk/src/script/javascript.cpp 2011-01-24 05:23:27 UTC (rev 4217) +++ trunk/src/script/javascript.cpp 2011-02-02 04:20:25 UTC (rev 4218) @@ -91,42 +91,91 @@ # endif } +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_DECLARE_JSNATIVE(name) \ + JSBool (name)(JSContext * cx, uintN argc, jsval * vp) +# else +# define OPENVRML_DECLARE_JSNATIVE(name) \ + JSBool (name)(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, \ + jsval * rval) +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_DECLARE_MEMBER_JSNATIVE(class_name, name) \ + JSBool class_name::name(JSContext * cx, uintN argc, jsval * vp) +# else +# define OPENVRML_DECLARE_MEMBER_JSNATIVE(class_name, name) \ + JSBool class_name::name(JSContext * cx, JSObject * obj, \ + uintN argc, jsval * argv, \ + jsval * rval) +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_DEFINE_JSNATIVE(name) \ + JSBool (name)(JSContext * const cx, const uintN argc, jsval * const vp) +# else +# define OPENVRML_DEFINE_JSNATIVE(name) \ + JSBool (name)(JSContext * const cx, JSObject * obj, \ + const uintN argc, jsval * const argv, jsval * const rval) +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_DEFINE_MEMBER_JSNATIVE(class_name, name) \ + JSBool class_name::name(JSContext * const cx, const uintN argc, \ + jsval * const vp) +# else +# define OPENVRML_DEFINE_MEMBER_JSNATIVE(class_name, name) \ + JSBool class_name::name(JSContext * const cx, JSObject * obj, \ + const uintN argc, jsval * const argv, \ + jsval * const rval) +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_JS_ARGV(cx, vp) JS_ARGV(cx, vp) +# else +# define OPENVRML_JS_ARGV(cx, vp) argv +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_JS_SET_RVAL(cx, vp, value) JS_SET_RVAL((cx), (vp), (value)) +# else +# define OPENVRML_JS_SET_RVAL(cx, vp, value) *rval = (value) +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_JS_RVAL(cx, vp) JS_RVAL((cx), (vp)) +# else +# define OPENVRML_JS_RVAL(cx, vp) *rval +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_JS_THIS_OBJECT(cx, vp) JS_THIS_OBJECT((cx), (vp)) +# else +# define OPENVRML_JS_THIS_OBJECT(cx, vp) obj +# endif + +# ifdef OPENVRML_FAST_JSNATIVE +# define OPENVRML_JS_IS_CONSTRUCTING(cx, vp) JS_IsConstructing(cx, vp) +# else +# define OPENVRML_JS_IS_CONSTRUCTING(cx, vp) JS_IsConstructing(cx) +# endif + class SFNode; class MFNode; namespace Browser { - OPENVRML_JAVASCRIPT_LOCAL - JSBool createVrmlFromURL(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL - JSBool addRoute(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL - JSBool deleteRoute(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(createVrmlFromURL); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(addRoute); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(deleteRoute); } class OPENVRML_JAVASCRIPT_LOCAL script : public openvrml::script { friend class SFNode; friend class MFNode; - friend JSBool Browser::createVrmlFromURL(JSContext * cx, - JSObject * obj, - uintN argc, jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - friend JSBool Browser::addRoute(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - friend JSBool Browser::deleteRoute(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; + friend OPENVRML_DECLARE_MEMBER_JSNATIVE(Browser, createVrmlFromURL); + friend OPENVRML_DECLARE_MEMBER_JSNATIVE(Browser, addRoute); + friend OPENVRML_DECLARE_MEMBER_JSNATIVE(Browser, deleteRoute); static JSRuntime * rt; static size_t nInstances; @@ -252,7 +301,7 @@ 0, // mark 0 // spare }; - JSBool print(JSContext *, JSObject *, uintN, jsval *, jsval *); + OPENVRML_DECLARE_JSNATIVE(print); } namespace Browser { @@ -276,78 +325,18 @@ 0, // mark 0 // spare }; - OPENVRML_JAVASCRIPT_LOCAL JSBool getName(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool getVersion(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentSpeed(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentFrameRate(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool getWorldURL(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool replaceWorld(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromString(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromURL(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool addRoute(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool deleteRoute(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool loadURL(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; - OPENVRML_JAVASCRIPT_LOCAL JSBool setDescription(JSContext * cx, - JSObject * obj, - uintN argc, - jsval * argv, - jsval * rval) - OPENVRML_NOTHROW; + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(getName); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(getVersion); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(getCurrentSpeed); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(getCurrentFrameRate); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(getWorldURL); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(replaceWorld); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(createVrmlFromString); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(createVrmlFromURL); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(addRoute); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(deleteRoute); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(loadURL); + OPENVRML_JAVASCRIPT_LOCAL OPENVRML_DECLARE_JSNATIVE(setDescription); } // @@ -385,9 +374,7 @@ protected: static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(toString); private: sfield(); }; @@ -406,9 +393,7 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&rgb)[3]) OPENVRML_NOTHROW; @@ -418,12 +403,8 @@ static JSBool setProperty(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool setHSV(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool getHSV(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(setHSV); + static OPENVRML_DECLARE_JSNATIVE(getHSV); }; class OPENVRML_JAVASCRIPT_LOCAL SFImage : public sfield { @@ -440,9 +421,7 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, uint32 x, uint32 y, uint32 comp, JSObject * pixels_obj) @@ -469,9 +448,7 @@ static std::auto_ptr<openvrml::sfnode> createFromJSObject(JSContext * cx, JSObject * obj) OPENVRML_THROW2(bad_conversion, std::bad_alloc); - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval *) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, JSString * vrmlstring) OPENVRML_NOTHROW; @@ -497,9 +474,7 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval *) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&rot)[4]) OPENVRML_NOTHROW; @@ -509,24 +484,12 @@ static JSBool setProperty(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool getAxis(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool inverse(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multiply(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multVec(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool setAxis(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool slerp(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(getAxis); + static OPENVRML_DECLARE_JSNATIVE(inverse); + static OPENVRML_DECLARE_JSNATIVE(multiply); + static OPENVRML_DECLARE_JSNATIVE(multVec); + static OPENVRML_DECLARE_JSNATIVE(setAxis); + static OPENVRML_DECLARE_JSNATIVE(slerp); }; template <typename SFVec2> @@ -536,9 +499,7 @@ OPENVRML_NOTHROW; protected: - static JSBool constructor(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(constructor); static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&vec)[2]) OPENVRML_NOTHROW; @@ -548,30 +509,14 @@ static JSBool setProperty(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool add(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool divide(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool dot(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool length(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multiply(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool negate(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool normalize(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool subtract(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(add); + static OPENVRML_DECLARE_JSNATIVE(divide); + static OPENVRML_DECLARE_JSNATIVE(dot); + static OPENVRML_DECLARE_JSNATIVE(length); + static OPENVRML_DECLARE_JSNATIVE(multiply); + static OPENVRML_DECLARE_JSNATIVE(negate); + static OPENVRML_DECLARE_JSNATIVE(normalize); + static OPENVRML_DECLARE_JSNATIVE(subtract); }; class OPENVRML_JAVASCRIPT_LOCAL SFVec2f : public sfvec2_jsobject<SFVec2f> { @@ -611,9 +556,7 @@ OPENVRML_NOTHROW; protected: - static JSBool constructor(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DEFINE_JSNATIVE(constructor); static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&vec)[3]) OPENVRML_NOTHROW; @@ -623,31 +566,15 @@ static JSBool setProperty(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool add(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; - static JSBool cross(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool divide(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool dot(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) OPENVRML_NOTHROW; - static JSBool length(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multiply(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool negate(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool normalize(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool subtract(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DEFINE_JSNATIVE(add); + static OPENVRML_DEFINE_JSNATIVE(cross); + static OPENVRML_DEFINE_JSNATIVE(divide); + static OPENVRML_DEFINE_JSNATIVE(dot); + static OPENVRML_DEFINE_JSNATIVE(length); + static OPENVRML_DEFINE_JSNATIVE(multiply); + static OPENVRML_DEFINE_JSNATIVE(negate); + static OPENVRML_DEFINE_JSNATIVE(normalize); + static OPENVRML_DEFINE_JSNATIVE(subtract); }; class OPENVRML_JAVASCRIPT_LOCAL SFVec3f : public sfvec3_jsobject<SFVec3f> { @@ -720,18 +647,14 @@ OPENVRML_NOTHROW; protected: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * vp) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool setElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; private: @@ -751,18 +674,14 @@ OPENVRML_NOTHROW; protected: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * vp) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool setElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; private: @@ -782,17 +701,14 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp); + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv); static JSBool setElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp); static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp); - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval); + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj); }; @@ -846,17 +762,14 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp); + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv); static JSBool setElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp); static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp); - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval); + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj); }; @@ -879,9 +792,7 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp) OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, @@ -890,9 +801,7 @@ static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; }; @@ -924,9 +833,7 @@ OPENVRML_THROW2(bad_conversion, std::bad_alloc); private: - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp) OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, uintN argc, jsval * argv) OPENVRML_NOTHROW; static JSBool setElement(JSContext * cx, JSObject * obj, @@ -935,9 +842,7 @@ static JSBool setLength(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; }; @@ -1022,10 +927,7 @@ static JSObject * initClass(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool getElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; @@ -1038,10 +940,7 @@ static JSObject * initClass(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; - static JSBool construct(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, - jsval * vp) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(construct); static JSBool initObject(JSContext * cx, JSObject * obj, const jsdouble (&mat)[16]) OPENVRML_NOTHROW; @@ -1051,33 +950,15 @@ static JSBool setElement(JSContext * cx, JSObject * obj, jspropertyop_id id, jsval * vp) OPENVRML_NOTHROW; - static JSBool setTransform(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool getTransform(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool inverse(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool transpose(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multLeft(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multRight(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multVecMatrix(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool multMatrixVec(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; - static JSBool toString(JSContext * cx, JSObject * obj, - uintN argc, jsval * argv, jsval * rval) - OPENVRML_NOTHROW; + static OPENVRML_DECLARE_JSNATIVE(setTransform); + static OPENVRML_DECLARE_JSNATIVE(getTransform); + static OPENVRML_DECLARE_JSNATIVE(inverse); + static OPENVRML_DECLARE_JSNATIVE(transpose); + static OPENVRML_DECLARE_JSNATIVE(multLeft); + static OPENVRML_DECLARE_JSNATIVE(multRight); + static OPENVRML_DECLARE_JSNATIVE(multVecMatrix); + static OPENVRML_DECLARE_JSNATIVE(multMatrixVec); + static OPENVRML_DECLARE_JSNATIVE(toString); static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW; private: @@ -2219,14 +2100,14 @@ namespace Global { - JSBool print(JSContext * const cx, JSObject *, - const uintN argc, jsval * const argv, jsval *) + OPENVRML_DEFINE_JSNATIVE(print) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); for (uintN i = 0; i < argc; i++) { - JSString * const str = JS_ValueToString(cx, argv[i]); + JSString * const str = + JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[i]); if (!str) { return JS_FALSE; } s->script_node().scene()->browser() .out(JS_EncodeString(cx, str)); @@ -2238,84 +2119,74 @@ namespace Browser { - JSBool getName(JSContext * const cx, JSObject *, - uintN, jsval *, jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(getName) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); const char * const name = s->script_node().node::type().metatype().browser().name(); - *rval = STRING_TO_JSVAL(JS_InternString(cx, name)); + OPENVRML_JS_SET_RVAL(cx, vp, + STRING_TO_JSVAL(JS_InternString(cx, name))); return JS_TRUE; } - JSBool getVersion(JSContext * const cx, JSObject *, - uintN, jsval *, jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(getVersion) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); const char * const version = s->script_node().node::type().metatype().browser().version(); - *rval = STRING_TO_JSVAL(JS_InternString(cx, version)); + OPENVRML_JS_SET_RVAL(cx, vp, + STRING_TO_JSVAL(JS_InternString(cx, version))); return JS_TRUE; } - JSBool getCurrentSpeed(JSContext * const cx, JSObject *, - uintN, jsval *, jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(getCurrentSpeed) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); const jsdouble speed = s->script_node().type().metatype().browser().current_speed(); - return JS_NewNumberValue(cx, speed, rval); + jsval result_val; + const JSBool result = JS_NewNumberValue(cx, speed, &result_val); + OPENVRML_JS_SET_RVAL(cx, vp, result_val); + return result; } - JSBool getCurrentFrameRate(JSContext * const cx, - JSObject *, - uintN, - jsval *, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(getCurrentFrameRate) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); const jsdouble frame_rate = s->script_node().type().metatype().browser().frame_rate(); - return JS_NewNumberValue(cx, frame_rate, rval); + jsval result_val; + const JSBool result = + JS_NewNumberValue(cx, frame_rate, &result_val); + OPENVRML_JS_SET_RVAL(cx, vp, result_val); + return result; } - JSBool getWorldURL(JSContext * const cx, - JSObject *, - uintN, - jsval *, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(getWorldURL) { script * const s = static_cast<script *>(JS_GetContextPrivate(cx)); assert(s); const std::string url = s->script_node().node::type().metatype().browser().world_url(); - *rval = STRING_TO_JSVAL(JS_InternString(cx, url.c_str())); + OPENVRML_JS_SET_RVAL(cx, vp, + STRING_TO_JSVAL( + JS_InternString(cx, url.c_str()))); return JS_TRUE; } // No events will be processed after loadURL. - JSBool loadURL(JSContext * const cx, - JSObject *, - const uintN argc, - jsval * const argv, - jsval *) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(loadURL) { using std::auto_ptr; @@ -2330,10 +2201,14 @@ // Make sure our first argument (the URL) is an MFString. // JSObject * arg0_obj; - if (!JS_ValueToObject(cx, argv[0], &arg0_obj)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, arg0_obj, &MFString::jsclass, argv)) { + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[0], + &arg0_obj)) { return JS_FALSE; } + if (!JS_InstanceOf(cx, arg0_obj, &MFString::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { + return JS_FALSE; + } auto_ptr<openvrml::mfstring> url_ptr = MFString::createFromJSObject(cx, arg0_obj); @@ -2346,10 +2221,14 @@ // Make sure our second argument is an MFString // JSObject * arg1_obj; - if (!JS_ValueToObject(cx, argv[1], &arg1_obj)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, arg1_obj, &MFString::jsclass, argv)) { + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[1], + &arg1_obj)) { return JS_FALSE; } + if (!JS_InstanceOf(cx, arg1_obj, &MFString::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { + return JS_FALSE; + } auto_ptr<openvrml::mfstring> parameter_ptr = MFString::createFromJSObject(cx, arg1_obj); @@ -2374,12 +2253,7 @@ // This does return, but no events will be processed after it is called. - JSBool replaceWorld(JSContext * const cx, - JSObject *, - uintN, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(replaceWorld) { using std::auto_ptr; @@ -2390,10 +2264,13 @@ // Make sure our argument is an MFNode. // JSObject * arg_obj; - if (!JS_ValueToObject(cx, argv[0], &arg_obj)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, arg_obj, &MFNode::jsclass, argv)) { + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[0], &arg_obj)) { return JS_FALSE; } + if (!JS_InstanceOf(cx, arg_obj, &MFNode::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { + return JS_FALSE; + } auto_ptr<openvrml::mfnode> nodes = MFNode::createFromJSObject(cx, arg_obj); @@ -2401,16 +2278,11 @@ s.script_node().scene()->browser().replace_world(nodes->value()); - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); return JS_TRUE; } - JSBool createVrmlFromString(JSContext * const cx, - JSObject * const obj, - uintN, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(createVrmlFromString) { assert(JS_GetContextPrivate(cx)); script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); @@ -2418,7 +2290,7 @@ // // Make sure our argument is a string. // - JSString * str = JS_ValueToString(cx, argv[0]); + JSString * str = JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[0]); if (!str) { return JS_FALSE; } try { @@ -2430,9 +2302,13 @@ browser.create_vrml_from_stream(in); if (nodes.empty()) { - *rval = JSVAL_NULL; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_NULL); } else { - if (!MFNode::toJsval(nodes, cx, obj, rval)) { return JS_FALSE; } + if (!MFNode::toJsval(nodes, cx, + OPENVRML_JS_THIS_OBJECT(cx, vp), + &OPENVRML_JS_RVAL(cx, vp))) { + return JS_FALSE; + } } } catch (std::exception & ex) { JS_ReportError(cx, ex.what()); @@ -2446,23 +2322,19 @@ // createVrmlFromURL( MFString url, SFNode node, SFString event ) - JSBool createVrmlFromURL(JSContext * const cx, - JSObject *, - const uintN argc, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(createVrmlFromURL) { using std::auto_ptr; JSObject * url_obj = 0, * node_obj = 0; JSString * event_str = 0; - if (!JS_ConvertArguments(cx, argc, argv, "ooS", + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "ooS", &url_obj, &node_obj, &event_str)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, url_obj, &MFString::jsclass, argv)) { + if (!JS_InstanceOf(cx, url_obj, &MFString::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } auto_ptr<openvrml::mfstring> url(MFString::createFromJSObject(cx, @@ -2471,7 +2343,8 @@ script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); JSClass & sfnode_jsclass = s.sfnode_class; - if (!JS_InstanceOf(cx, node_obj, &sfnode_jsclass, argv)) { + if (!JS_InstanceOf(cx, node_obj, &sfnode_jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } auto_ptr<openvrml::sfnode> node(SFNode::createFromJSObject(cx, node_obj)); @@ -2496,18 +2369,13 @@ return JS_FALSE; } - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); return JS_TRUE; } // addRoute(SFNode fromNode, String fromEventOut, SFNode toNode, String toEvent) - JSBool addRoute(JSContext * const cx, - JSObject *, - uintN, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(addRoute) { using std::auto_ptr; @@ -2515,10 +2383,13 @@ // Make sure our first argument (fromNode) is a SFNode. // JSObject * arg0_obj; - if (!JS_ValueToObject(cx, argv[0], &arg0_obj)) { return JS_FALSE; } + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[0], &arg0_obj)) { + return JS_FALSE; + } script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); JSClass & sfnode_jsclass = s.sfnode_class; - if (!JS_InstanceOf(cx, arg0_obj, &sfnode_jsclass, argv)) { + if (!JS_InstanceOf(cx, arg0_obj, &sfnode_jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } auto_ptr<openvrml::sfnode> fromNode = @@ -2534,7 +2405,8 @@ // // Makes sure our second argument (fromEventOut) is a string. // - JSString * arg1_str = JS_ValueToString(cx, argv[1]); + JSString * arg1_str = + JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[1]); if (!arg1_str) { return JS_FALSE; } const char * const fromEventOut = JS_EncodeString(cx, arg1_str); @@ -2542,10 +2414,13 @@ // Make sure our third argument (toNode) is a SFNode. // JSObject * arg2_obj; - if (!JS_ValueToObject(cx, argv[2], &arg2_obj)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, arg2_obj, &sfnode_jsclass, argv)) { + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[2], &arg2_obj)) { return JS_FALSE; } + if (!JS_InstanceOf(cx, arg2_obj, &sfnode_jsclass, + OPENVRML_JS_ARGV(cx, vp))) { + return JS_FALSE; + } auto_ptr<openvrml::sfnode> toNode = SFNode::createFromJSObject(cx, arg2_obj); // @@ -2559,7 +2434,8 @@ // // Makes sure our fourth argument (toEventIn) is a string. // - JSString * arg3_str = JS_ValueToString(cx, argv[3]); + JSString * arg3_str = + JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[3]); if (!arg3_str) { return JS_FALSE; } const char * const toEventIn = JS_EncodeString(cx, arg3_str); @@ -2573,18 +2449,13 @@ return JS_FALSE; } - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); return JS_TRUE; } // deleteRoute(SFNode fromNode, String fromEventOut, SFNode toNode, String toEvent) - JSBool deleteRoute(JSContext * const cx, - JSObject *, - uintN, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(deleteRoute) { using std::auto_ptr; @@ -2592,10 +2463,13 @@ // Make sure our first argument (fromNode) is a SFNode. // JSObject * arg0_obj; - if (!JS_ValueToObject(cx, argv[0], &arg0_obj)) { return JS_FALSE; } + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[0], &arg0_obj)) { + return JS_FALSE; + } script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); JSClass & sfnode_jsclass = s.sfnode_class; - if (!JS_InstanceOf(cx, arg0_obj, &sfnode_jsclass, argv)) { + if (!JS_InstanceOf(cx, arg0_obj, &sfnode_jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } auto_ptr<openvrml::sfnode> fromNode = @@ -2604,7 +2478,8 @@ // // Makes sure our second argument (fromEventOut) is a string. // - JSString * arg1_str = JS_ValueToString(cx, argv[1]); + JSString * arg1_str = + JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[1]); if (!arg1_str) { return JS_FALSE; } const char * const fromEventOut = JS_EncodeString(cx, arg1_str); @@ -2612,17 +2487,21 @@ // Make sure our third argument (toNode) is a SFNode. // JSObject * arg2_obj; - if (!JS_ValueToObject(cx, argv[2], &arg2_obj)) { return JS_FALSE; } - if (!JS_InstanceOf(cx, arg2_obj, &sfnode_jsclass, argv)) { + if (!JS_ValueToObject(cx, OPENVRML_JS_ARGV(cx, vp)[2], &arg2_obj)) { return JS_FALSE; } + if (!JS_InstanceOf(cx, arg2_obj, &sfnode_jsclass, + OPENVRML_JS_ARGV(cx, vp))) { + return JS_FALSE; + } auto_ptr<openvrml::sfnode> toNode = SFNode::createFromJSObject(cx, arg2_obj); // // Makes sure our fourth argument (toEventIn) is a string. // - JSString * arg3_str = JS_ValueToString(cx, argv[3]); + JSString * arg3_str = + JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[3]); if (!arg3_str) { return JS_FALSE; } const char * const toEventIn = JS_EncodeString(cx, arg3_str); @@ -2631,24 +2510,19 @@ *toNode->value(), toEventIn); - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); return JS_TRUE; } - JSBool setDescription(JSContext * const cx, - JSObject *, - uintN, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_JSNATIVE(setDescription) { - JSString * str = JS_ValueToString(cx, argv[0]); + JSString * str = JS_ValueToString(cx, OPENVRML_JS_ARGV(cx, vp)[0]); if (!str) { return JS_FALSE; } assert(JS_GetContextPrivate(cx)); script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); openvrml::browser & browser = s.script_node().scene()->browser(); browser.description(JS_EncodeString(cx, str)); - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); return JS_TRUE; } @@ -2694,19 +2568,18 @@ JS_SetPrivate(cx, obj, 0); } - JSBool sfield::toString(JSContext * const cx, JSObject * const obj, - uintN, jsval *, jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(sfield, toString) { - assert(JS_GetPrivate(cx, obj)); + assert(JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); const sfield::sfdata & sfdata = - *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); + *static_cast<sfield::sfdata *>( + JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); std::ostringstream out; out << sfdata.field_value(); JSString * const jsstr = JS_NewStringCopyZ(cx, out.str().c_str()); if (!jsstr) { return JS_FALSE; } - *rval = STRING_TO_JSVAL(jsstr); + OPENVRML_JS_SET_RVAL(cx, vp, STRING_TO_JSVAL(jsstr)); return JS_TRUE; } @@ -2801,27 +2674,29 @@ sfdata.field_value().clone().release())); } - JSBool SFColor::construct(JSContext * const cx, - JSObject * obj, - const uintN argc, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFColor, construct) { jsdouble rgb[3] = {}; - if (!JS_ConvertArguments(cx, argc, argv, "/ddd", + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "/ddd", &rgb[0], &rgb[1], &rgb[2])) { return JS_FALSE; } +# ifdef OPENVRML_FAST_JSNATIVE + JSObject * obj = 0; +# endif +# ifndef OPENVRML_FAST_JSNATIVE // // If called without new, replace obj with a new object. // - if (!JS_IsConstructing(cx)) { + if (!OPENVRML_JS_IS_CONSTRUCTING(cx, vp)) { +# endif obj = JS_NewObject(cx, &jsclass, 0, 0); if (!obj) { return JS_FALSE; } - *rval = OBJECT_TO_JSVAL(obj); + OPENVRML_JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); +# ifndef OPENVRML_FAST_JSNATIVE } +# endif return initObject(cx, obj, rgb); } @@ -2934,22 +2809,19 @@ return JS_TRUE; } - JSBool SFColor::setHSV(JSContext * const cx, - JSObject * const obj, - const uintN argc, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFColor, setHSV) { - assert(JS_GetPrivate(cx, obj)); + assert(JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); sfield::sfdata & sfdata = - *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); + *static_cast<sfield::sfdata *>( + JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); openvrml::sfcolor & thisColor = *boost::polymorphic_downcast<openvrml::sfcolor *>( &sfdata.field_value()); jsdouble h = 0.0, s = 0.0, v = 0.0; - if (!JS_ConvertArguments(cx, argc, argv, "/ddd", &h, &s, &v)) { + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), + "/ddd", &h, &s, &v)) { return JS_FALSE; } @@ -2969,21 +2841,17 @@ openvrml::color val = thisColor.value(); val.hsv(float(h), float(s), float(v)); thisColor.value(val); - *rval = JSVAL_VOID; + OPENVRML_JS_SET_RVAL(cx, vp, JSVAL_VOID); sfdata.changed = true; return JS_TRUE; } - JSBool SFColor::getHSV(JSContext * const cx, - JSObject * const obj, - uintN, - jsval *, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFColor, getHSV) { - assert(JS_GetPrivate(cx, obj)); + assert(JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); const sfield::sfdata & sfdata = - *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, obj)); + *static_cast<sfield::sfdata *>( + JS_GetPrivate(cx, OPENVRML_JS_THIS_OBJECT(cx, vp))); const openvrml::sfcolor & thisColor = *boost::polymorphic_downcast<openvrml::sfcolor *>( &sfdata.field_value()); @@ -2991,7 +2859,7 @@ float hsv[3]; thisColor.value().hsv(hsv); - return floatsToJSArray(3, hsv, cx, rval); + return floatsToJSArray(3, hsv, cx, &OPENVRML_JS_RVAL(cx, vp)); } @@ -3093,32 +2961,35 @@ sfdata.field_value().clone().release())); } - JSBool SFImage::construct(JSContext * const cx, - JSObject * obj, - const uintN argc, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFImage, construct) { uint32 x = 0, y = 0, comp = 0; JSObject * pixels = 0; - if (!JS_ConvertArguments(cx, argc, argv, "uuuo", + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "uuuo", &x, &y, &comp, &pixels)) { return JS_FALSE; } - if (pixels && !JS_InstanceOf(cx, pixels, &MFInt32::jsclass, argv)) { + if (pixels && !JS_InstanceOf(cx, pixels, &MFInt32::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } +# ifdef OPENVRML_FAST_JSNATIVE + JSObject * obj = 0; +# endif +# ifndef OPENVRML_FAST_JSNATIVE // // If called without new, replace obj with a new object. // - if (!JS_IsConstructing(cx)) { + if (!OPENVRML_JS_IS_CONSTRUCTING(cx, vp)) { +# endif obj = JS_NewObject(cx, &jsclass, 0, 0); if (!obj) { return JS_FALSE; } - *rval = OBJECT_TO_JSVAL(obj); + OPENVRML_JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); +# ifndef OPENVRML_FAST_JSNATIVE } +# endif return initObject(cx, obj, x, y, comp, pixels); } @@ -3349,28 +3220,32 @@ sfdata.field_value().clone().release())); } - JSBool SFNode::construct(JSContext * const cx, - JSObject * obj, - const uintN argc, - jsval * const argv, - jsval * rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFNode, construct) { JSString * vrmlstring = 0; - if (!JS_ConvertArguments(cx, argc, argv, "S", &vrmlstring)) { + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "S", + &vrmlstring)) { return JS_FALSE; } script & s = *static_cast<script *>(JS_GetContextPrivate(cx)); JSClass & jsclass = s.sfnode_class; + +# ifdef OPENVRML_FAST_JSNATIVE + JSObject * obj = 0; +# endif +# ifndef OPENVRML_FAST_JSNATIVE // // If called without new, replace obj with a new object. // - if (!JS_IsConstructing(cx)) { + if (!OPENVRML_JS_IS_CONSTRUCTING(cx, vp)) { +# endif obj = JS_NewObject(cx, &jsclass, 0, 0); if (!obj) { return JS_FALSE; } - *rval = OBJECT_TO_JSVAL(obj); + OPENVRML_JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); +# ifndef OPENVRML_FAST_JSNATIVE } +# endif return initObject(cx, obj, vrmlstring); } @@ -3606,21 +3481,19 @@ sfdata.field_value().clone().release())); } - JSBool SFRotation::construct(JSContext * const cx, - JSObject * obj, - const uintN argc, - jsval * const argv, - jsval * const rval) - OPENVRML_NOTHROW + OPENVRML_DEFINE_MEMBER_JSNATIVE(SFRotation, construct) { jsdouble rot[4] = { 0.0, 1.0, 0.0, 0.0 }; - if (argc > 1 && JSVAL_IS_OBJECT(argv[0]) && JSVAL_IS_NUMBER(argv[1])) { + if (argc > 1 && JSVAL_IS_OBJECT(OPENVRML_JS_ARGV(cx, vp)[0]) + && JSVAL_IS_NUMBER(OPENVRML_JS_ARGV(cx, vp)[1])) { JSObject * axis_obj = 0; - if (!JS_ConvertArguments(cx, argc, argv, "od", &axis_obj, &rot[3])) { + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "od", + &axis_obj, &rot[3])) { return JS_FALSE; } if (axis_obj - && !JS_InstanceOf(cx, axis_obj, &SFVec3f::jsclass, argv)) { + && !JS_InstanceOf(cx, axis_obj, &SFVec3f::jsclass, + OPENVRML_JS_ARGV(cx, vp))) { return JS_FALSE; } assert(JS_GetPrivate(cx, axis_obj)); @@ -3632,16 +3505,19 @@ rot[0] = axis.value().x(); rot[1] = axis.value().y(); rot[2] = axis.value().z(); - } else if (argc > 1 && JSVAL_IS_OBJECT(argv[0]) - && JSVAL_IS_OBJECT(argv[1])) { + } else if (argc > 1 && JSVAL_IS_OBJECT(OPENVRML_JS_ARGV(cx, vp)[0]) + && JSVAL_IS_OBJECT(OPENVRML_JS_ARGV(cx, vp)[1])) { JSObject * from_obj = 0, * to_obj = 0; - if (!JS_ConvertArguments(cx, argc, argv, "oo", &from_obj, &to_obj)) { + if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), "oo", + &from_obj, &to_obj)) { return JS_FALSE; } if ((from_obj - && !JS_InstanceOf(cx, from_obj, &SFVec3f::jsclass, argv)) + && !JS_InstanceOf(cx, from_obj, &SFVec3f::jsclass, + OPENVRML_JS_ARGV(cx, vp))) || (to_obj - && !JS_InstanceOf(cx, to_obj, &SFVec3f::jsclass, argv))) { + && !JS_InstanceOf(cx, to_obj, &SFVec3f::jsclass, + OPENVRML_JS_ARGV(cx, vp)))) { return JS_FALSE; } @@ -3666,19 +3542,27 @@ rot[2] = axis.z(); rot[3] = acos(from_vec.value().dot(to_vec.value()) / (from_vec.value().length() * to_vec.value().length())); - } else if (!JS_ConvertArguments(cx, argc, argv, "/dddd", + } else if (!JS_ConvertArguments(cx, argc, OPENVRML_JS_ARGV(cx, vp), + "/dddd", &rot[0], &rot[1], &rot[2], &rot[3])) { return JS_FALSE; } +# ifdef OPENVRML_FAST_JSNATIVE + JSObject * obj = 0; +# end... [truncated message content] |
From: <br...@us...> - 2011-02-02 04:30:06
|
Revision: 4220 http://openvrml.svn.sourceforge.net/openvrml/?rev=4220&view=rev Author: braden Date: 2011-02-02 04:29:59 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Removed obsolete NPP_Initialize and NPP_Shutdown entrypoints. Modified Paths: -------------- trunk/ChangeLog trunk/src/mozilla-plugin/openvrml.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-02 04:24:06 UTC (rev 4219) +++ trunk/ChangeLog 2011-02-02 04:29:59 UTC (rev 4220) @@ -1,5 +1,10 @@ 2011-02-01 Braden McDaniel <br...@en...> + * src/mozilla-plugin/openvrml.cpp: Removed obsolete NPP_Initialize + and NPP_Shutdown entrypoints. + +2011-02-01 Braden McDaniel <br...@en...> + Newer SpiderMonkey (XULRunner 2.0) changes the JSNative function signature and the means of accessing argv, the "this" JSObject, and the returned jsval. Modified: trunk/src/mozilla-plugin/openvrml.cpp =================================================================== --- trunk/src/mozilla-plugin/openvrml.cpp 2011-02-02 04:24:06 UTC (rev 4219) +++ trunk/src/mozilla-plugin/openvrml.cpp 2011-02-02 04:29:59 UTC (rev 4220) @@ -356,12 +356,11 @@ } # endif // defined MOZ_X11 - return NPP_Initialize(); + return NPERR_NO_ERROR; } NPError NP_Shutdown() { - NPP_Shutdown(); return NPERR_NO_ERROR; } @@ -390,14 +389,6 @@ return const_cast<char *>(&mimeDescription[0]); } -NPError NPP_Initialize() -{ - return NPERR_NO_ERROR; -} - -void NPP_Shutdown() -{} - /** * @internal * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-03 06:32:16
|
Revision: 4222 http://openvrml.svn.sourceforge.net/openvrml/?rev=4222&view=rev Author: braden Date: 2011-02-03 06:32:09 +0000 (Thu, 03 Feb 2011) Log Message: ----------- Define OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER. Modified Paths: -------------- trunk/ChangeLog trunk/src/script/javascript.vcxproj Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-02 04:33:19 UTC (rev 4221) +++ trunk/ChangeLog 2011-02-03 06:32:09 UTC (rev 4222) @@ -1,3 +1,8 @@ +2011-02-03 Braden McDaniel <br...@en...> + + * src/script/javascript.vcxproj: Define + OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER. + 2011-02-01 Braden McDaniel <br...@en...> * src/mozilla-plugin/openvrml.cpp: Removed obsolete NPP_Initialize Modified: trunk/src/script/javascript.vcxproj =================================================================== --- trunk/src/script/javascript.vcxproj 2011-02-02 04:33:19 UTC (rev 4221) +++ trunk/src/script/javascript.vcxproj 2011-02-03 06:32:09 UTC (rev 4222) @@ -62,7 +62,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;OPENVRML_USE_DLL;XP_WIN;JS_THREADSAFE;BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_JAVASCRIPT_API=__declspec(dllexport);OPENVRML_JAVASCRIPT_LOCAL=;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;OPENVRML_USE_DLL;XP_WIN;JS_THREADSAFE;BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_JAVASCRIPT_API=__declspec(dllexport);OPENVRML_JAVASCRIPT_LOCAL=;OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> @@ -79,7 +79,7 @@ <Optimization>MaxSpeed</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>..\libopenvrml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_SECURE_SCL=0;OPENVRML_USE_DLL;XP_WIN;JS_THREADSAFE;BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_JAVASCRIPT_API=__declspec(dllexport);OPENVRML_JAVASCRIPT_LOCAL=;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_SCL_SECURE_NO_WARNINGS;_SECURE_SCL=0;OPENVRML_USE_DLL;XP_WIN;JS_THREADSAFE;BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS;BOOST_MPL_LIMIT_VECTOR_SIZE=30;OPENVRML_JAVASCRIPT_API=__declspec(dllexport);OPENVRML_JAVASCRIPT_LOCAL=;OPENVRML_JSVAL_TO_DOUBLE_RETURNS_POINTER=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2011-02-05 07:23:22
|
Revision: 4224 http://openvrml.svn.sourceforge.net/openvrml/?rev=4224&view=rev Author: braden Date: 2011-02-05 07:23:15 +0000 (Sat, 05 Feb 2011) Log Message: ----------- Catch any exceptions thrown from openvrml::browser::set_world. Modified Paths: -------------- trunk/ChangeLog trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-03 06:41:02 UTC (rev 4223) +++ trunk/ChangeLog 2011-02-05 07:23:15 UTC (rev 4224) @@ -1,3 +1,10 @@ +2011-02-05 Braden McDaniel <br...@en...> + + * src/local/libopenvrml-control/openvrml_control/browser.cpp + (openvrml_control::browser::initial_stream_reader::operator() + const): Catch any exceptions thrown from + openvrml::browser::set_world. + 2011-02-03 Braden McDaniel <br...@en...> * src/script/javascript.vcxproj: Define Modified: trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp =================================================================== --- trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp 2011-02-03 06:41:02 UTC (rev 4223) +++ trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp 2011-02-05 07:23:15 UTC (rev 4224) @@ -597,12 +597,12 @@ } struct OPENVRML_LOCAL openvrml_control::browser::initial_stream_reader { - initial_stream_reader( - const boost::shared_ptr<plugin_streambuf> & streambuf, - openvrml::browser & browser): + initial_stream_reader(const boost::shared_ptr<plugin_streambuf> & streambuf, + openvrml::browser & browser) + throw (): streambuf_(streambuf), browser_(browser) - {} + {} void operator()() const throw () { @@ -611,7 +611,8 @@ public: explicit plugin_istream( - const boost::shared_ptr<plugin_streambuf> & streambuf): + const boost::shared_ptr<plugin_streambuf> & streambuf) + throw (): openvrml::resource_istream(streambuf.get()), streambuf_(streambuf) {} @@ -625,8 +626,7 @@ return this->streambuf_->url(); } - virtual const std::string do_type() const - throw (std::bad_alloc) + virtual const std::string do_type() const throw (std::bad_alloc) { return this->streambuf_->type(); } @@ -637,7 +637,16 @@ } } in(this->streambuf_); - this->browser_.set_world(in); + try { + this->browser_.set_world(in); + } catch (const openvrml::invalid_vrml & ex) { + std::ostringstream out; + out << ex.url << ':' << ex.line << ':' << ex.column << ": error: " + << ex.what(); + this->browser_.err(out.str()); + } catch (const std::exception & ex) { + this->browser_.err(ex.what()); + } } private: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |