You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(128) |
Dec
(65) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(48) |
Feb
(132) |
Mar
(95) |
Apr
(47) |
May
(54) |
Jun
(2) |
Jul
(57) |
Aug
(109) |
Sep
(131) |
Oct
(186) |
Nov
(105) |
Dec
(78) |
| 2007 |
Jan
(125) |
Feb
(105) |
Mar
(52) |
Apr
(104) |
May
(63) |
Jun
(116) |
Jul
(76) |
Aug
|
Sep
(18) |
Oct
(93) |
Nov
(110) |
Dec
(169) |
| 2008 |
Jan
(90) |
Feb
(64) |
Mar
(41) |
Apr
(23) |
May
(6) |
Jun
(18) |
Jul
(10) |
Aug
(61) |
Sep
(139) |
Oct
(50) |
Nov
(55) |
Dec
(2) |
| 2009 |
Jan
|
Feb
(1) |
Mar
(62) |
Apr
(22) |
May
(17) |
Jun
(19) |
Jul
(40) |
Aug
(21) |
Sep
|
Oct
(40) |
Nov
(23) |
Dec
|
| 2010 |
Jan
(14) |
Feb
(40) |
Mar
(9) |
Apr
(11) |
May
(19) |
Jun
(4) |
Jul
(10) |
Aug
(22) |
Sep
(15) |
Oct
|
Nov
(2) |
Dec
|
| 2011 |
Jan
(13) |
Feb
(10) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(33) |
May
(20) |
Jun
|
Jul
(8) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
|
From: <br...@us...> - 2009-07-03 15:53:10
|
Revision: 3941
http://openvrml.svn.sourceforge.net/openvrml/?rev=3941&view=rev
Author: braden
Date: 2009-07-03 15:52:51 +0000 (Fri, 03 Jul 2009)
Log Message:
-----------
Use "sourceforge.net" in URIs instead of "sf.net".
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 23:14:31 UTC (rev 3940)
+++ trunk/ChangeLog 2009-07-03 15:52:51 UTC (rev 3941)
@@ -1,3 +1,7 @@
+2009-07-03 Braden McDaniel <br...@en...>
+
+ * README: Use "sourceforge.net" in URIs instead of "sf.net".
+
2009-07-02 Braden McDaniel <br...@en...>
* README: Document the OPENVRML_FT_CONST and OPENVRML_JNI_CONST
Modified: trunk/README
===================================================================
--- trunk/README 2009-07-02 23:14:31 UTC (rev 3940)
+++ trunk/README 2009-07-03 15:52:51 UTC (rev 3941)
@@ -370,7 +370,7 @@
be made in the Mozilla plug-in directory.
When running openvrml-player from the build directories, you must
-specify the location of the GTK+ UI XML files using environment
+specify the location of the GTK+ UI XML files using the environment
variable OPENVRML_PLAYER_UIDIR; e.g.:
$ OPENVRML_PLAYER_UIDIR=$(pwd)/src/openvrml-player \
@@ -405,12 +405,12 @@
* <ope...@li...> is a low-traffic list for
announcments, typically regarding new releases. Subscription
instructions are at
- <http://lists.sf.net/mailman/listinfo/openvrml-announce>
+ <https://lists.sourceforge.net/lists/listinfo/openvrml-announce>
* <ope...@li...> is a forum for developers using
and working on the libraries. User feedback is welcome in this
channel. Subscription instructions are at
- <http://lists.sf.net/mailman/listinfo/openvrml-develop>
+ <https://lists.sourceforge.net/lists/listinfo/openvrml-develop>
In order to curb unsolicited commercial e-mail, openvrml-develop
permits posting only by subscribers.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 23:14:32
|
Revision: 3940
http://openvrml.svn.sourceforge.net/openvrml/?rev=3940&view=rev
Author: braden
Date: 2009-07-02 23:14:31 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Document the OPENVRML_FT_CONST and OPENVRML_JNI_CONST preprocessor symbols; document the environment variables used by libopenvrml and openvrml-player.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 21:27:25 UTC (rev 3939)
+++ trunk/ChangeLog 2009-07-02 23:14:31 UTC (rev 3940)
@@ -1,5 +1,11 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * README: Document the OPENVRML_FT_CONST and OPENVRML_JNI_CONST
+ preprocessor symbols; document the environment variables used by
+ libopenvrml and openvrml-player.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* README: Note libxml as a required dependency on non-Windows
platforms.
Modified: trunk/README
===================================================================
--- trunk/README 2009-07-02 21:27:25 UTC (rev 3939)
+++ trunk/README 2009-07-02 23:14:31 UTC (rev 3940)
@@ -306,7 +306,15 @@
Include support for rendering text using the Text node. Requires
fontconfig and FreeType.
+ OPENVRML_FT_CONST
+ Define to "const" if "const" should be used in FreeType callback
+ function signatures; define to empty otherwise.
+ OPENVRML_JNI_CONST
+ Define to "const" if "const" should be used in JNI function
+ signatures; define to empty otherwise.
+
+
Installation
============
@@ -320,6 +328,32 @@
documentation in the "doc/manual" subdirectory of the distribution and
the example programs in the "examples" subdirectory.
+ libopenvrml loads data files and plug-ins from known locations once
+it is installed. If they are defined, libopenvrml will prefer the
+locations specified by these environment variables:
+
+ OPENVRML_DATADIR
+ Directory where libopenvrml looks for architecture-independent
+ data.
+
+ OPENVRML_NODE_PATH
+ A search path where libopenvrml looks for node implementations.
+
+ OPENVRML_SCRIPT_PATH
+ A search path where libopenvrml looks for scripting engine
+ implementations.
+
+ The most common use case for setting these environment variables is
+running sdl-viewer or openvrml-xembed from the build directories. For
+example, if running a Bash shell and building in a subdirectory
+"build" where the current directory is the root of the OpenVRML
+distribution:
+
+ $ OPENVRML_DATADIR=$(pwd)/data \
+ OPENVRML_NODE_PATH=$(pwd)/build/src/node \
+ OPENVRML_SCRIPT_PATH=$(pwd)/build/src/script \
+ ./build/examples/sdl-viewer models/rotation_toy.wrl
+
If OpenVRML is configured to be installed to the same prefix as a
Mozilla-based browser is installed on the system, "make install" will
install the Mozilla plug-in to the browser's plug-in directory. This
@@ -335,7 +369,14 @@
directories, a symbolic link to the plug-in module "openvrml.so" must
be made in the Mozilla plug-in directory.
+ When running openvrml-player from the build directories, you must
+specify the location of the GTK+ UI XML files using environment
+variable OPENVRML_PLAYER_UIDIR; e.g.:
+ $ OPENVRML_PLAYER_UIDIR=$(pwd)/src/openvrml-player \
+ ./build/src/openvrml-player/openvrml-player
+
+
Conformance
===========
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 21:27:32
|
Revision: 3939
http://openvrml.svn.sourceforge.net/openvrml/?rev=3939&view=rev
Author: braden
Date: 2009-07-02 21:27:25 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Note libxml as a required dependency on non-Windows platforms.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 16:22:21 UTC (rev 3938)
+++ trunk/ChangeLog 2009-07-02 21:27:25 UTC (rev 3939)
@@ -1,5 +1,10 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * README: Note libxml as a required dependency on non-Windows
+ platforms.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
Use OPENVRML_API and OPENVRML_LOCAL everywhere instead of defining
module-specific macros.
Modified: trunk/README
===================================================================
--- trunk/README 2009-07-02 16:22:21 UTC (rev 3938)
+++ trunk/README 2009-07-02 21:27:25 UTC (rev 3939)
@@ -134,12 +134,16 @@
Prerequisites
=============
- OpenVRML requires the Boost C++ libraries to build, at least
-version 1.37. Boost is packaged for many systems; so you should
-consult your operating system vendor if Boost is not already installed
-on your system. Otherwise, you can obtain Boost from
-<http://boost.org>.
+ At a minimum, OpenVRML requires these libraries to build:
+ Boost (at least 1.37) <http://boost.org>
+ libxml (non-Windows only) <http://xmlsoft.org>
+
+ These libraries are packaged for many systems; so you should
+consult your operating system vendor if any of them is not already
+installed on your system. Otherwise, you can obtain them at the above
+URIs.
+
Note that Boost binaries built from the boost.org distribution, as
well as some other distributions, apply a suffix to the library
name that depends on the particular build configuration. When
@@ -147,6 +151,10 @@
variable BOOST_LIB_SUFFIX to match the suffix applied to the Boost
binaries; refer to the output of "configure --help".
+ libxml is not required on Microsoft Windows platforms. On Windows,
+OpenVRML uses the XmlLite library for XML parsing. XmlLite is
+included with recent versions of the Microsoft Windows SDK.
+
Building OpenVRML is fairly demanding of system resources;
especially, it seems, with modern versions of the GNU C++ compiler. It
is recommended that 32-bit build hosts have at least 1 GB of system
@@ -165,7 +173,6 @@
libjpeg <http://www.ijg.org>
FreeType <http://freetype.org>
Fontconfig <http://fontconfig.org>
- libxml <http://xmlsoft.org>
XULRunner <https://developer.mozilla.org/En/XULRunner>
Java Development Kit <http://java.sun.com/j2se/>
OpenGL/Mesa <http://mesa3d.org>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 17:25:36
|
Revision: 3938
http://openvrml.svn.sourceforge.net/openvrml/?rev=3938&view=rev
Author: braden
Date: 2009-07-02 16:22:21 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Use OPENVRML_API and OPENVRML_LOCAL everywhere instead of defining module-specific macros.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj
trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp
trunk/src/libopenvrml-gl/openvrml/gl/viewer.h
trunk/src/script/java.cpp
trunk/src/script/javascript.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/ChangeLog 2009-07-02 16:22:21 UTC (rev 3938)
@@ -1,5 +1,17 @@
2009-07-02 Braden McDaniel <br...@en...>
+ Use OPENVRML_API and OPENVRML_LOCAL everywhere instead of defining
+ module-specific macros.
+
+ * configure.ac
+ * ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj
+ * src/libopenvrml-gl/openvrml/gl/viewer.cpp
+ * src/libopenvrml-gl/openvrml/gl/viewer.h
+ * src/script/java.cpp
+ * src/script/javascript.cpp
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* configure.ac: Removed obsolete AC_DEFINE of
OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/configure.ac 2009-07-02 16:22:21 UTC (rev 3938)
@@ -62,27 +62,10 @@
#
OV_CXX_VISIBILITY(
[OPENVRML_API="__attribute__((visibility(\"default\")))"
-OPENVRML_LOCAL="__attribute__((visibility(\"hidden\")))"
-OPENVRML_GL_API="__attribute__((visibility(\"default\")))"
-OPENVRML_GL_LOCAL="__attribute__((visibility(\"hidden\")))"
-OPENVRML_JAVASCRIPT_API="__attribute__((visibility(\"default\")))"
-OPENVRML_JAVASCRIPT_LOCAL="__attribute__((visibility(\"hidden\")))"
-OPENVRML_JAVA_API="__attribute__((visibility(\"default\")))"
-OPENVRML_JAVA_LOCAL="__attribute__((visibility(\"hidden\")))"])
+OPENVRML_LOCAL="__attribute__((visibility(\"hidden\")))"])
AC_SUBST([OPENVRML_API])
AC_SUBST([OPENVRML_LOCAL])
-AC_SUBST([OPENVRML_GL_API])
-AC_SUBST([OPENVRML_GL_LOCAL])
-AC_DEFINE_UNQUOTED([OPENVRML_JAVASCRIPT_API], [$OPENVRML_JAVASCRIPT_API],
- [Exported symbol])
-AC_DEFINE_UNQUOTED([OPENVRML_JAVASCRIPT_LOCAL], [$OPENVRML_JAVASCRIPT_LOCAL],
- [Library-local symbol])
-AC_DEFINE_UNQUOTED([OPENVRML_JAVA_API], [$OPENVRML_JAVA_API],
- [Exported symbol])
-AC_DEFINE_UNQUOTED([OPENVRML_JAVA_LOCAL], [$OPENVRML_JAVA_LOCAL],
- [Library-local symbol])
-
#
# Checks for libraries/headers.
#
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj 2009-07-02 16:22:21 UTC (rev 3938)
@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\openvrml;..\..\..\..\..\src\libopenvrml"
- 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="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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Modified: trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp
===================================================================
--- trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2009-07-02 16:22:21 UTC (rev 3938)
@@ -75,12 +75,12 @@
const double inv_pi = 0.31830988618379067154;
template <typename Float>
- OPENVRML_GL_LOCAL inline Float fabs(const Float f)
+ OPENVRML_LOCAL inline Float fabs(const Float f)
{
return f < 0.0 ? -f : f;
}
- struct OPENVRML_GL_LOCAL fequal_t {
+ struct OPENVRML_LOCAL fequal_t {
template <typename Float>
bool operator()(Float a, Float b) const
{
@@ -96,7 +96,7 @@
const fequal_t fequal = fequal_t();
- class OPENVRML_GL_LOCAL gl_capabilities {
+ class OPENVRML_LOCAL gl_capabilities {
public:
GLint max_modelview_stack_depth;
GLint max_texture_size;
@@ -130,7 +130,7 @@
}
- struct OPENVRML_GL_LOCAL vertex_data {
+ struct OPENVRML_LOCAL vertex_data {
GLdouble coord[3];
const openvrml::color * color;
const openvrml::vec3f * normal;
@@ -146,14 +146,14 @@
{}
- struct OPENVRML_GL_LOCAL combined_vertex_data_ {
+ struct OPENVRML_LOCAL combined_vertex_data_ {
openvrml::color color;
openvrml::vec3f normal;
openvrml::vec2f tex_coord;
};
- struct OPENVRML_GL_LOCAL shell_tess_user_data {
+ struct OPENVRML_LOCAL shell_tess_user_data {
size_t face_index;
const std::vector<openvrml::color> * face_color;
const std::vector<openvrml::int32> * face_color_index;
@@ -177,7 +177,7 @@
/**
* @internal
*/
- struct OPENVRML_GL_LOCAL ShellData {
+ struct OPENVRML_LOCAL ShellData {
unsigned int mask;
const std::vector<openvrml::vec3f> & coord;
const std::vector<openvrml::int32> & coordIndex;
@@ -232,7 +232,7 @@
{}
// Generate a normal from 3 indexed points.
- OPENVRML_GL_LOCAL const openvrml::vec3f
+ OPENVRML_LOCAL const openvrml::vec3f
indexFaceNormal(const size_t i1,
const size_t i2,
const size_t i3,
@@ -811,7 +811,7 @@
// Project an x, y pair onto a sphere of radius r OR a hyperbolic sheet
// if we are away from the center of the sphere.
//
- OPENVRML_GL_LOCAL float tb_project_to_sphere(float r, float x, float y)
+ OPENVRML_LOCAL float tb_project_to_sphere(float r, float x, float y)
{
static const double sqrt2 = sqrt(2.0);
static const double sqrt2_2 = sqrt2 / 2.0;
@@ -839,10 +839,10 @@
// It is assumed that the arguments to this routine are in the range
// (-1.0 ... 1.0)
//
- OPENVRML_GL_LOCAL const openvrml::rotation trackball(float p1x,
- float p1y,
- float p2x,
- float p2y)
+ OPENVRML_LOCAL const openvrml::rotation trackball(float p1x,
+ float p1y,
+ float p2x,
+ float p2y)
{
using openvrml::rotation;
using openvrml::make_rotation;
@@ -1007,7 +1007,7 @@
namespace {
// Call this after each frame for debugging...
- OPENVRML_GL_LOCAL void checkErrors(const std::string & s)
+ OPENVRML_LOCAL void checkErrors(const std::string & s)
{
GLenum glerr;
while ((glerr = glGetError()) != GL_NO_ERROR) {
@@ -1534,12 +1534,12 @@
* It might be smarter to do just one, and reference it with scaling (but
* the world creator could just as easily do that with DEF/USE ...).
*/
- OPENVRML_GL_LOCAL void computeCylinder(const double height,
- const double radius,
- const int numFacets,
- float (*c)[3],
- float (*tc)[3],
- int * faces)
+ OPENVRML_LOCAL void computeCylinder(const double height,
+ const double radius,
+ const int numFacets,
+ float (*c)[3],
+ float (*tc)[3],
+ int * faces)
{
double angle, x, y;
int i, polyIndex;
@@ -1785,7 +1785,7 @@
// Compute a normal at vert i,j of an ElevationGrid.
- OPENVRML_GL_LOCAL const openvrml::vec3f elevationVertexNormal(
+ OPENVRML_LOCAL const openvrml::vec3f elevationVertexNormal(
const int i, const int j,
const int nx, const int nz,
const float dx, const float dz,
@@ -1974,7 +1974,7 @@
// Extrusion cap tessellation for non-convex shapes
- struct OPENVRML_GL_LOCAL TessExtrusion {
+ struct OPENVRML_LOCAL TessExtrusion {
const float * c; // coordinates array [nVerts * 3]
const float * crossSection; // crossSection coordinates [nCrossSection * 2]
float tcDeltaU, tcDeltaV;
@@ -2050,7 +2050,7 @@
namespace {
- OPENVRML_GL_LOCAL void
+ OPENVRML_LOCAL void
insertExtrusionCaps(GLUtesselator & tesselator,
const unsigned int mask,
const size_t nSpine,
@@ -2197,7 +2197,7 @@
* @return the length of the Extrusion spine described by @p spine; or 1.0
* if the length is 0.
*/
- OPENVRML_GL_LOCAL
+ OPENVRML_LOCAL
float get_spine_length(const std::vector<openvrml::vec3f> & spine)
{
using std::vector;
@@ -2227,7 +2227,7 @@
* @return the length of the Extrusion cross-section described by
* @p cross_section; or 1.0 if the length is 0.
*/
- OPENVRML_GL_LOCAL
+ OPENVRML_LOCAL
float
get_cross_section_length(
const std::vector<openvrml::vec2f> & cross_section)
@@ -2255,7 +2255,7 @@
* @return the <var>y</var>-axis of the spine-aligned cross-section plane
* at @p point.
*/
- OPENVRML_GL_LOCAL
+ OPENVRML_LOCAL
const openvrml::vec3f
compute_scp_y_axis(
const std::vector<openvrml::vec3f>::const_iterator & point,
@@ -2302,7 +2302,7 @@
* @return the <var>z</var>axis of the spine-aligned cross-section plane
* at @p point.
*/
- OPENVRML_GL_LOCAL
+ OPENVRML_LOCAL
const openvrml::vec3f
compute_scp_z_axis(
const std::vector<openvrml::vec3f>::const_iterator & point,
@@ -2372,7 +2372,7 @@
* @return @c true if the points in @p spine are collinear; @c false
* otherwise.
*/
- OPENVRML_GL_LOCAL
+ OPENVRML_LOCAL
bool
check_spine_points_collinear(const std::vector<openvrml::vec3f> & spine,
openvrml::vec3f & scp_x,
@@ -2466,7 +2466,7 @@
* @param[out] coord
* @param[out] texcoord
*/
- OPENVRML_GL_LOCAL void
+ OPENVRML_LOCAL void
compute_extrusion_coords_(
const std::vector<openvrml::vec2f> & cross_section,
const std::vector<openvrml::vec3f> & spine,
@@ -2794,9 +2794,9 @@
namespace {
- OPENVRML_GL_LOCAL void computeBounds(size_t npoints,
- const float * points,
- float (&bounds)[6])
+ OPENVRML_LOCAL void computeBounds(size_t npoints,
+ const float * points,
+ float (&bounds)[6])
{
if (npoints == 0) {
std::fill(bounds, bounds + 6, 0.0f);
@@ -2817,9 +2817,9 @@
}
}
- OPENVRML_GL_LOCAL void texGenParams(float (&bounds)[6], // xmin,xmax, ymin,ymax, zmin,zmax
- int (&axes)[2], // s, t
- float (¶ms)[4]) // s0, 1/sSize, t0, 1/tSize
+ OPENVRML_LOCAL void texGenParams(float (&bounds)[6], // xmin,xmax, ymin,ymax, zmin,zmax
+ int (&axes)[2], // s, t
+ float (¶ms)[4]) // s0, 1/sSize, t0, 1/tSize
{
axes[0] = 0;
axes[1] = 1;
@@ -2848,7 +2848,7 @@
params[3] = float(1.0 / params[3]);
}
- OPENVRML_GL_LOCAL void insertShellConvex(ShellData * const s)
+ OPENVRML_LOCAL void insertShellConvex(ShellData * const s)
{
using openvrml::vec3f;
using openvrml::gl::viewer;
@@ -2951,7 +2951,7 @@
}
}
- OPENVRML_GL_LOCAL void
+ OPENVRML_LOCAL void
insertShellTess(GLUtesselator & tessobj,
const std::vector<vertex_data> & vertices,
const std::vector<openvrml::int32> & coord_index,
@@ -3202,11 +3202,11 @@
namespace {
- OPENVRML_GL_LOCAL void computeSphere(const double radius,
- const int numLatLong,
- float (*c)[3],
- float (*tc)[3],
- int *faces)
+ OPENVRML_LOCAL void computeSphere(const double radius,
+ const int numLatLong,
+ float (*c)[3],
+ float (*tc)[3],
+ int *faces)
{
double r, angle, x, y, z;
int i, j, polyIndex;
@@ -3669,7 +3669,7 @@
namespace {
- OPENVRML_GL_LOCAL inline bool power_of_2(unsigned long n)
+ OPENVRML_LOCAL inline bool power_of_2(unsigned long n)
{
return !(n & (n - 1));
}
@@ -3863,11 +3863,11 @@
/**
* Compute a target and up vector from position/orientation/distance.
*/
- OPENVRML_GL_LOCAL void computeView(const openvrml::vec3f & position,
- const openvrml::rotation & orientation,
- const float distance,
- openvrml::vec3f & target,
- openvrml::vec3f & up)
+ OPENVRML_LOCAL void computeView(const openvrml::vec3f & position,
+ const openvrml::rotation & orientation,
+ const float distance,
+ openvrml::vec3f & target,
+ openvrml::vec3f & up)
{
// Graphics Gems, p 466. Convert between axis/angle and rotation matrix
Modified: trunk/src/libopenvrml-gl/openvrml/gl/viewer.h
===================================================================
--- trunk/src/libopenvrml-gl/openvrml/gl/viewer.h 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/src/libopenvrml-gl/openvrml/gl/viewer.h 2009-07-02 16:22:21 UTC (rev 3938)
@@ -43,7 +43,7 @@
namespace gl {
- class OPENVRML_GL_API viewer : public openvrml::viewer {
+ class OPENVRML_API viewer : public openvrml::viewer {
typedef std::map<const node *, GLuint> list_map_t;
struct delete_list;
list_map_t list_map_;
Modified: trunk/src/script/java.cpp
===================================================================
--- trunk/src/script/java.cpp 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/src/script/java.cpp 2009-07-02 16:22:21 UTC (rev 3938)
@@ -107,18 +107,18 @@
namespace {
- OPENVRML_JAVA_LOCAL lt_dlhandle libjvm_handle;
- OPENVRML_JAVA_LOCAL jint (*CreateJavaVM)(JavaVM **, void **, void *);
+ OPENVRML_LOCAL lt_dlhandle libjvm_handle;
+ OPENVRML_LOCAL jint (*CreateJavaVM)(JavaVM **, void **, void *);
- OPENVRML_JAVA_LOCAL JavaVM * vm;
+ OPENVRML_LOCAL JavaVM * vm;
- OPENVRML_JAVA_LOCAL class OPENVRML_JAVA_LOCAL load_libjvm {
+ OPENVRML_LOCAL class OPENVRML_LOCAL load_libjvm {
public:
load_libjvm();
~load_libjvm();
} load_libjvm_;
- OPENVRML_JAVA_LOCAL const std::string
+ OPENVRML_LOCAL const std::string
create_searchpath_from_java_home(const std::string & java_home)
{
assert(!java_home.empty());
@@ -192,7 +192,7 @@
/**
* @brief Subclass of @c openvrml::script for JSAI.
*/
- class OPENVRML_JAVA_LOCAL script : public openvrml::script {
+ class OPENVRML_LOCAL script : public openvrml::script {
friend void JNICALL (::Java_vrml_node_Script_updateField)(
JNIEnv * env,
@@ -245,7 +245,7 @@
};
- class OPENVRML_JAVA_LOCAL script_factory : public openvrml::script_factory {
+ class OPENVRML_LOCAL script_factory : public openvrml::script_factory {
public:
virtual ~script_factory() OPENVRML_NOTHROW;
@@ -257,7 +257,7 @@
} // namespace
-extern "C" OPENVRML_JAVA_API void
+extern "C" OPENVRML_API void
openvrml_script_LTX_register_factory(
openvrml::script_factory_registry & registry)
{
@@ -304,7 +304,7 @@
namespace {
- OPENVRML_JAVA_LOCAL jint create_java_vm(JavaVM *& vm, JNIEnv *& env)
+ OPENVRML_LOCAL jint create_java_vm(JavaVM *& vm, JNIEnv *& env)
{
using std::ostringstream;
@@ -331,7 +331,7 @@
return CreateJavaVM(&vm, reinterpret_cast<void **>(&env), &args);
}
- OPENVRML_JAVA_LOCAL jobject create_url(JNIEnv & env, const char * const url)
+ OPENVRML_LOCAL jobject create_url(JNIEnv & env, const char * const url)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
using boost::ref;
@@ -398,7 +398,7 @@
return result;
}
- OPENVRML_JAVA_LOCAL jobject create_class_loader(JNIEnv & env,
+ OPENVRML_LOCAL jobject create_class_loader(JNIEnv & env,
const std::string & url_str)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -707,7 +707,7 @@
// This function simply returns 0 if any Java exceptions are thrown. It
// does not clear the exception state.
//
- OPENVRML_JAVA_LOCAL jobject
+ OPENVRML_LOCAL jobject
clone_Field(JNIEnv & env,
const openvrml::field_value & value,
const bool const_ = false)
@@ -774,7 +774,7 @@
// This function simply returns 0 if any Java exceptions are thrown. It
// does not clear the exception state.
//
- OPENVRML_JAVA_LOCAL jobject
+ OPENVRML_LOCAL jobject
create_Field(JNIEnv & env,
const openvrml::field_value::type_id type,
const bool const_ = false)
@@ -834,7 +834,7 @@
return result;
}
- OPENVRML_JAVA_LOCAL void
+ OPENVRML_LOCAL void
init_script_fields(
JNIEnv & env,
const jclass script_class,
@@ -883,7 +883,7 @@
}
}
- OPENVRML_JAVA_LOCAL jobject
+ OPENVRML_LOCAL jobject
clone_NodeField(JNIEnv & env,
const openvrml::field_value & value)
OPENVRML_THROW1(std::bad_alloc)
@@ -940,7 +940,7 @@
return result;
}
- OPENVRML_JAVA_LOCAL void
+ OPENVRML_LOCAL void
init_script_eventouts(
JNIEnv & env,
const jclass script_class,
@@ -1233,7 +1233,7 @@
// This function simply returns 0 if any Java exceptions are thrown. It
// does not clear the exception state.
//
- OPENVRML_JAVA_LOCAL jobject
+ OPENVRML_LOCAL jobject
clone_ConstField(JNIEnv & env, const openvrml::field_value & value)
OPENVRML_THROW1(std::bad_alloc)
{
@@ -1507,7 +1507,7 @@
* @c long member named “peer”.
*/
template <typename FieldValue>
- OPENVRML_JAVA_LOCAL FieldValue & get_Field_peer(JNIEnv & env,
+ OPENVRML_LOCAL FieldValue & get_Field_peer(JNIEnv & env,
const jobject obj)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -1545,7 +1545,7 @@
return *peer;
}
- OPENVRML_JAVA_LOCAL openvrml::browser &
+ OPENVRML_LOCAL openvrml::browser &
get_Browser_peer(JNIEnv & env, const jobject obj)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -1695,7 +1695,7 @@
namespace {
- OPENVRML_JAVA_LOCAL jobject
+ OPENVRML_LOCAL jobject
create_Node(JNIEnv & env, const boost::intrusive_ptr<openvrml::node> & node)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -1757,7 +1757,7 @@
return result;
}
- OPENVRML_JAVA_LOCAL jobjectArray
+ OPENVRML_LOCAL jobjectArray
create_BaseNode_array(
JNIEnv & env,
std::vector<boost::intrusive_ptr<openvrml::node> > & nodes)
@@ -1892,7 +1892,7 @@
namespace {
- OPENVRML_JAVA_LOCAL script &
+ OPENVRML_LOCAL script &
get_Script_peer(JNIEnv & env, const jobject obj)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
@@ -1926,7 +1926,7 @@
return *peer;
}
- OPENVRML_JAVA_LOCAL const boost::intrusive_ptr<openvrml::node> &
+ OPENVRML_LOCAL const boost::intrusive_ptr<openvrml::node> &
get_BaseNode_peer(JNIEnv & env, const jobject obj)
OPENVRML_THROW2(std::runtime_error, std::bad_alloc)
{
Modified: trunk/src/script/javascript.cpp
===================================================================
--- trunk/src/script/javascript.cpp 2009-07-02 08:57:53 UTC (rev 3937)
+++ trunk/src/script/javascript.cpp 2009-07-02 16:22:21 UTC (rev 3938)
@@ -44,23 +44,23 @@
class MFNode;
namespace Browser {
- OPENVRML_JAVASCRIPT_LOCAL
+ OPENVRML_LOCAL
JSBool createVrmlFromURL(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL
+ OPENVRML_LOCAL
JSBool addRoute(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv, jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL
+ OPENVRML_LOCAL
JSBool deleteRoute(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
}
- class OPENVRML_JAVASCRIPT_LOCAL script : public openvrml::script {
+ class OPENVRML_LOCAL script : public openvrml::script {
friend class SFNode;
friend class MFNode;
@@ -118,7 +118,7 @@
};
- class OPENVRML_JAVASCRIPT_LOCAL script_factory : public openvrml::script_factory {
+ class OPENVRML_LOCAL script_factory : public openvrml::script_factory {
public:
virtual ~script_factory() OPENVRML_NOTHROW;
@@ -129,7 +129,7 @@
};
} // namespace
-extern "C" OPENVRML_JAVASCRIPT_API void
+extern "C" OPENVRML_API void
openvrml_script_LTX_register_factory(
openvrml::script_factory_registry & registry)
{
@@ -166,16 +166,16 @@
const long MAX_HEAP_BYTES = 4L * 1024L * 1024L;
const long STACK_CHUNK_BYTES = 4024L;
- class OPENVRML_JAVASCRIPT_LOCAL bad_conversion : public std::runtime_error {
+ class OPENVRML_LOCAL bad_conversion : public std::runtime_error {
public:
bad_conversion(const std::string & msg): runtime_error(msg) {}
virtual ~bad_conversion() throw () {}
};
- OPENVRML_JAVASCRIPT_LOCAL JSBool floatsToJSArray(size_t numFloats,
+ OPENVRML_LOCAL JSBool floatsToJSArray(size_t numFloats,
const float * floats,
JSContext * cx, jsval * rval);
- OPENVRML_JAVASCRIPT_LOCAL std::auto_ptr<openvrml::field_value>
+ OPENVRML_LOCAL std::auto_ptr<openvrml::field_value>
createFieldValueFromJsval(JSContext * cx, jsval val,
openvrml::field_value::type_id fieldType)
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
@@ -225,73 +225,73 @@
0, // mark
0 // spare
};
- OPENVRML_JAVASCRIPT_LOCAL JSBool getName(JSContext * cx,
+ OPENVRML_LOCAL JSBool getName(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool getVersion(JSContext * cx,
+ OPENVRML_LOCAL JSBool getVersion(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentSpeed(JSContext * cx,
+ OPENVRML_LOCAL JSBool getCurrentSpeed(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentFrameRate(JSContext * cx,
+ OPENVRML_LOCAL JSBool getCurrentFrameRate(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool getWorldURL(JSContext * cx,
+ OPENVRML_LOCAL JSBool getWorldURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool replaceWorld(JSContext * cx,
+ OPENVRML_LOCAL JSBool replaceWorld(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromString(JSContext * cx,
+ OPENVRML_LOCAL JSBool createVrmlFromString(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromURL(JSContext * cx,
+ OPENVRML_LOCAL JSBool createVrmlFromURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool addRoute(JSContext * cx,
+ OPENVRML_LOCAL JSBool addRoute(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool deleteRoute(JSContext * cx,
+ OPENVRML_LOCAL JSBool deleteRoute(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool loadURL(JSContext * cx,
+ OPENVRML_LOCAL JSBool loadURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL JSBool setDescription(JSContext * cx,
+ OPENVRML_LOCAL JSBool setDescription(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
@@ -306,7 +306,7 @@
// the object, if any, and whether or not the object corresponds to
// an eventOut.
//
- class OPENVRML_JAVASCRIPT_LOCAL field_data : boost::noncopyable {
+ class OPENVRML_LOCAL field_data : boost::noncopyable {
public:
bool changed;
@@ -316,7 +316,7 @@
field_data();
};
- class OPENVRML_JAVASCRIPT_LOCAL sfield {
+ class OPENVRML_LOCAL sfield {
public:
/**
* The sfdata class takes ownership of the field_value and deletes it
@@ -341,7 +341,7 @@
sfield();
};
- class OPENVRML_JAVASCRIPT_LOCAL SFColor : public sfield {
+ class OPENVRML_LOCAL SFColor : public sfield {
public:
static JSClass jsclass;
@@ -373,7 +373,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL SFImage : public sfield {
+ class OPENVRML_LOCAL SFImage : public sfield {
public:
static JSClass jsclass;
@@ -400,7 +400,7 @@
jsval * vp) OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL SFNode : public sfield {
+ class OPENVRML_LOCAL SFNode : public sfield {
public:
static JSClass jsclass;
static JSClass direct_output_jsclass;
@@ -428,7 +428,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL SFRotation : public sfield {
+ class OPENVRML_LOCAL SFRotation : public sfield {
public:
static JSClass jsclass;
@@ -517,7 +517,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL SFVec2f : public sfvec2_jsobject<SFVec2f> {
+ class OPENVRML_LOCAL SFVec2f : public sfvec2_jsobject<SFVec2f> {
public:
typedef ::openvrml::sfvec2f field_type;
typedef field_type::value_type value_type;
@@ -532,7 +532,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL SFVec2d : public sfvec2_jsobject<SFVec2f> {
+ class OPENVRML_LOCAL SFVec2d : public sfvec2_jsobject<SFVec2f> {
public:
typedef ::openvrml::sfvec2d field_type;
typedef field_type::value_type value_type;
@@ -591,7 +591,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL SFVec3f : public sfvec3_jsobject<SFVec3f> {
+ class OPENVRML_LOCAL SFVec3f : public sfvec3_jsobject<SFVec3f> {
public:
typedef ::openvrml::sfvec3f field_type;
typedef field_type::value_type value_type;
@@ -606,7 +606,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL SFVec3d : public sfvec3_jsobject<SFVec3d> {
+ class OPENVRML_LOCAL SFVec3d : public sfvec3_jsobject<SFVec3d> {
public:
typedef ::openvrml::sfvec3d field_type;
typedef field_type::value_type value_type;
@@ -621,7 +621,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MField {
+ class OPENVRML_LOCAL MField {
public:
typedef std::vector<jsval> JsvalArray;
@@ -653,7 +653,7 @@
* SFVec2f, SFVec3f.
*/
template <typename Subclass>
- class OPENVRML_JAVASCRIPT_LOCAL MFJSObject : public MField {
+ class OPENVRML_LOCAL MFJSObject : public MField {
public:
static JSObject * initClass(JSContext * cx, JSObject * obj)
OPENVRML_NOTHROW;
@@ -682,7 +682,7 @@
* In JavaScript, all floating point values are treated as doubles.
*/
template <typename Subclass>
- class OPENVRML_JAVASCRIPT_LOCAL MFJSDouble : public MField {
+ class OPENVRML_LOCAL MFJSDouble : public MField {
public:
static JSObject * initClass(JSContext * cx, JSObject * obj)
OPENVRML_NOTHROW;
@@ -705,7 +705,7 @@
uintN argc, jsval * argv) OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL MFBool : public MField {
+ class OPENVRML_LOCAL MFBool : public MField {
public:
static JSClass jsclass;
@@ -731,7 +731,7 @@
static void finalize(JSContext * cx, JSObject * obj);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFColor : public MFJSObject<MFColor> {
+ class OPENVRML_LOCAL MFColor : public MFJSObject<MFColor> {
public:
static JSClass jsclass;
static JSClass & sfjsclass;
@@ -744,7 +744,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFFloat : public MFJSDouble<MFFloat> {
+ class OPENVRML_LOCAL MFFloat : public MFJSDouble<MFFloat> {
public:
static JSClass jsclass;
@@ -768,7 +768,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFInt32 : public MField {
+ class OPENVRML_LOCAL MFInt32 : public MField {
public:
static JSClass jsclass;
@@ -799,7 +799,7 @@
// We can't use the MFJSObject<> template to implement MFNode, since
// the SFNode constructor requires an argument.
//
- class OPENVRML_JAVASCRIPT_LOCAL MFNode : public MField {
+ class OPENVRML_LOCAL MFNode : public MField {
public:
static JSClass jsclass;
@@ -829,7 +829,7 @@
static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL MFRotation : public MFJSObject<MFRotation> {
+ class OPENVRML_LOCAL MFRotation : public MFJSObject<MFRotation> {
public:
static JSClass jsclass;
static JSClass & sfjsclass;
@@ -843,7 +843,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFString : public MField {
+ class OPENVRML_LOCAL MFString : public MField {
public:
static JSClass jsclass;
@@ -872,7 +872,7 @@
static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW;
};
- class OPENVRML_JAVASCRIPT_LOCAL MFTime : public MFJSDouble<MFTime> {
+ class OPENVRML_LOCAL MFTime : public MFJSDouble<MFTime> {
public:
static JSClass jsclass;
@@ -884,7 +884,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFVec2f : public MFJSObject<MFVec2f> {
+ class OPENVRML_LOCAL MFVec2f : public MFJSObject<MFVec2f> {
public:
static JSClass jsclass;
static JSClass & sfjsclass;
@@ -910,7 +910,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL MFVec3f : public MFJSObject<MFVec3f> {
+ class OPENVRML_LOCAL MFVec3f : public MFJSObject<MFVec3f> {
public:
static JSClass jsclass;
static JSClass & sfjsclass;
@@ -936,7 +936,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_JAVASCRIPT_LOCAL VrmlMatrix {
+ class OPENVRML_LOCAL VrmlMatrix {
public:
//
// The VrmlMatrixRow_ class is returned when using the [] operator
@@ -1018,13 +1018,13 @@
JSRuntime * script::rt = 0; // Javascript runtime singleton object
size_t script::nInstances = 0; // Number of distinct script objects
- OPENVRML_JAVASCRIPT_LOCAL JSBool eventOut_setProperty(JSContext * cx,
+ OPENVRML_LOCAL JSBool eventOut_setProperty(JSContext * cx,
JSObject * obj,
jsval id,
jsval * val)
OPENVRML_NOTHROW;
- OPENVRML_JAVASCRIPT_LOCAL void errorReporter(JSContext * cx,
+ OPENVRML_LOCAL void errorReporter(JSContext * cx,
const char * message,
JSErrorReport * report);
@@ -3627,7 +3627,7 @@
return initObject(cx, obj, rot);
}
- OPENVRML_JAVASCRIPT_LOCAL bool normalized(const openvrml::vec3f & v)
+ OPENVRML_LOCAL bool normalized(const openvrml::vec3f & v)
{
return openvrml::local::fequal(v.length(), 1.0f);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 08:58:53
|
Revision: 3937
http://openvrml.svn.sourceforge.net/openvrml/?rev=3937&view=rev
Author: braden
Date: 2009-07-02 08:57:53 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Removed obsolete AC_DEFINE of OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 05:54:22 UTC (rev 3936)
+++ trunk/ChangeLog 2009-07-02 08:57:53 UTC (rev 3937)
@@ -1,5 +1,10 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * configure.ac: Removed obsolete AC_DEFINE of
+ OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* README: Point to trac resources rather than the old SourceForge
ones.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-07-02 05:54:22 UTC (rev 3936)
+++ trunk/configure.ac 2009-07-02 08:57:53 UTC (rev 3937)
@@ -343,8 +343,6 @@
AS_IF([test -z "$JS_LIBS"], [JS_LIBS="-ljs"])])
AS_IF([test \( \( X$have_libmozjs = Xno -o \( X$with_libjs = Xyes -a X$have_libjs = Xno \) \) -a -z "$JS_LIBS" \) -o X$have_jsapi_h != Xyes],
[AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support])])
-AC_DEFINE([OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT], [1],
- [Defined if Script node JavaScript support is enabled.])
#
# Figure out whether we need to add -DJS_THREADSAFE to JS_CFLAGS.
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 05:54:59
|
Revision: 3936
http://openvrml.svn.sourceforge.net/openvrml/?rev=3936&view=rev
Author: braden
Date: 2009-07-02 05:54:22 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Point to trac resources rather than the old SourceForge ones.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-02 05:24:32 UTC (rev 3935)
+++ trunk/ChangeLog 2009-07-02 05:54:22 UTC (rev 3936)
@@ -1,5 +1,10 @@
2009-07-02 Braden McDaniel <br...@en...>
+ * README: Point to trac resources rather than the old SourceForge
+ ones.
+
+2009-07-02 Braden McDaniel <br...@en...>
+
* doc/intro.doc: Note componentization features in the introduction.
2009-06-29 Braden McDaniel <br...@en...>
Modified: trunk/README
===================================================================
--- trunk/README 2009-07-02 05:24:32 UTC (rev 3935)
+++ trunk/README 2009-07-02 05:54:22 UTC (rev 3936)
@@ -340,10 +340,10 @@
Bug reports
===========
- Please report any bugs you encounter via the SourceForge bug tracking
+ Please report any bugs you encounter using OpenVRML's bug tracking
system:
- <http://sf.net/bugs/?group_id=7151>
+ <https://sourceforge.net/apps/trac/openvrml/newticket>
Note that you will need to log into SourceForge before reporting a
bug.
@@ -371,13 +371,13 @@
============
We're always grateful for help in improving OpenVRML. Consult the
-SourceForge Task Manager for a list of planned improvements:
+list of active tickets:
- <http://sf.net/pm/task.php?group_project_id=2579&group_id=7151&func=browse>
+ <https://sourceforge.net/apps/trac/openvrml/report/1>
- Unassigned tasks are up for grabs, but please post to the
-openvrml-develop mailing list to alert others of your intention to take
-a task. This helps avoid duplicated effort. If you do not see the task
-you'd like to pursue listed in the Task Manager, but you think the
-library could benefit from your contribution, post a proposal to the
+ Unassigned tasks are up for grabs; but please post to the
+openvrml-develop mailing list to alert others of your intention to
+take a task. This helps avoid duplicated effort. If you do not see
+the task you'd like to pursue listed, but you think the library could
+benefit from your contribution, post a proposal to the
openvrml-develop mailing list.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-07-02 05:24:34
|
Revision: 3935
http://openvrml.svn.sourceforge.net/openvrml/?rev=3935&view=rev
Author: braden
Date: 2009-07-02 05:24:32 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
Note componentization features in the introduction.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/intro.doc
Property Changed:
----------------
trunk/doc/conformance.doc
trunk/doc/gpl.doc
trunk/doc/index.doc
trunk/doc/intro.doc
trunk/doc/lgpl.doc
trunk/doc/libopenvrml.doc
trunk/doc/parsing.doc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-29 06:12:52 UTC (rev 3934)
+++ trunk/ChangeLog 2009-07-02 05:24:32 UTC (rev 3935)
@@ -1,3 +1,7 @@
+2009-07-02 Braden McDaniel <br...@en...>
+
+ * doc/intro.doc: Note componentization features in the introduction.
+
2009-06-29 Braden McDaniel <br...@en...>
* README: Updated dependency list.
Property changes on: trunk/doc/conformance.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/gpl.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/index.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Modified: trunk/doc/intro.doc
===================================================================
(Binary files differ)
Property changes on: trunk/doc/intro.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/lgpl.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/libopenvrml.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
Property changes on: trunk/doc/parsing.doc
___________________________________________________________________
Modified: svn:mime-type
- application/msword
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-29 06:12:55
|
Revision: 3934
http://openvrml.svn.sourceforge.net/openvrml/?rev=3934&view=rev
Author: braden
Date: 2009-06-29 06:12:52 +0000 (Mon, 29 Jun 2009)
Log Message:
-----------
Updated dependency list.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 08:22:36 UTC (rev 3933)
+++ trunk/ChangeLog 2009-06-29 06:12:52 UTC (rev 3934)
@@ -1,3 +1,7 @@
+2009-06-29 Braden McDaniel <br...@en...>
+
+ * README: Updated dependency list.
+
2009-06-26 Braden McDaniel <br...@en...>
* README: Back off the system memory recommendation a bit.
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 08:22:36 UTC (rev 3933)
+++ trunk/README 2009-06-29 06:12:52 UTC (rev 3934)
@@ -124,11 +124,11 @@
sources.
/x3d-texturing : X3D Texturing component node
implementation sources.
- /openvrml-xembed : XEmbed control application sources.
- /openvrml-player : OpenVRML Player application sources.
- /script : Scripting engine module sources.
- /java : Script node Java API sources.
- /tests : Test programs.
+ /openvrml-xembed : XEmbed control application sources.
+ /openvrml-player : OpenVRML Player application sources.
+ /script : Scripting engine module sources.
+ /java : Script node Java API sources.
+ /tests : Test programs.
Prerequisites
@@ -165,10 +165,15 @@
libjpeg <http://www.ijg.org>
FreeType <http://freetype.org>
Fontconfig <http://fontconfig.org>
- Mozilla <http://mozilla.org>
+ libxml <http://xmlsoft.org>
+ XULRunner <https://developer.mozilla.org/En/XULRunner>
Java Development Kit <http://java.sun.com/j2se/>
OpenGL/Mesa <http://mesa3d.org>
GTK+ <http://gtk.org>
+ GtkGLExt <http://gtkglext.sourceforge.net>
+ libcurl <http://curl.haxx.se/libcurl/>
+ D-Bus <http://www.freedesktop.org/wiki/Software/dbus>
+ GNOME <http://gnome.org>
SDL <http://libsdl.org>
Doxygen <http://doxygen.org>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 08:22:37
|
Revision: 3933
http://openvrml.svn.sourceforge.net/openvrml/?rev=3933&view=rev
Author: braden
Date: 2009-06-26 08:22:36 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Back off the system memory recommendation a bit.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 07:44:19 UTC (rev 3932)
+++ trunk/ChangeLog 2009-06-26 08:22:36 UTC (rev 3933)
@@ -1,5 +1,9 @@
2009-06-26 Braden McDaniel <br...@en...>
+ * README: Back off the system memory recommendation a bit.
+
+2009-06-26 Braden McDaniel <br...@en...>
+
* README: Updated the directory layout; note that at least Boost
1.37 is required.
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 07:44:19 UTC (rev 3932)
+++ trunk/README 2009-06-26 08:22:36 UTC (rev 3933)
@@ -75,6 +75,7 @@
Package directory layout
========================
+
/data
/component : XML component definitions.
/doc
@@ -148,8 +149,8 @@
Building OpenVRML is fairly demanding of system resources;
especially, it seems, with modern versions of the GNU C++ compiler. It
-is recommended that 32-bit build hosts have at least 1.5 GB of system
-memory; the recommended minimum for 64-bit build hosts is 3 GB.
+is recommended that 32-bit build hosts have at least 1 GB of system
+memory; the recommended minimum for 64-bit build hosts is 2 GB.
Optional dependencies
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 07:44:22
|
Revision: 3932
http://openvrml.svn.sourceforge.net/openvrml/?rev=3932&view=rev
Author: braden
Date: 2009-06-26 07:44:19 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Updated the directory layout; note that at least Boost 1.37 is required.
Modified Paths:
--------------
trunk/ChangeLog
trunk/README
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 02:33:26 UTC (rev 3931)
+++ trunk/ChangeLog 2009-06-26 07:44:19 UTC (rev 3932)
@@ -1,3 +1,8 @@
+2009-06-26 Braden McDaniel <br...@en...>
+
+ * README: Updated the directory layout; note that at least Boost
+ 1.37 is required.
+
2009-06-25 Braden McDaniel <br...@en...>
* doc/parsing.doc: Updated to reflect use of the
Modified: trunk/README
===================================================================
--- trunk/README 2009-06-26 02:33:26 UTC (rev 3931)
+++ trunk/README 2009-06-26 07:44:19 UTC (rev 3932)
@@ -75,19 +75,54 @@
Package directory layout
========================
+ /data
+ /component : XML component definitions.
/doc
- /manual : API documentation.
- /examples : Example programs.
+ /manual : API documentation.
+ /examples : Example programs.
/ide-projects
/Windows
- /VisualC9_0 : Microsoft Visual C++ 9.0 project files.
- /lib : 3rd party library sources.
- /m4 : m4 macros used by the GNU build system.
- /models : Sample VRML models.
- /mozilla-plugin : Mozilla plug-in sources.
+ /VisualC9_0 : Microsoft Visual C++ 9.0 project files.
+ /m4 : m4 macros used by the GNU build system.
+ /models : Sample VRML models.
/src
- /libopenvrml : Runtime library sources.
- /libopenvrml-gl : OpenGL renderer library sources.
+ /libopenvrml : Runtime library sources.
+ /libopenvrml-gl : OpenGL renderer library sources.
+ /mozilla-plugin : Mozilla plug-in sources.
+ /node
+ /vrml97 : VRML97 node implementation sources.
+ /x3d-cad-geometry : X3D CAD Geometry component node
+ implementation sources.
+ /x3d-core : X3D Core component node implementation
+ sources.
+ /x3d-dis : X3D DIS component node implementation
+ sources.
+ /x3d-environmental-effects : X3D Environmental Effects component node
+ implementation sources.
+ /x3d-event-utilities : X3D Event Utilities component node
+ implementation sources.
+ /x3d-geometry2d : X3D Geometry2D component node
+ implementation sources.
+ /x3d-geospatial : X3D Geospatial component node
+ implementation sources.
+ /x3d-grouping : X3D Grouping component node
+ implementation sources.
+ /x3d-h-anim : X3D H-Anim component node implementation
+ sources.
+ /x3d-interpolation : X3D Interpolation component node
+ implementation sources.
+ /x3d-key-device-sensor : X3D Key Device Sensor component node
+ implementation sources.
+ /x3d-networking : X3D Networking component node
+ implementation sources.
+ /x3d-nurbs : X3D NURBS component node implementation
+ sources.
+ /x3d-rendering : X3D Rendering component node
+ implementation sources.
+ /x3d-shape : X3D Shape component node implementation
+ sources.
+ /x3d-texturing : X3D Texturing component node
+ implementation sources.
/openvrml-xembed : XEmbed control application sources.
/openvrml-player : OpenVRML Player application sources.
/script : Scripting engine module sources.
@@ -98,10 +133,11 @@
Prerequisites
=============
- OpenVRML requires the Boost C++ libraries to build. Boost is
-packaged for many systems; so you should consult your operating system
-vendor if Boost is not already installed on your system. Otherwise, you
-can obtain Boost from <http://boost.org>.
+ OpenVRML requires the Boost C++ libraries to build, at least
+version 1.37. Boost is packaged for many systems; so you should
+consult your operating system vendor if Boost is not already installed
+on your system. Otherwise, you can obtain Boost from
+<http://boost.org>.
Note that Boost binaries built from the boost.org distribution, as
well as some other distributions, apply a suffix to the library
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 02:33:27
|
Revision: 3931
http://openvrml.svn.sourceforge.net/openvrml/?rev=3931&view=rev
Author: braden
Date: 2009-06-26 02:33:26 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Updated to reflect use of the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/parsing.doc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-26 02:31:53 UTC (rev 3930)
+++ trunk/ChangeLog 2009-06-26 02:33:26 UTC (rev 3931)
@@ -1,3 +1,8 @@
+2009-06-25 Braden McDaniel <br...@en...>
+
+ * doc/parsing.doc: Updated to reflect use of the
+ boost::spirit::classic namespace.
+
2009-06-23 Braden McDaniel <br...@en...>
Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the
Modified: trunk/doc/parsing.doc
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-26 02:31:56
|
Revision: 3930
http://openvrml.svn.sourceforge.net/openvrml/?rev=3930&view=rev
Author: braden
Date: 2009-06-26 02:31:53 +0000 (Fri, 26 Jun 2009)
Log Message:
-----------
Ignore *.dot and _formulas.tex.
Property Changed:
----------------
trunk/doc/manual/
Property changes on: trunk/doc/manual
___________________________________________________________________
Modified: svn:ignore
- *.css
*.html
*.map
*.md5
*inherit__graph*.png
*__incl.png
doxygen.png
form_*.png
formula.repository
graph_legend.*
tab_?.gif
+ *.css
*.dot
*.html
*.map
*.md5
*inherit__graph*.png
*__incl.png
doxygen.png
form_*.png
formula.repository
graph_legend.*
tab_?.gif
_formulas.tex
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-24 03:20:46
|
Revision: 3929
http://openvrml.svn.sourceforge.net/openvrml/?rev=3929&view=rev
Author: braden
Date: 2009-06-24 03:20:41 +0000 (Wed, 24 Jun 2009)
Log Message:
-----------
Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the test programs.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tests/Makefile.am
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:40:35 UTC (rev 3928)
+++ trunk/ChangeLog 2009-06-24 03:20:41 UTC (rev 3929)
@@ -1,3 +1,13 @@
+2009-06-23 Braden McDaniel <br...@en...>
+
+ Set OPENVRML_NODE_PATH and OPENVRML_SCRIPT_PATH when running the
+ test programs.
+
+ * tests/Makefile.am
+ (TESTS_ENVIRONMENT): Set OPENVRML_NODE_PATH and
+ OPENVRML_SCRIPT_PATH.
+ (check-local): Reuse TESTS_ENVIRONMENT.
+
2009-06-22 Braden McDaniel <br...@en...>
* configure.ac: Check to see whether the pertinent precious
Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am 2009-06-23 03:40:35 UTC (rev 3928)
+++ trunk/tests/Makefile.am 2009-06-24 03:20:41 UTC (rev 3929)
@@ -5,7 +5,12 @@
AM_CXXFLAGS = $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(OPENVRML_RPATH)
-TESTS_ENVIRONMENT = BOOST_TEST_REPORT_LEVEL=no OPENVRML_DATADIR=$(abs_top_srcdir)/data
+TESTS_ENVIRONMENT = \
+ BOOST_TEST_REPORT_LEVEL=no \
+ OPENVRML_DATADIR=$(abs_top_srcdir)/data \
+ OPENVRML_NODE_PATH=$(abs_top_builddir)/src/node \
+ OPENVRML_SCRIPT_PATH=$(abs_top_builddir)/src/script
+
TESTS = color \
rotation \
mat4f \
@@ -122,7 +127,7 @@
TESTSUITE = $(srcdir)/testsuite
check-local: atconfig atlocal $(TESTSUITE)
- $(SHELL) $(TESTSUITE) OPENVRML_DATADIR=$(abs_top_srcdir)/data
+ $(SHELL) $(TESTSUITE) $(TESTS_ENVIRONMENT)
AUTOTEST = autom4te --language=autotest
$(TESTSUITE): $(srcdir)/package.m4 $(srcdir)/testsuite.at
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-23 03:40:40
|
Revision: 3928
http://openvrml.svn.sourceforge.net/openvrml/?rev=3928&view=rev
Author: braden
Date: 2009-06-23 03:40:35 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Check to see whether the pertinent precious variables have been set by the user before failing due to a missing dependency.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:32:50 UTC (rev 3927)
+++ trunk/ChangeLog 2009-06-23 03:40:35 UTC (rev 3928)
@@ -1,5 +1,11 @@
2009-06-22 Braden McDaniel <br...@en...>
+ * configure.ac: Check to see whether the pertinent precious
+ variables have been set by the user before failing due to a
+ missing dependency.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use Spirit Classic in the boost::spirit::classic namespace.
* tests/parse_x3dvrml.cpp
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-23 03:32:50 UTC (rev 3927)
+++ trunk/configure.ac 2009-06-23 03:40:35 UTC (rev 3928)
@@ -132,7 +132,9 @@
#
# The XmlTextReader interface appears in libxml 2.5.
#
-PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.5])
+PKG_CHECK_MODULES([XML], [libxml-2.0 >= 2.5], , [have_libxml=no])
+AS_IF([test X$have_libxml = Xno -a -z "$XML_LIBS"],
+ [AC_MSG_FAILURE([libxml not found])])
PKG_CHECK_MODULES([FONTCONFIG], [$REQUIRE_FONTCONFIG], , [have_fontconfig=no])
PKG_CHECK_MODULES([FREETYPE], [$REQUIRE_FREETYPE], , [have_freetype=no])
@@ -314,15 +316,15 @@
AC_ARG_ENABLE([render-text-node],
[AC_HELP_STRING([--disable-render-text-node],
[disable support for rendering Text nodes])])
-if test X$enable_render_text_node != Xno; then
- if test X$have_fontconfig = Xno -o X$have_freetype = Xno; then
- AC_MSG_FAILURE([fontconfig and FreeType are required for rendering Text nodes.])
- fi
- AC_DEFINE([OPENVRML_ENABLE_RENDER_TEXT_NODE], [1],
- [Defined if support for rendering Text nodes is enabled.])
- AC_DEFINE_UNQUOTED([OPENVRML_FT_CONST], [$ov_cv_ft_const],
- [const for FreeType callback function signatures.])
-fi
+AS_IF([test X$enable_render_text_node != Xno],
+ [AS_IF([test X$have_fontconfig = Xno -a -z "$FONTCONFIG_LIBS"],
+ [AC_MSG_FAILURE([fontconfig is required for rendering Text nodes])])
+ AS_IF([test X$have_freetype = Xno -a -z "$FREETYPE_LIBS"],
+ [AC_MSG_FAILURE([FreeType is required for rendering Text nodes])])
+ AC_DEFINE([OPENVRML_ENABLE_RENDER_TEXT_NODE], [1],
+ [Defined if support for rendering Text nodes is enabled.])
+ AC_DEFINE_UNQUOTED([OPENVRML_FT_CONST], [$ov_cv_ft_const],
+ [const for FreeType callback function signatures.])])
#
# Script node JavaScript support
@@ -334,13 +336,13 @@
AC_ARG_WITH([libjs],
[AC_HELP_STRING([--with-libjs],
[use libjs for JavaScript support])])
-AS_IF([test "X$enable_script_node_javascript" = "Xno"],
+AS_IF([test X$enable_script_node_javascript = Xno],
[JS_CFLAGS="" JS_LIBS=""],
[AS_IF([test X$with_libjs = Xyes -a X$have_libjs = Xyes],
[AS_IF([test -z "$JS_CFLAGS"], [JS_CFLAGS=""])
AS_IF([test -z "$JS_LIBS"], [JS_LIBS="-ljs"])])
-AS_IF([test X$have_libmozjs != Xyes -a \( X$with_libjs = Xyes -a X$have_libjs != Xyes \) -o X$have_jsapi_h != Xyes],
- [AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support.])])
+AS_IF([test \( \( X$have_libmozjs = Xno -o \( X$with_libjs = Xyes -a X$have_libjs = Xno \) \) -a -z "$JS_LIBS" \) -o X$have_jsapi_h != Xyes],
+ [AC_MSG_FAILURE([SpiderMonkey is required for Script node JavaScript support])])
AC_DEFINE([OPENVRML_ENABLE_SCRIPT_NODE_JAVASCRIPT], [1],
[Defined if Script node JavaScript support is enabled.])
#
@@ -424,9 +426,9 @@
[AC_HELP_STRING([--disable-xembed],
[do not build the XEmbed control])])
AS_IF([test X$enable_xembed != Xno],
- [AS_IF([test X$have_dbus_glib = Xno],
+ [AS_IF([test X$have_dbus_glib = Xno -a -z "$DBUS_G_LIBS"],
[AC_MSG_FAILURE([D-Bus GLib bindings are required to build the XEmbed control])])
- AS_IF([test X$have_gtkgl = Xno],
+ AS_IF([test X$have_gtkgl = Xno -a -z "$GTKGL_LIBS"],
[AC_MSG_FAILURE([GtkGLExt is required to build the XEmbed control])])
AS_IF([test X$enable_gl_renderer = Xno],
[AC_MSG_FAILURE([the XEmbed control cannot be built without the GL renderer])])])
@@ -441,11 +443,11 @@
AS_IF([test X$enable_player != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([OpenVRML Player cannot be built without the XEmbed control])])
- AS_IF([test X$have_gio = Xno],
+ AS_IF([test X$have_gio = Xno -a -z "$GIO_LIBS"],
[AC_MSG_FAILURE([GIO is required to build OpenVRML Player])])
- AS_IF([test X$have_gnomeui = Xno],
+ AS_IF([test X$have_gnomeui = Xno -a -z "$GNOMEUI_LIBS"],
[AC_MSG_FAILURE([libgnomeui is required to build OpenVRML Player])])
- AS_IF([test X$have_libcurl = Xno],
+ AS_IF([test X$have_libcurl = Xno -a -z "$CURL_LIBS"],
[AC_MSG_FAILURE([libcurl is required to build OpenVRML Player])])
])
AM_CONDITIONAL([ENABLE_PLAYER], [test X$enable_player != Xno])
@@ -459,9 +461,9 @@
AS_IF([test X$enable_mozilla_plugin != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([the Mozilla plug-in cannot be built without the XEmbed control])])
- AS_IF([test X$have_mozilla_plugin = Xno],
+ AS_IF([test X$have_mozilla_plugin = Xno -a -z "$MOZILLA_PLUGIN_CFLAGS"],
[AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])])
- AS_IF([test "X$have_dbus_glib" = "Xno"],
+ AS_IF([test X$have_dbus_glib = Xno -a -z "$DBUS_G_LIBS"],
[AC_MSG_FAILURE([The D-Bus GLib binding is required to build the Mozilla plug-in])])])
AM_CONDITIONAL([ENABLE_MOZILLA_PLUGIN],
[test "X$enable_mozilla_plugin" != "Xno" -a "X$have_dbus_glib" != "Xno"])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-23 03:33:11
|
Revision: 3927
http://openvrml.svn.sourceforge.net/openvrml/?rev=3927&view=rev
Author: braden
Date: 2009-06-23 03:32:50 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Use Spirit Classic in the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/examples/pretty_print.cpp
trunk/tests/parse_vrml97.cpp
trunk/tests/parse_x3dvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/ChangeLog 2009-06-23 03:32:50 UTC (rev 3927)
@@ -1,5 +1,13 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use Spirit Classic in the boost::spirit::classic namespace.
+
+ * tests/parse_x3dvrml.cpp
+ * tests/parse_vrml97.cpp
+ * examples/pretty_print.cpp
+
+2009-06-22 Braden McDaniel <br...@en...>
+
* tests/browser.cpp: Current Boost no longer provides
<boost/thread.hpp>.
Modified: trunk/examples/pretty_print.cpp
===================================================================
--- trunk/examples/pretty_print.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/examples/pretty_print.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -27,7 +27,7 @@
# include <fstream>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
class indent;
Modified: trunk/tests/parse_vrml97.cpp
===================================================================
--- trunk/tests/parse_vrml97.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/tests/parse_vrml97.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -21,7 +21,7 @@
# include <openvrml/vrml97_grammar.h>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
int main(int argc, char * argv[])
Modified: trunk/tests/parse_x3dvrml.cpp
===================================================================
--- trunk/tests/parse_x3dvrml.cpp 2009-06-23 03:30:22 UTC (rev 3926)
+++ trunk/tests/parse_x3dvrml.cpp 2009-06-23 03:32:50 UTC (rev 3927)
@@ -21,7 +21,7 @@
# include <openvrml/x3d_vrml_grammar.h>
using namespace std;
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
using namespace openvrml;
int main(int argc, char * argv[])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-23 03:30:25
|
Revision: 3926
http://openvrml.svn.sourceforge.net/openvrml/?rev=3926&view=rev
Author: braden
Date: 2009-06-23 03:30:22 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Current Boost no longer provides <boost/thread.hpp>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/tests/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 21:11:18 UTC (rev 3925)
+++ trunk/ChangeLog 2009-06-23 03:30:22 UTC (rev 3926)
@@ -1,5 +1,10 @@
2009-06-22 Braden McDaniel <br...@en...>
+ * tests/browser.cpp: Current Boost no longer provides
+ <boost/thread.hpp>.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use Spirit Classic in the boost::spirit::classic namespace.
* src/libopenvrml/openvrml/basetypes.cpp
Modified: trunk/tests/browser.cpp
===================================================================
--- trunk/tests/browser.cpp 2009-06-22 21:11:18 UTC (rev 3925)
+++ trunk/tests/browser.cpp 2009-06-23 03:30:22 UTC (rev 3926)
@@ -24,7 +24,7 @@
# include <sstream>
# include <boost/filesystem/operations.hpp>
# include <boost/multi_index/detail/scope_guard.hpp>
-# include <boost/thread.hpp>
+# include <boost/thread/condition.hpp>
# include <boost/test/unit_test.hpp>
# include "test_resource_fetcher.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-22 21:12:14
|
Revision: 3925
http://openvrml.svn.sourceforge.net/openvrml/?rev=3925&view=rev
Author: braden
Date: 2009-06-22 21:11:18 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use Spirit Classic in the boost::spirit::classic namespace.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/basetypes.cpp
trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp
trunk/src/libopenvrml/openvrml/local/uri.cpp
trunk/src/libopenvrml/openvrml/local/uri.h
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/vrml97_grammar.h
trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/ChangeLog 2009-06-22 21:11:18 UTC (rev 3925)
@@ -1,5 +1,17 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use Spirit Classic in the boost::spirit::classic namespace.
+
+ * src/libopenvrml/openvrml/basetypes.cpp
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/vrml97_grammar.h
+ * src/libopenvrml/openvrml/x3d_vrml_grammar.h
+ * src/libopenvrml/openvrml/local/parse_vrml.cpp
+ * src/libopenvrml/openvrml/local/uri.cpp
+ * src/libopenvrml/openvrml/local/uri.h
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use GIO instead of GnomeVFS in openvrml-player.
* configure.ac: Check for GIO.
Modified: trunk/src/libopenvrml/openvrml/basetypes.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/basetypes.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/basetypes.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -307,15 +307,15 @@
namespace {
typedef std::istream::char_type char_t;
- typedef boost::spirit::multi_pass<std::istreambuf_iterator<char_t> >
+ typedef boost::spirit::classic::multi_pass<std::istreambuf_iterator<char_t> >
iterator_t;
- typedef boost::spirit::skip_parser_iteration_policy<openvrml::vrml97_space_parser>
+ typedef boost::spirit::classic::skip_parser_iteration_policy<openvrml::vrml97_space_parser>
iter_policy_t;
- typedef boost::spirit::scanner_policies<iter_policy_t> scanner_policies_t;
- typedef boost::spirit::scanner<iterator_t, scanner_policies_t> scanner_t;
+ typedef boost::spirit::classic::scanner_policies<iter_policy_t> scanner_policies_t;
+ typedef boost::spirit::classic::scanner<iterator_t, scanner_policies_t> scanner_t;
- typedef boost::spirit::rule<scanner_t> rule_t;
+ typedef boost::spirit::classic::rule<scanner_t> rule_t;
}
/**
@@ -338,8 +338,8 @@
std::istream & openvrml::operator>>(std::istream & in, color & c)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -620,8 +620,8 @@
std::istream & openvrml::operator>>(std::istream & in, color_rgba & c)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -1036,8 +1036,8 @@
std::istream & openvrml::operator>>(std::istream & in, vec2f & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -1451,9 +1451,9 @@
std::istream & openvrml::operator>>(std::istream & in, vec2d & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::real_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::real_p;
using phoenix::arg1;
using phoenix::var;
@@ -1995,8 +1995,8 @@
std::istream & openvrml::operator>>(std::istream & in, vec3f & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -2538,9 +2538,9 @@
std::istream & openvrml::operator>>(std::istream & in, vec3d & v)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::real_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::real_p;
using phoenix::arg1;
using phoenix::var;
@@ -3058,14 +3058,14 @@
OPENVRML_LOCAL struct OPENVRML_LOCAL null_error_handler {
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(ScannerT, ErrorT) const
+ boost::spirit::classic::error_status<> operator()(ScannerT, ErrorT) const
{
- using boost::spirit::error_status;
+ using boost::spirit::classic::error_status;
return error_status<>(error_status<>::fail);
}
} error_handler;
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
openvrml::rotation_parser<null_error_handler> >
rotation_p(error_handler);
}
@@ -3090,10 +3090,10 @@
std::istream & openvrml::operator>>(std::istream & in, rotation & rot)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
@@ -3980,8 +3980,8 @@
std::istream & openvrml::operator>>(std::istream & in, mat4f & m)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::ch_p;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::ch_p;
using phoenix::arg1;
using phoenix::var;
@@ -4023,7 +4023,7 @@
>> !ch_p(']')[var(row4_bracket_count) -= 1]
;
- boost::spirit::match<> match = r.parse(scan);
+ boost::spirit::classic::match<> match = r.parse(scan);
if (!match || row1_bracket_count != 0 || row2_bracket_count != 0
|| row3_bracket_count != 0 || row4_bracket_count != 0) {
@@ -4581,8 +4581,8 @@
std::istream & openvrml::operator>>(std::istream & in, quatf & q)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
using phoenix::arg1;
using phoenix::var;
@@ -4993,10 +4993,10 @@
std::istream & openvrml::operator>>(std::istream & in, image & img)
{
using std::istreambuf_iterator;
- using boost::spirit::make_multi_pass;
- using boost::spirit::match;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::match;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/parse_vrml.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -47,13 +47,13 @@
{}
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(const ScannerT & scan,
+ boost::spirit::classic::error_status<> operator()(const ScannerT & scan,
const ErrorT & err) const
{
using std::endl;
using std::string;
- using boost::spirit::error_status;
- using boost::spirit::file_position;
+ using boost::spirit::classic::error_status;
+ using boost::spirit::classic::file_position;
const file_position fpos = err.where.get_position();
@@ -119,9 +119,9 @@
using std::istream;
using std::istreambuf_iterator;
using boost::algorithm::iequals;
- using boost::spirit::multi_pass;
- using boost::spirit::make_multi_pass;
- using boost::spirit::position_iterator;
+ using boost::spirit::classic::multi_pass;
+ using boost::spirit::classic::make_multi_pass;
+ using boost::spirit::classic::position_iterator;
typedef multi_pass<istreambuf_iterator<char> > multi_pass_iterator_t;
typedef istream::char_type char_t;
Modified: trunk/src/libopenvrml/openvrml/local/uri.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/uri.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/uri.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -70,7 +70,7 @@
fragment_end(this->str_.begin())
{
using std::string;
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
actions a(*this);
uri_grammar<actions> g(a);
Modified: trunk/src/libopenvrml/openvrml/local/uri.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/uri.h 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/local/uri.h 2009-06-22 21:11:18 UTC (rev 3925)
@@ -22,8 +22,8 @@
# define OPENVRML_LOCAL_URI_H
# include <openvrml/bad_url.h>
-# include <boost/spirit.hpp>
-# include <boost/spirit/phoenix.hpp>
+# include <boost/spirit/include/classic.hpp>
+# include <boost/spirit/include/phoenix1.hpp>
namespace openvrml {
@@ -88,7 +88,7 @@
struct OPENVRML_LOCAL uri_reserved_parser :
- public boost::spirit::char_parser<uri_reserved_parser> {
+ public boost::spirit::classic::char_parser<uri_reserved_parser> {
typedef uri_reserved_parser self_t;
@@ -112,7 +112,7 @@
struct OPENVRML_LOCAL uri_unreserved_parser :
- public boost::spirit::char_parser<uri_unreserved_parser> {
+ public boost::spirit::classic::char_parser<uri_unreserved_parser> {
typedef uri_unreserved_parser self_t;
@@ -137,24 +137,24 @@
struct OPENVRML_LOCAL uric_grammar :
- public boost::spirit::grammar<uric_grammar> {
+ public boost::spirit::classic::grammar<uric_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type uric, escaped;
definition(const uric_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
};
template <typename ScannerT>
uric_grammar::definition<ScannerT>::definition(const uric_grammar &)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
uric
= uri_reserved_p
@@ -168,7 +168,7 @@
}
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uric_grammar::definition<ScannerT>::start() const
{
return this->uric;
@@ -177,20 +177,20 @@
template <typename Actions = null_actions>
struct uri_authority_grammar :
- public boost::spirit::grammar<uri_authority_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_authority_grammar<Actions> > {
template <typename ScannerT>
struct definition {
struct server_closure :
- boost::spirit::closure<server_closure,
+ boost::spirit::classic::closure<server_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename server_closure::member1 userinfo_begin;
typename server_closure::member2 userinfo_end;
};
- typedef boost::spirit::rule<ScannerT> rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT,
typename server_closure::context_t>
server_rule_type;
@@ -209,7 +209,7 @@
explicit definition(const uri_authority_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -222,7 +222,7 @@
uri_authority_grammar<Actions>::definition<ScannerT>::
definition(const uri_authority_grammar & self)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
authority
@@ -308,7 +308,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_authority_grammar<Actions>::definition<ScannerT>::start() const
{
return this->authority;
@@ -322,11 +322,11 @@
template <typename Actions>
struct uri_abs_path_grammar :
- public boost::spirit::grammar<uri_abs_path_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_abs_path_grammar<Actions> > {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type abs_path;
rule_type path_segments;
@@ -338,7 +338,7 @@
explicit definition(const uri_abs_path_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -351,7 +351,7 @@
uri_abs_path_grammar<Actions>::definition<ScannerT>::
definition(const uri_abs_path_grammar & self)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
abs_path
@@ -389,7 +389,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_abs_path_grammar<Actions>::definition<ScannerT>::start() const
{
return this->abs_path;
@@ -404,12 +404,12 @@
template <typename Actions = null_actions>
struct absolute_uri_grammar :
- public boost::spirit::grammar<absolute_uri_grammar<Actions> > {
+ public boost::spirit::classic::grammar<absolute_uri_grammar<Actions> > {
template <typename ScannerT>
struct definition {
struct absolute_uri_closure :
- boost::spirit::closure<absolute_uri_closure,
+ boost::spirit::classic::closure<absolute_uri_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename absolute_uri_closure::member1 scheme_begin;
@@ -417,19 +417,19 @@
};
struct server_closure :
- boost::spirit::closure<server_closure,
+ boost::spirit::classic::closure<server_closure,
typename ScannerT::iterator_t,
typename ScannerT::iterator_t> {
typename server_closure::member1 userinfo_begin;
typename server_closure::member2 userinfo_end;
};
- typedef boost::spirit::rule<ScannerT> rule_type;
- typedef boost::spirit::rule<
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<
ScannerT,
typename absolute_uri_closure::context_t>
absolute_uri_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
typename server_closure::context_t>
server_rule_type;
@@ -461,7 +461,7 @@
abs_path(self.actions),
authority(self.actions)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
absolute_uri
@@ -523,11 +523,11 @@
template <typename Actions = null_actions>
struct uri_grammar :
- public boost::spirit::grammar<uri_grammar<Actions> > {
+ public boost::spirit::classic::grammar<uri_grammar<Actions> > {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type uri_reference;
absolute_uri_grammar<Actions> absolute_uri;
@@ -544,7 +544,7 @@
explicit definition(const uri_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
const Actions & actions;
@@ -566,7 +566,7 @@
abs_path(self.actions),
authority(self.actions)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
BOOST_SPIRIT_DEBUG_NODE(uri_reference);
@@ -624,7 +624,7 @@
template <typename Actions>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
uri_grammar<Actions>::definition<ScannerT>::start() const
{
return this->uri_reference;
Modified: trunk/src/libopenvrml/openvrml/node.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 21:11:18 UTC (rev 3925)
@@ -595,11 +595,11 @@
namespace {
struct OPENVRML_LOCAL node_metatype_id_grammar :
- public boost::spirit::grammar<node_metatype_id_grammar> {
+ public boost::spirit::classic::grammar<node_metatype_id_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
rule_type node_metatype_id;
openvrml::local::absolute_uri_grammar<> absolute_uri;
@@ -607,7 +607,7 @@
definition(const node_metatype_id_grammar & self);
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
};
@@ -621,7 +621,7 @@
}
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
node_metatype_id_grammar::definition<ScannerT>::start() const
{
return this->node_metatype_id;
@@ -643,7 +643,7 @@
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc):
id_(id)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
node_metatype_id_grammar g;
if (!parse(this->id_.begin(), this->id_.end(), g, space_p).full) {
@@ -667,7 +667,7 @@
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc):
id_(id)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
node_metatype_id_grammar g;
if (!parse(this->id_.begin(), this->id_.end(), g, space_p).full) {
Modified: trunk/src/libopenvrml/openvrml/vrml97_grammar.h
===================================================================
--- trunk/src/libopenvrml/openvrml/vrml97_grammar.h 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/vrml97_grammar.h 2009-06-22 21:11:18 UTC (rev 3925)
@@ -22,17 +22,17 @@
# define OPENVRML_VRML97_GRAMMAR_H
# include <openvrml/browser.h>
-# include <boost/spirit.hpp>
-# include <boost/spirit/actor.hpp>
-# include <boost/spirit/dynamic.hpp>
-# include <boost/spirit/phoenix.hpp>
+# include <boost/spirit/include/classic.hpp>
+# include <boost/spirit/include/classic_actor.hpp>
+# include <boost/spirit/include/classic_dynamic.hpp>
+# include <boost/spirit/include/phoenix1.hpp>
# include <boost/test/floating_point_comparison.hpp>
# include <stack>
namespace openvrml {
struct vrml97_space_parser :
- boost::spirit::char_parser<vrml97_space_parser> {
+ boost::spirit::classic::char_parser<vrml97_space_parser> {
typedef vrml97_space_parser self_t;
@@ -46,10 +46,11 @@
const vrml97_space_parser vrml97_space_p = vrml97_space_parser();
- struct vrml97_skip_grammar : boost::spirit::grammar<vrml97_skip_grammar> {
+ struct vrml97_skip_grammar :
+ boost::spirit::classic::grammar<vrml97_skip_grammar> {
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_t;
+ typedef boost::spirit::classic::rule<ScannerT> rule_t;
rule_t skip;
@@ -63,7 +64,7 @@
vrml97_skip_grammar::definition<ScannerT>::
definition(const vrml97_skip_grammar & /* self */)
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
BOOST_SPIRIT_DEBUG_NODE(skip);
@@ -135,7 +136,7 @@
struct get_mftype_parse_error;
template <>
- struct get_mftype_parse_error<boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> > > {
static const vrml_parse_error element_or_lbracket_value =
float_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -143,7 +144,7 @@
};
template <>
- struct get_mftype_parse_error<boost::spirit::real_parser<double, boost::spirit::real_parser_policies<double> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::real_parser<double, boost::spirit::classic::real_parser_policies<double> > > {
static const vrml_parse_error element_or_lbracket_value =
float_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -203,7 +204,7 @@
return msg[error];
}
- typedef boost::spirit::assertion<vrml_parse_error> vrml_parse_assertion;
+ typedef boost::spirit::classic::assertion<vrml_parse_error> vrml_parse_assertion;
const vrml_parse_assertion expect_dot(dot_expected);
const vrml_parse_assertion expect_lbrace(lbrace_expected);
@@ -247,12 +248,12 @@
{}
template <typename ScannerT, typename ErrorT>
- boost::spirit::error_status<> operator()(const ScannerT & scan,
+ boost::spirit::classic::error_status<> operator()(const ScannerT & scan,
const ErrorT & err) const
{
using std::endl;
- using boost::spirit::error_status;
- using boost::spirit::file_position;
+ using boost::spirit::classic::error_status;
+ using boost::spirit::classic::file_position;
const file_position fpos = err.where.get_position();
if (err.descriptor == rotation_axis_not_normalized) {
@@ -276,9 +277,9 @@
};
- const boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> >
+ const boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> >
float_p =
- boost::spirit::real_parser<float, boost::spirit::real_parser_policies<float> >();
+ boost::spirit::classic::real_parser<float, boost::spirit::classic::real_parser_policies<float> >();
struct bool_parser {
@@ -288,7 +289,7 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
typedef typename match_result<ScannerT, result_t>::type match_t;
match_t match
@@ -299,7 +300,7 @@
}
};
- const boost::spirit::functor_parser<bool_parser> bool_p;
+ const boost::spirit::classic::functor_parser<bool_parser> bool_p;
struct int32_parser {
@@ -309,7 +310,7 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
typedef typename match_result<ScannerT, result_t>::type match_t;
match_t match
@@ -323,10 +324,10 @@
}
};
- const boost::spirit::functor_parser<int32_parser> int32_p;
+ const boost::spirit::classic::functor_parser<int32_parser> int32_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<int32_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<int32_parser> > {
static const vrml_parse_error element_or_lbracket_value =
int32_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -356,12 +357,12 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::eps_p;
- using boost::spirit::match_result;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
typedef typename match_result<ScannerT, result_t>::type match_t;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
rule_t rule
= float_p[var(result) = arg1] >> eps_p(valid(result))
@@ -371,7 +372,7 @@
}
};
- const boost::spirit::functor_parser<intensity_parser> intensity_p;
+ const boost::spirit::classic::functor_parser<intensity_parser> intensity_p;
struct color_parser {
@@ -382,10 +383,10 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
rule_t rule
@@ -398,10 +399,10 @@
}
};
- const boost::spirit::functor_parser<color_parser> color_p;
+ const boost::spirit::classic::functor_parser<color_parser> color_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<color_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<color_parser> > {
static const vrml_parse_error element_or_lbracket_value =
color_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -444,12 +445,12 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
- using boost::spirit::eps_p;
- using boost::spirit::guard;
+ using boost::spirit::classic::match_result;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::guard;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
guard<vrml_parse_error> g;
rule_t rule
@@ -475,7 +476,7 @@
};
template <typename RotationNotNormalizedHandler>
- struct get_mftype_parse_error<boost::spirit::functor_parser<rotation_parser<RotationNotNormalizedHandler> > > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<rotation_parser<RotationNotNormalizedHandler> > > {
static const vrml_parse_error element_or_lbracket_value =
rotation_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -491,10 +492,10 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
rule_t rule
= float_p[var(result.vec[0]) = arg1]
@@ -505,10 +506,10 @@
}
};
- const boost::spirit::functor_parser<vec2f_parser> vec2f_p;
+ const boost::spirit::classic::functor_parser<vec2f_parser> vec2f_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<vec2f_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<vec2f_parser> > {
static const vrml_parse_error element_or_lbracket_value =
vec2_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -524,10 +525,10 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::match_result;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
rule_t rule
= float_p[var(result.vec[0]) = arg1]
@@ -539,10 +540,10 @@
}
};
- const boost::spirit::functor_parser<vec3f_parser> vec3f_p;
+ const boost::spirit::classic::functor_parser<vec3f_parser> vec3f_p;
template <>
- struct get_mftype_parse_error<boost::spirit::functor_parser<vec3f_parser> > {
+ struct get_mftype_parse_error<boost::spirit::classic::functor_parser<vec3f_parser> > {
static const vrml_parse_error element_or_lbracket_value =
vec3_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -597,13 +598,13 @@
result_t & result) const
{
using boost::ref;
- using boost::spirit::repeat_p;
- using boost::spirit::eps_p;
+ using boost::spirit::classic::repeat_p;
+ using boost::spirit::classic::eps_p;
using phoenix::arg1;
using phoenix::var;
- using boost::spirit::match_result;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ using boost::spirit::classic::match_result;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
size_t x = 0, y = 0, comp = 0, pixels = 0, index = 0;
@@ -626,7 +627,7 @@
}
};
- const boost::spirit::functor_parser<image_parser> image_p;
+ const boost::spirit::classic::functor_parser<image_parser> image_p;
struct get_string_content_function {
@@ -653,15 +654,15 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::chlit;
- using boost::spirit::strlit;
- using boost::spirit::anychar_p;
- using boost::spirit::lexeme_d;
- using boost::spirit::match_result;
+ using boost::spirit::classic::chlit;
+ using boost::spirit::classic::strlit;
+ using boost::spirit::classic::anychar_p;
+ using boost::spirit::classic::lexeme_d;
+ using boost::spirit::classic::match_result;
using phoenix::arg1;
using phoenix::arg2;
using phoenix::var;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type match_t;
std::string str;
@@ -678,11 +679,11 @@
}
};
- const boost::spirit::functor_parser<string_parser> string_p;
+ const boost::spirit::classic::functor_parser<string_parser> string_p;
template <>
struct get_mftype_parse_error<
- boost::spirit::functor_parser<string_parser> > {
+ boost::spirit::classic::functor_parser<string_parser> > {
static const vrml_parse_error element_or_lbracket_value =
string_or_lbracket_expected;
static const vrml_parse_error element_or_rbracket_value =
@@ -758,24 +759,24 @@
return scope_stack.top().proto_node_type;
}
- struct sfnode_closure : boost::spirit::closure<sfnode_closure,
+ struct sfnode_closure : boost::spirit::classic::closure<sfnode_closure,
bool> {
member1 null;
};
struct interface_type_closure :
- boost::spirit::closure<interface_type_closure,
+ boost::spirit::classic::closure<interface_type_closure,
node_interface::type_id> {
member1 type;
};
- struct field_type_closure : boost::spirit::closure<field_type_closure,
+ struct field_type_closure : boost::spirit::classic::closure<field_type_closure,
field_value::type_id> {
member1 type;
};
struct interface_decl_closure :
- boost::spirit::closure<interface_decl_closure,
+ boost::spirit::classic::closure<interface_decl_closure,
node_interface> {
member1 interface_;
};
@@ -829,14 +830,14 @@
const phoenix::function<set_node_interface_id_function>
set_node_interface_id;
- struct proto_closure : boost::spirit::closure<proto_closure,
+ struct proto_closure : boost::spirit::classic::closure<proto_closure,
node_type_decl,
bool> {
member1 node_type;
member2 add_node_interface_succeeded;
};
- struct is_mapping_closure : boost::spirit::closure<is_mapping_closure,
+ struct is_mapping_closure : boost::spirit::classic::closure<is_mapping_closure,
node_interface,
node_interface_set,
node_interface> {
@@ -846,7 +847,7 @@
};
struct externproto_closure :
- boost::spirit::closure<externproto_closure,
+ boost::spirit::classic::closure<externproto_closure,
node_type_decl,
std::vector<std::string>,
bool> {
@@ -856,7 +857,7 @@
};
struct script_interface_closure :
- boost::spirit::closure<script_interface_closure,
+ boost::spirit::classic::closure<script_interface_closure,
node_interface,
bool> {
member1 interface_;
@@ -929,7 +930,7 @@
struct root_node_statement_closure :
- boost::spirit::closure<root_node_statement_closure,
+ boost::spirit::classic::closure<root_node_statement_closure,
std::string,
node_type_decls::value_type *> {
member1 node_name_id;
@@ -946,7 +947,7 @@
void operator()(const IteratorT & first, IteratorT) const
{
if (!this->succeeded_) {
- boost::spirit::throw_(first, interface_collision);
+ boost::spirit::classic::throw_(first, interface_collision);
}
}
@@ -995,7 +996,7 @@
struct route_statement_closure :
- boost::spirit::closure<route_statement_closure,
+ boost::spirit::classic::closure<route_statement_closure,
const defs_t::value_type *,
const node_interface *,
const defs_t::value_type *,
@@ -1259,58 +1260,58 @@
template <typename Actions = null_vrml97_parse_actions,
typename ErrorHandler = vrml97_parse_error_handler>
struct vrml97_grammar :
- boost::spirit::grammar<vrml97_grammar<Actions, ErrorHandler> > {
+ boost::spirit::classic::grammar<vrml97_grammar<Actions, ErrorHandler> > {
- const boost::spirit::functor_parser<rotation_parser<ErrorHandler> >
+ const boost::spirit::classic::functor_parser<rotation_parser<ErrorHandler> >
rotation_p;
template <typename ScannerT>
struct definition {
- typedef boost::spirit::rule<ScannerT> rule_type;
+ typedef boost::spirit::classic::rule<ScannerT> rule_type;
- typedef boost::spirit::rule<ScannerT, sfnode_closure::context_t>
+ typedef boost::spirit::classic::rule<ScannerT, sfnode_closure::context_t>
sfnode_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
interface_type_closure::context_t>
interface_type_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
field_type_closure::context_t>
field_type_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
interface_decl_closure::context_t>
interface_decl_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
script_interface_closure::context_t>
script_interface_rule_type;
- typedef boost::spirit::rule<ScannerT, proto_closure::context_t>
+ typedef boost::spirit::classic::rule<ScannerT, proto_closure::context_t>
proto_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
interface_decl_closure::context_t>
proto_interface_rule_type;
- typedef boost::spirit::rule<ScannerT, is_mapping_closure::context_t>
+ typedef boost::spirit::classic::rule<ScannerT, is_mapping_closure::context_t>
is_mapping_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
externproto_closure::context_t>
externproto_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
root_node_statement_closure::context_t>
root_node_statement_rule_type;
- typedef boost::spirit::rule<ScannerT,
+ typedef boost::spirit::classic::rule<ScannerT,
route_statement_closure::context_t>
route_statement_rule_type;
- typedef boost::spirit::stored_rule<ScannerT> field_value_rule_type;
+ typedef boost::spirit::classic::stored_rule<ScannerT> field_value_rule_type;
template <typename ElementParser>
@@ -1326,10 +1327,10 @@
std::ptrdiff_t operator()(const MFTypeParserScannerT & scan,
result_t & result) const
{
- using boost::spirit::ch_p;
- using boost::spirit::push_back_a;
- using boost::spirit::match_result;
- typedef typename boost::spirit::rule<MFTypeParserScannerT>
+ using boost::spirit::classic::ch_p;
+ using boost::spirit::classic::push_back_a;
+ using boost::spirit::classic::match_result;
+ typedef typename boost::spirit::classic::rule<MFTypeParserScannerT>
rule_t;
typedef typename match_result<MFTypeParserScannerT,
result_t>::type
@@ -1355,54 +1356,54 @@
const ElementParser & parser_;
};
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<openvrml::color_parser> > >
+ boost::spirit::classic::functor_parser<openvrml::color_parser> > >
mfcolor_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
float,
- boost::spirit::real_parser_policies<float> > > >
+ boost::spirit::classic::real_parser_policies<float> > > >
mffloat_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<openvrml::int32_parser> > >
+ boost::spirit::classic::functor_parser<openvrml::int32_parser> > >
mfint32_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<openvrml::string_parser> > >
+ boost::spirit::classic::functor_parser<openvrml::string_parser> > >
mfstring_p;
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<
+ boost::spirit::classic::functor_parser<
openvrml::rotation_parser<ErrorHandler> > > >
mfrotation_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
double,
- boost::spirit::real_parser_policies<double> > > >
+ boost::spirit::classic::real_parser_policies<double> > > >
mftime_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<openvrml::vec2f_parser> > >
+ boost::spirit::classic::functor_parser<openvrml::vec2f_parser> > >
mfvec2f_p;
- static const boost::spirit::functor_parser<
+ static const boost::spirit::classic::functor_parser<
mftype_parser<
- boost::spirit::functor_parser<openvrml::vec3f_parser> > >
+ boost::spirit::classic::functor_parser<openvrml::vec3f_parser> > >
mfvec3f_p;
struct mfnode_parser {
- typedef boost::spirit::nil_t result_t;
+ typedef boost::spirit::classic::nil_t result_t;
explicit mfnode_parser(const rule_type & node_statement):
node_statement_(node_statement)
@@ -1411,9 +1412,9 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t &) const
{
- using boost::spirit::ch_p;
- using boost::spirit::match_result;
- typedef typename boost::spirit::rule<ScannerT> rule_t;
+ using boost::spirit::classic::ch_p;
+ using boost::spirit::classic::match_result;
+ typedef typename boost::spirit::classic::rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type
match_t;
@@ -1435,15 +1436,15 @@
const rule_type & node_statement_;
};
- const boost::spirit::functor_parser<mfnode_parser> mfnode_p;
+ const boost::spirit::classic::functor_parser<mfnode_parser> mfnode_p;
scope_stack_t scope_stack;
- virtual const boost::spirit::stored_rule<ScannerT>
+ virtual const boost::spirit::classic::stored_rule<ScannerT>
get_field_value_parser(const field_value::type_id field_type) const
{
- boost::spirit::stored_rule<ScannerT> r;
+ boost::spirit::classic::stored_rule<ScannerT> r;
switch (field_type) {
case field_value::sfbool_id:
r = expect_bool(bool_p)[this->self.actions.on_sfbool];
@@ -1472,7 +1473,7 @@
r = expect_string(string_p)[this->self.actions.on_sfstring];
break;
case field_value::sftime_id:
- r = expect_float(boost::spirit::real_p)[
+ r = expect_float(boost::spirit::classic::real_p)[
this->self.actions.on_sftime
];
break;
@@ -1541,7 +1542,7 @@
d.field_value =
(interface_.type == node_interface::eventin_id
|| interface_.type == node_interface::eventout_id)
- ? boost::spirit::eps_p
+ ? boost::spirit::classic::eps_p
: d.get_field_value_parser(interface_.field_type);
if (in_proto_def(d.scope_stack)) {
@@ -1600,10 +1601,10 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::assertion;
- using boost::spirit::eps_p;
- using boost::spirit::rule;
- using boost::spirit::match_result;
+ using boost::spirit::classic::assertion;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::rule;
+ using boost::spirit::classic::match_result;
typedef rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type
match_t;
@@ -1627,7 +1628,7 @@
rule_type & id_;
};
- const boost::spirit::functor_parser<node_name_id_parser>
+ const boost::spirit::classic::functor_parser<node_name_id_parser>
node_name_id_p;
@@ -1688,9 +1689,9 @@
std::ptrdiff_t operator()(const ScannerT & scan,
result_t & result) const
{
- using boost::spirit::eps_p;
- using boost::spirit::rule;
- using boost::spirit::match_result;
+ using boost::spirit::classic::eps_p;
+ using boost::spirit::classic::rule;
+ using boost::spirit::classic::match_result;
typedef rule<ScannerT> rule_t;
typedef typename match_result<ScannerT, result_t>::type
match_t;
@@ -1710,7 +1711,7 @@
rule_type & id_;
};
- const boost::spirit::functor_parser<node_type_id_parser>
+ const boost::spirit::classic::functor_parser<node_type_id_parser>
node_type_id_p;
@@ -1725,7 +1726,7 @@
void operator()(const node_interface & interface_) const
{
- using boost::spirit::eps_p;
+ using boost::spirit::classic::eps_p;
vrml97_grammar_def_t & d = this->vrml97_grammar_def_;
@@ -1794,7 +1795,7 @@
void operator()(const IteratorT & first,
const IteratorT & last) const
{
- using boost::spirit::throw_;
+ using boost::spirit::classic::throw_;
vrml97_grammar_def_t & d = this->vrml97_grammar_def_;
@@ -2347,7 +2348,7 @@
std::string node_type_id;
bool node_type_already_exists;
- boost::spirit::symbols<typename ScannerT::value_t> keywords;
+ boost::spirit::classic::symbols<typename ScannerT::value_t> keywords;
rule_type vrml_scene;
rule_type statement;
@@ -2376,13 +2377,13 @@
rule_type exposedfield;
rule_type field;
- typedef boost::spirit::chset<typename ScannerT::value_t> chset;
+ typedef boost::spirit::classic::chset<typename ScannerT::value_t> chset;
chset invalid_id_rest_char, invalid_id_first_char;
explicit definition(const vrml97_grammar & self);
virtual ~definition() {}
- const boost::spirit::rule<ScannerT> & start() const;
+ const boost::spirit::classic::rule<ScannerT> & start() const;
};
explicit vrml97_grammar(
@@ -2399,87 +2400,87 @@
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<openvrml::color_parser> > >
+ template mftype_parser<boost::spirit::classic::functor_parser<openvrml::color_parser> > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfcolor_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<
- boost::spirit::functor_parser<openvrml::color_parser>
+ boost::spirit::classic::functor_parser<openvrml::color_parser>
>(color_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
float,
- boost::spirit::real_parser_policies<float> > > >
+ boost::spirit::classic::real_parser_policies<float> > > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mffloat_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
float,
- boost::spirit::real_parser_policies<float>
+ boost::spirit::classic::real_parser_policies<float>
>
>(float_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
double,
- boost::spirit::real_parser_policies<double> > > >
+ boost::spirit::classic::real_parser_policies<double> > > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mftime_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
template mftype_parser<
- boost::spirit::real_parser<
+ boost::spirit::classic::real_parser<
double,
- boost::spirit::real_parser_policies<double>
+ boost::spirit::classic::real_parser_policies<double>
>
- >(boost::spirit::real_p);
+ >(boost::spirit::classic::real_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<int32_parser> > >
+ template mftype_parser<boost::spirit::classic::functor_parser<int32_parser> > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfint32_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser< boost::spirit::functor_parser<int32_parser> >(
+ template mftype_parser< boost::spirit::classic::functor_parser<int32_parser> >(
int32_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<string_parser> > >
+ template mftype_parser<boost::spirit::classic::functor_parser<string_parser> > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfstring_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<string_parser> >(
+ template mftype_parser<boost::spirit::classic::functor_parser<string_parser> >(
string_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<vec2f_parser> > >
+ template mftype_parser<boost::spirit::classic::functor_parser<vec2f_parser> > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfvec2f_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<vec2f_parser> >(
+ template mftype_parser<boost::spirit::classic::functor_parser<vec2f_parser> >(
vec2f_p);
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::functor_parser<
+ const boost::spirit::classic::functor_parser<
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<vec3f_parser> > >
+ template mftype_parser<boost::spirit::classic::functor_parser<vec3f_parser> > >
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::mfvec3f_p =
typename vrml97_grammar<Actions, ErrorHandler>::template definition<ScannerT>::
- template mftype_parser<boost::spirit::functor_parser<vec3f_parser> >(
+ template mftype_parser<boost::spirit::classic::functor_parser<vec3f_parser> >(
vec3f_p);
template <typename Actions, typename ErrorHandler>
@@ -2488,7 +2489,7 @@
definition(const vrml97_grammar & self):
mfrotation_p(
mftype_parser<
- boost::spirit::functor_parser<
+ boost::spirit::classic::functor_parser<
openvrml::rotation_parser<ErrorHandler>
>
>(self.rotation_p)),
@@ -2518,11 +2519,11 @@
self(self),
node_type_already_exists(false),
invalid_id_rest_char("\x01-\x20\x22\x23\x27,.[\\]{}\x7f"),
- invalid_id_first_char(boost::spirit::chset_p("1234567890+-")
+ invalid_id_first_char(boost::spirit::classic::chset_p("1234567890+-")
| invalid_id_rest_char)
{
using std::string;
- using namespace boost::spirit;
+ using namespace boost::spirit::classic;
using namespace phoenix;
BOOST_SPIRIT_DEBUG_NODE(vrml_scene);
BOOST_SPIRIT_DEBUG_NODE(statement);
@@ -2873,7 +2874,7 @@
template <typename Actions, typename ErrorHandler>
template <typename ScannerT>
- const boost::spirit::rule<ScannerT> &
+ const boost::spirit::classic::rule<ScannerT> &
vrml97_grammar<Actions, ErrorHandler>::definition<ScannerT>::start() const
{
return this->vrml_scene;
Modified: trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h
===================================================================
--- trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2009-06-22 08:28:39 UTC (rev 3924)
+++ trunk/src/libopenvrml/openvrml/x3d_vrml_grammar.h 2009-06-22 21:11:18 UTC (rev 3925)
@@ -88,12 +88,12 @@
{}
template <typename ScannerT, typename Erro...
[truncated message content] |
|
From: <br...@us...> - 2009-06-22 08:28:41
|
Revision: 3924
http://openvrml.svn.sourceforge.net/openvrml/?rev=3924&view=rev
Author: braden
Date: 2009-06-22 08:28:39 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use GIO instead of GnomeVFS in openvrml-player.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/openvrml-player/curlbrowserhost.cpp
trunk/src/openvrml-player/player.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/ChangeLog 2009-06-22 08:28:39 UTC (rev 3924)
@@ -1,5 +1,19 @@
2009-06-22 Braden McDaniel <br...@en...>
+ Use GIO instead of GnomeVFS in openvrml-player.
+
+ * configure.ac: Check for GIO.
+ * src/Makefile.am
+ (openvrml_player_openvrml_player_CXXFLAGS): Pass GIO_CFLAGS.
+ (openvrml_player_openvrml_player_LDFLAGS): Pass GIO_LIBS.
+ * src/openvrml-player/curlbrowserhost.cpp
+ (openvrml_player_curl_browser_host_curl_write(void *, size_t,
+ size_t, void *)): Use GIO to get the MIME media type.
+ * src/openvrml-player/player.cpp
+ (main(int, char *[])): Don't need to initialize GnomeVFS anymore.
+
+2009-06-22 Braden McDaniel <br...@en...>
+
Use boost::shared_mutex instead of openvrml::read_write_mutex.
* src/Makefile.am
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/configure.ac 2009-06-22 08:28:39 UTC (rev 3924)
@@ -188,18 +188,19 @@
AC_ARG_VAR([DBUS_BINDING_TOOL], [Generate stub code for dbus-glib])
AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
-#
-# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
-#
PKG_CHECK_MODULES([GTKGL],
- [gtkglext-1.0 gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
+ [gtkglext-1.0 gthread-2.0], ,
[have_gtkgl=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
#
-PKG_CHECK_MODULES([GNOMEUI], [libgnomeui-2.0 libgnome-2.0 >= 2.14], ,
+# openvrml-player uses GtkBuilder, which was introduced in GTK+ 2.12.
+#
+PKG_CHECK_MODULES([GNOMEUI],
+ [libgnomeui-2.0 libgnome-2.0 >= 2.14 gtk+-2.0 >= 2.12], ,
[have_gnomeui=no])
+PKG_CHECK_MODULES([GIO], [gio-2.0], , [have_gio=no])
PKG_CHECK_MODULES([CURL], [libcurl], , [have_libcurl=no])
#
# The Mozilla plug-in uses the npfunctions.h header introduced in
@@ -440,8 +441,8 @@
AS_IF([test X$enable_player != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([OpenVRML Player cannot be built without the XEmbed control])])
- AS_IF([test X$have_libglade = Xno],
- [AC_MSG_FAILURE([libglade is required to build OpenVRML Player])])
+ AS_IF([test X$have_gio = Xno],
+ [AC_MSG_FAILURE([GIO is required to build OpenVRML Player])])
AS_IF([test X$have_gnomeui = Xno],
[AC_MSG_FAILURE([libgnomeui is required to build OpenVRML Player])])
AS_IF([test X$have_libcurl = Xno],
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/Makefile.am 2009-06-22 08:28:39 UTC (rev 3924)
@@ -820,12 +820,14 @@
-Ilibopenvrml \
-I$(srcdir)/libopenvrml
openvrml_player_openvrml_player_CXXFLAGS = \
+ $(GNOMEUI_CFLAGS) \
+ $(GIO_CFLAGS) \
$(DBUS_G_CFLAGS) \
- $(GNOMEUI_CFLAGS) \
$(CURL_CFLAGS)
openvrml_player_openvrml_player_LDFLAGS = \
-export-dynamic \
$(GNOMEUI_LIBS) \
+ $(GIO_LIBS) \
$(DBUS_G_LIBS) \
$(CURL_LIBS)
Modified: trunk/src/openvrml-player/curlbrowserhost.cpp
===================================================================
--- trunk/src/openvrml-player/curlbrowserhost.cpp 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/openvrml-player/curlbrowserhost.cpp 2009-06-22 08:28:39 UTC (rev 3924)
@@ -19,7 +19,7 @@
# include "curlbrowserhost.h"
# include <curl/curl.h>
-# include <libgnomevfs/gnome-vfs.h>
+# include <gio/gio.h>
# include <browser-host-server-glue.h>
# include <browser-factory-client-glue.h>
# include <browser-client-glue.h>
@@ -788,25 +788,35 @@
&type);
CURL_BROWSER_HOST_CURL_EASY_RETURN_VAL_IF_ERROR(getinfo_result, 0);
- GnomeVFSFileInfo * info = 0;
- scope_guard info_guard = make_guard(gnome_vfs_file_info_unref,
- ref(info));
+ GError * error = 0;
+ GFile * file = 0;
+ scope_guard file_guard = make_guard(g_object_unref, ref(file));
+ GFileInfo * info = 0;
+ scope_guard info_guard = make_guard(g_object_unref, ref(info));
if (!type) {
- info = gnome_vfs_file_info_new();
- GnomeVFSResult get_file_info_result =
- gnome_vfs_get_file_info(stream_data.url(),
- info,
- GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
- if (get_file_info_result != GNOME_VFS_OK) {
- g_critical("%s",
- gnome_vfs_result_to_string(get_file_info_result));
+ file = g_file_new_for_uri(stream_data.url());
+ static GCancellable * const cancellable = 0;
+ info = g_file_query_info(file,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_QUERY_INFO_NONE,
+ cancellable,
+ &error);
+ if (error) {
+ g_warning(error->message);
+ g_error_free(error);
+ error = 0;
}
- type = gnome_vfs_file_info_get_mime_type(info);
+ if (info) {
+ type =
+ g_file_info_get_attribute_string(
+ info,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
+ }
} else {
info_guard.dismiss();
+ file_guard.dismiss();
}
- GError * error = 0;
scope_guard error_guard = make_guard(g_error_free, boost::ref(error));
gboolean new_stream_result =
org_openvrml_Browser_new_stream(
Modified: trunk/src/openvrml-player/player.cpp
===================================================================
--- trunk/src/openvrml-player/player.cpp 2009-06-22 06:24:57 UTC (rev 3923)
+++ trunk/src/openvrml-player/player.cpp 2009-06-22 08:28:39 UTC (rev 3924)
@@ -24,7 +24,6 @@
# include <boost/multi_index/detail/scope_guard.hpp>
# include <boost/ref.hpp>
# include <dbus/dbus-glib.h>
-# include <libgnomevfs/gnome-vfs.h>
# include <libgnomeui/libgnomeui.h>
# include <gtk/gtkbuilder.h>
# include <openvrml-config.h>
@@ -84,11 +83,6 @@
g_set_application_name(app_name);
- if (!gnome_vfs_init()) {
- g_critical("GnomeVFS initialization failed");
- return EXIT_FAILURE;
- }
-
if (curl_global_init(CURL_GLOBAL_ALL) != 0) {
g_critical("libcurl initialization failed");
return EXIT_FAILURE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-22 06:25:01
|
Revision: 3923
http://openvrml.svn.sourceforge.net/openvrml/?rev=3923&view=rev
Author: braden
Date: 2009-06-22 06:24:57 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Use boost::shared_mutex instead of openvrml::read_write_mutex.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/libopenvrml/openvrml/browser.cpp
trunk/src/libopenvrml/openvrml/browser.h
trunk/src/libopenvrml/openvrml/event.cpp
trunk/src/libopenvrml/openvrml/event.h
trunk/src/libopenvrml/openvrml/field_value.cpp
trunk/src/libopenvrml/openvrml/field_value.h
trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp
trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.h
trunk/src/libopenvrml/openvrml/node.cpp
trunk/src/libopenvrml/openvrml/node.h
trunk/src/libopenvrml/openvrml/scene.cpp
trunk/src/libopenvrml/openvrml/scene.h
trunk/src/libopenvrml-control/openvrml_control/browser.cpp
trunk/src/libopenvrml-control/openvrml_control/browser.h
trunk/src/node/vrml97/image_stream_listener.cpp
trunk/src/node/vrml97/image_stream_listener.h
trunk/src/node/vrml97/image_texture.cpp
Removed Paths:
-------------
trunk/src/libopenvrml/openvrml/read_write_mutex.cpp
trunk/src/libopenvrml/openvrml/read_write_mutex.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/ChangeLog 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1,3 +1,30 @@
+2009-06-22 Braden McDaniel <br...@en...>
+
+ Use boost::shared_mutex instead of openvrml::read_write_mutex.
+
+ * src/Makefile.am
+ (openvrml_include_HEADERS): Removed read_write_mutex.h.
+ (libopenvrml_libopenvrml_la_SOURCES): Removed read_write_mutex.cpp.
+ * src/libopenvrml/openvrml/browser.cpp
+ * src/libopenvrml/openvrml/browser.h
+ * src/libopenvrml/openvrml/event.cpp
+ * src/libopenvrml/openvrml/event.h
+ * src/libopenvrml/openvrml/field_value.cpp
+ * src/libopenvrml/openvrml/field_value.h
+ * src/libopenvrml/openvrml/node.cpp
+ * src/libopenvrml/openvrml/node.h
+ * src/libopenvrml/openvrml/read_write_mutex.cpp: Removed.
+ * src/libopenvrml/openvrml/read_write_mutex.h: Removed.
+ * src/libopenvrml/openvrml/scene.cpp
+ * src/libopenvrml/openvrml/scene.h
+ * src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp
+ * src/libopenvrml/openvrml/local/node_metatype_registry_impl.h
+ * src/libopenvrml-control/openvrml_control/browser.cpp
+ * src/libopenvrml-control/openvrml_control/browser.h
+ * src/node/vrml97/image_stream_listener.cpp
+ * src/node/vrml97/image_stream_listener.h
+ * src/node/vrml97/image_texture.cpp
+
2009-06-21 Braden McDaniel <br...@en...>
The Web browser still wants the plug-in to have the NPN_* entry
@@ -16,7 +43,7 @@
(NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
Replaced.
(NPN_Write(NPP, NPStream *, int32, void *)): Replaced.
- (NPN_DestryStream(NPP, NPStream *, NPError)): Replaced.
+ (NPN_DestroyStream(NPP, NPStream *, NPError)): Replaced.
(NPN_Status(NPP, const char *)): Replaced.
(NPN_UserAgent(NPP)): Replaced.
(NPN_MemAlloc(uint32)): Replaced.
@@ -85,7 +112,7 @@
(NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
Removed.
(NPN_Write(NPP, NPStream *, int32, void *)): Removed.
- (NPN_DestryStream(NPP, NPStream *, NPError)): Removed.
+ (NPN_DestroyStream(NPP, NPStream *, NPError)): Removed.
(NPN_Status(NPP, const char *)): Removed.
(NPN_UserAgent(NPP)): Removed.
(NPN_MemAlloc(uint32)): Removed.
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/Makefile.am 2009-06-22 06:24:57 UTC (rev 3923)
@@ -23,7 +23,6 @@
libopenvrml/openvrml/basetypes.h \
libopenvrml/openvrml/vrml97_grammar.h \
libopenvrml/openvrml/x3d_vrml_grammar.h \
- libopenvrml/openvrml/read_write_mutex.h \
libopenvrml/openvrml/field_value.h \
libopenvrml/openvrml/event.h \
libopenvrml/openvrml/exposedfield.h \
@@ -81,7 +80,6 @@
libopenvrml/openvrml/bad_url.cpp \
libopenvrml/openvrml/vrml97_grammar.cpp \
libopenvrml/openvrml/x3d_vrml_grammar.cpp \
- libopenvrml/openvrml/read_write_mutex.cpp \
libopenvrml/openvrml/basetypes.cpp \
libopenvrml/openvrml/field_value.cpp \
libopenvrml/openvrml/event.cpp \
Modified: trunk/src/libopenvrml/openvrml/browser.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/browser.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1107,7 +1107,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::load_root_scene_thread_mutex_
+ * @var boost::shared_mutex openvrml::browser::load_root_scene_thread_mutex_
*
* @brief Mutex protecting @c #load_root_scene_thread_.
*/
@@ -1153,7 +1153,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scene_mutex_
+ * @var boost::shared_mutex openvrml::browser::scene_mutex_
*
* @brief Mutex protecting @c #scene_.
*/
@@ -1178,7 +1178,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::active_viewpoint_mutex_
+ * @var boost::shared_mutex openvrml::browser::active_viewpoint_mutex_
*
* @brief Mutex protecting @c #active_viewpoint_.
*/
@@ -1203,7 +1203,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::active_navigation_info_mutex_
+ * @var boost::shared_mutex openvrml::browser::active_navigation_info_mutex_
*
* @brief Mutex protecting @c #active_navigation_info_.
*/
@@ -1219,7 +1219,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::viewpoint_list_mutex_
+ * @var boost::shared_mutex openvrml::browser::viewpoint_list_mutex_
*
* @brief Mutex protecting @c #viewpoint_list_.
*/
@@ -1235,7 +1235,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scoped_lights_mutex_
+ * @var boost::shared_mutex openvrml::browser::scoped_lights_mutex_
*
* @brief Mutex protecting @c #scoped_lights_.
*/
@@ -1251,7 +1251,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::scripts_mutex_
+ * @var boost::shared_mutex openvrml::browser::scripts_mutex_
*
* @brief Mutex protecting @c #scripts_.
*/
@@ -1267,7 +1267,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::timers_mutex_
+ * @var boost::shared_mutex openvrml::browser::timers_mutex_
*
* @brief Mutex protecting @c #timers_.
*/
@@ -1307,7 +1307,7 @@
*/
/**
- * @var openvrml::read_write_mutex openvrml::browser::modified_mutex_
+ * @var boost::shared_mutex openvrml::browser::modified_mutex_
*
* @brief Mutex protecting @c #modified_.
*/
@@ -1323,7 +1323,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::delta_time_mutex_
+ * @var boost::shared_mutex openvrml::browser::delta_time_mutex_
*
* @brief Mutex protecting @c #delta_time.
*/
@@ -1339,7 +1339,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::viewer_mutex_
+ * @var boost::shared_mutex openvrml::browser::viewer_mutex_
*
* @brief Mutex protecting @c #viewer_.
*/
@@ -1355,7 +1355,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::browser::frame_rate_mutex_
+ * @var boost::shared_mutex openvrml::browser::frame_rate_mutex_
*
* @brief Mutex protecting @c #frame_rate_.
*/
@@ -1468,8 +1468,10 @@
*/
openvrml::browser::~browser() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock
- lock(this->load_root_scene_thread_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
if (this->load_root_scene_thread_) {
this->load_root_scene_thread_->join();
}
@@ -1478,7 +1480,7 @@
const double now = browser::current_time();
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
if (this->scene_) { this->scene_->shutdown(now); }
this->node_metatype_registry_->impl_->shutdown(now);
@@ -1536,7 +1538,9 @@
*/
openvrml::scene * openvrml::browser::root_scene() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
return this->scene_.get();
}
@@ -1554,7 +1558,9 @@
const openvrml::node_path openvrml::browser::find_node(const node & n) const
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
class FindNodeTraverser : public node_traverser {
@@ -1600,7 +1606,9 @@
openvrml::viewpoint_node & openvrml::browser::active_viewpoint() const
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->active_viewpoint_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
return *this->active_viewpoint_;
}
@@ -1614,8 +1622,11 @@
void openvrml::browser::active_viewpoint(viewpoint_node & viewpoint)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
- read_write_mutex::scoped_write_lock
+ using boost::unique_lock;
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
+ unique_lock<shared_mutex>
active_viewpoint_lock(this->active_viewpoint_mutex_);
# ifndef NDEBUG
scene * root_scene = 0;
@@ -1633,7 +1644,9 @@
*/
void openvrml::browser::reset_default_viewpoint() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->active_viewpoint_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
assert(this->default_viewpoint_);
this->active_viewpoint_ =
node_cast<viewpoint_node *>(this->default_viewpoint_.get());
@@ -1651,8 +1664,9 @@
openvrml::navigation_info_node &
openvrml::browser::active_navigation_info() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
return *this->active_navigation_info_;
}
@@ -1666,8 +1680,11 @@
void openvrml::browser::active_navigation_info(navigation_info_node & nav_info)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_);
- read_write_mutex::scoped_write_lock
+ using boost::unique_lock;
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> scene_lock(this->scene_mutex_);
+ unique_lock<shared_mutex>
active_navigation_info_lock(this->active_navigation_info_mutex_);
# ifndef NDEBUG
scene * root_scene = 0;
@@ -1685,8 +1702,9 @@
*/
void openvrml::browser::reset_default_navigation_info() OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
assert(this->default_navigation_info_);
this->active_navigation_info_ =
node_cast<navigation_info_node *>(
@@ -1708,7 +1726,9 @@
void openvrml::browser::add_viewpoint(viewpoint_node & viewpoint)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->viewpoint_list_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
assert(std::find(this->viewpoint_list_.begin(), this->viewpoint_list_.end(),
&viewpoint) == this->viewpoint_list_.end());
this->viewpoint_list_.push_back(&viewpoint);
@@ -1725,7 +1745,9 @@
void openvrml::browser::remove_viewpoint(viewpoint_node & viewpoint)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->viewpoint_list_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
assert(!this->viewpoint_list_.empty());
typedef std::list<viewpoint_node *> viewpoint_list_t;
const viewpoint_list_t::iterator end = this->viewpoint_list_.end();
@@ -1743,7 +1765,9 @@
const std::list<openvrml::viewpoint_node *>
openvrml::browser::viewpoints() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->viewpoint_list_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->viewpoint_list_mutex_);
return this->viewpoint_list_;
}
@@ -1758,7 +1782,9 @@
void openvrml::browser::viewer(openvrml::viewer * v)
OPENVRML_THROW1(viewer_in_use)
{
- read_write_mutex::scoped_write_lock lock(this->viewer_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->viewer_mutex_);
if (v && v->browser_) { throw viewer_in_use(); }
if (this->viewer_) { this->viewer_->browser_ = 0; }
this->viewer_ = v;
@@ -1772,7 +1798,9 @@
*/
openvrml::viewer * openvrml::browser::viewer() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->viewer_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->viewer_mutex_);
return this->viewer_;
}
@@ -1807,8 +1835,9 @@
*/
float openvrml::browser::current_speed()
{
- read_write_mutex::scoped_read_lock
- lock(this->active_navigation_info_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->active_navigation_info_mutex_);
navigation_info_node & nav_info = this->active_navigation_info();
return nav_info.speed();
}
@@ -1821,7 +1850,9 @@
const std::string openvrml::browser::world_url() const
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
return this->scene_->url(); // Throws std::bad_alloc.
}
@@ -1838,12 +1869,16 @@
void openvrml::browser::set_world(resource_istream & in)
{
using std::for_each;
+ using boost::shared_lock;
+ using boost::shared_mutex;
{
- read_write_mutex::scoped_read_write_lock scene_lock(this->scene_mutex_);
-
using std::string;
+ using boost::upgrade_lock;
+ using boost::upgrade_to_unique_lock;
using local::uri;
+ upgrade_lock<shared_mutex> scene_lock(this->scene_mutex_);
+
//
// Clear out the current scene.
//
@@ -1851,29 +1886,29 @@
double now = browser::current_time();
if (this->scene_) { this->scene_->shutdown(now); }
this->node_metatype_registry_->impl_->shutdown(now);
- read_write_mutex::scoped_read_lock
- listeners_lock(this->listeners_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::shutdown)));
- scene_lock.promote();
+ {
+ upgrade_to_unique_lock<shared_mutex> scene_write_lock(scene_lock);
- this->scene_.reset();
- assert(this->viewpoint_list_.empty());
- assert(this->scoped_lights_.empty());
- assert(this->scripts_.empty());
- assert(this->timers_.empty());
+ this->scene_.reset();
+ assert(this->viewpoint_list_.empty());
+ assert(this->scoped_lights_.empty());
+ assert(this->scripts_.empty());
+ assert(this->timers_.empty());
- //
- // Create the new scene.
- //
- this->node_metatype_registry_.reset(new node_metatype_registry(*this));
- this->scene_.reset(new scene(*this));
+ //
+ // Create the new scene.
+ //
+ this->node_metatype_registry_.reset(
+ new node_metatype_registry(*this));
+ this->scene_.reset(new scene(*this));
+ }
- scene_lock.demote();
-
this->scene_->load(in);
//
@@ -1904,8 +1939,8 @@
this->node_metatype_registry_->impl_->init(initial_viewpoint, now);
if (!this->active_viewpoint_) {
- read_write_mutex::scoped_write_lock
- lock(this->active_viewpoint_mutex_);
+ using boost::unique_lock;
+ unique_lock<shared_mutex> lock(this->active_viewpoint_mutex_);
this->active_viewpoint_ = this->default_viewpoint_.get();
}
@@ -1913,8 +1948,7 @@
this->new_view = true; // Force resetUserNav
} // unlock this->scene_mutex_, this->active_viewpoint_mutex_
- read_write_mutex::scoped_read_lock
- listeners_lock(this->listeners_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)));
@@ -1929,7 +1963,9 @@
openvrml::browser::replace_world(
const std::vector<boost::intrusive_ptr<node> > & nodes)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
const double now = browser::current_time();
this->scene_->nodes(nodes);
this->scene_->initialize(now);
@@ -1959,8 +1995,9 @@
try {
std::auto_ptr<resource_istream> in;
{
- read_write_mutex::scoped_read_lock
- lock(browser.scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(browser.scene_mutex_);
in = browser.scene_->get_resource(this->url_);
}
if (!(*in)) { throw unreachable_url(); }
@@ -2008,9 +2045,12 @@
const std::vector<std::string> &)
OPENVRML_THROW2(std::bad_alloc, boost::thread_resource_error)
{
+ using boost::unique_lock;
+ using boost::shared_mutex;
+
{
- read_write_mutex::scoped_read_lock
- lock(this->load_root_scene_thread_mutex_);
+ using boost::shared_lock;
+ shared_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
if (this->load_root_scene_thread_) {
this->load_root_scene_thread_->join();
}
@@ -2018,8 +2058,7 @@
boost::function0<void> f = root_scene_loader(*this, url);
- read_write_mutex::scoped_write_lock
- lock(this->load_root_scene_thread_mutex_);
+ unique_lock<shared_mutex> lock(this->load_root_scene_thread_mutex_);
this->load_root_scene_thread_.reset(new boost::thread(f));
}
@@ -2086,7 +2125,9 @@
std::vector<boost::intrusive_ptr<node> > nodes;
try {
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
std::map<string, string> meta;
local::parse_vrml(in, stream_id.str(), type,
@@ -2125,7 +2166,9 @@
OPENVRML_THROW3(unsupported_interface, std::bad_cast,
boost::thread_resource_error)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
assert(this->scene_);
this->scene_->create_vrml_from_url(url, node, event);
}
@@ -2144,7 +2187,9 @@
bool openvrml::browser::add_listener(browser_listener & listener)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return this->listeners_.insert(&listener).second;
}
@@ -2160,7 +2205,9 @@
bool openvrml::browser::remove_listener(browser_listener & listener)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return this->listeners_.erase(&listener) > 0;
}
@@ -2171,7 +2218,9 @@
*/
double openvrml::browser::frame_rate() const
{
- read_write_mutex::scoped_read_lock lock(this->frame_rate_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->frame_rate_mutex_);
return this->frame_rate_;
}
@@ -2216,8 +2265,10 @@
bool openvrml::browser::update(double current_time)
{
using std::for_each;
+ using boost::shared_lock;
+ using boost::shared_mutex;
- read_write_mutex::scoped_read_lock
+ shared_lock<shared_mutex>
timers_lock(this->timers_mutex_),
scripts_lock(this->scripts_mutex_);
@@ -2259,7 +2310,10 @@
*/
void openvrml::browser::render()
{
- read_write_mutex::scoped_read_lock
+ using boost::shared_lock;
+ using boost::shared_mutex;
+
+ shared_lock<shared_mutex>
scene_lock(this->scene_mutex_),
active_viewpoint_lock_(this->active_viewpoint_mutex_);
@@ -2322,7 +2376,7 @@
// Do the browser-level lights (Points and Spots)
{
using std::for_each;
- read_write_mutex::scoped_read_lock
+ shared_lock<shared_mutex>
scoped_lights_lock(this->scoped_lights_mutex_);
for_each(this->scoped_lights_.begin(), this->scoped_lights_.end(),
boost::bind2nd(
@@ -2340,8 +2394,7 @@
this->viewer_->end_object();
// This is actually one frame late...
- read_write_mutex::scoped_write_lock
- frame_rate_lock(this->frame_rate_mutex_);
+ boost::unique_lock<shared_mutex> frame_rate_lock(this->frame_rate_mutex_);
this->frame_rate_ = this->viewer_->frame_rate();
this->modified(false);
@@ -2356,7 +2409,9 @@
*/
void openvrml::browser::modified(const bool value)
{
- read_write_mutex::scoped_write_lock lock(this->modified_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->modified_mutex_);
this->modified_ = value;
}
@@ -2367,7 +2422,9 @@
*/
bool openvrml::browser::modified() const
{
- read_write_mutex::scoped_read_lock lock(this->modified_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->modified_mutex_);
return this->modified_;
}
@@ -2378,7 +2435,9 @@
*/
void openvrml::browser::delta(const double d)
{
- read_write_mutex::scoped_write_lock lock(this->delta_time_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->delta_time_mutex_);
if (d < this->delta_time) { this->delta_time = d; }
}
@@ -2389,7 +2448,9 @@
*/
double openvrml::browser::delta() const
{
- read_write_mutex::scoped_read_lock lock(this->delta_time_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->delta_time_mutex_);
return this->delta_time;
}
@@ -2403,7 +2464,9 @@
void
openvrml::browser::add_scoped_light(scoped_light_node & light)
{
- read_write_mutex::scoped_write_lock lock(this->scoped_lights_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scoped_lights_mutex_);
assert(std::find(this->scoped_lights_.begin(), this->scoped_lights_.end(),
&light) == this->scoped_lights_.end());
this->scoped_lights_.push_back(&light);
@@ -2419,7 +2482,9 @@
void
openvrml::browser::remove_scoped_light(scoped_light_node & light)
{
- read_write_mutex::scoped_write_lock lock(this->scoped_lights_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scoped_lights_mutex_);
assert(!this->scoped_lights_.empty());
const std::list<scoped_light_node *>::iterator end =
this->scoped_lights_.end();
@@ -2438,7 +2503,9 @@
*/
void openvrml::browser::add_script(script_node & script)
{
- read_write_mutex::scoped_write_lock lock(this->scripts_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scripts_mutex_);
assert(std::find(this->scripts_.begin(), this->scripts_.end(), &script)
== this->scripts_.end());
this->scripts_.push_back(&script);
@@ -2453,7 +2520,9 @@
*/
void openvrml::browser::remove_script(script_node & script)
{
- read_write_mutex::scoped_write_lock lock(this->scripts_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->scripts_mutex_);
assert(!this->scripts_.empty());
typedef std::list<script_node *> script_node_list_t;
const script_node_list_t::iterator end = this->scripts_.end();
@@ -2472,7 +2541,9 @@
*/
void openvrml::browser::add_time_dependent(time_dependent_node & n)
{
- read_write_mutex::scoped_write_lock lock(this->timers_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->timers_mutex_);
assert(std::find(this->timers_.begin(), this->timers_.end(), &n)
== this->timers_.end());
this->timers_.push_back(&n);
@@ -2488,7 +2559,9 @@
void
openvrml::browser::remove_time_dependent(time_dependent_node & n)
{
- read_write_mutex::scoped_write_lock lock(this->timers_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->timers_mutex_);
assert(!this->timers_.empty());
const std::list<time_dependent_node *>::iterator end = this->timers_.end();
const std::list<time_dependent_node *>::iterator pos =
Modified: trunk/src/libopenvrml/openvrml/browser.h
===================================================================
--- trunk/src/libopenvrml/openvrml/browser.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/browser.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -221,54 +221,54 @@
const boost::scoped_ptr<null_node_metatype> null_node_metatype_;
const boost::scoped_ptr<null_node_type> null_node_type_;
- read_write_mutex load_root_scene_thread_mutex_;
+ boost::shared_mutex load_root_scene_thread_mutex_;
boost::scoped_ptr<boost::thread> load_root_scene_thread_;
boost::thread_group load_proto_thread_group_;
script_node_metatype script_node_metatype_;
resource_fetcher & fetcher_;
- mutable read_write_mutex scene_mutex_;
+ mutable boost::shared_mutex scene_mutex_;
boost::scoped_ptr<scene> scene_;
const boost::intrusive_ptr<viewpoint_node> default_viewpoint_;
- mutable read_write_mutex active_viewpoint_mutex_;
+ mutable boost::shared_mutex active_viewpoint_mutex_;
viewpoint_node * active_viewpoint_;
const boost::intrusive_ptr<navigation_info_node>
default_navigation_info_;
- mutable read_write_mutex active_navigation_info_mutex_;
+ mutable boost::shared_mutex active_navigation_info_mutex_;
navigation_info_node * active_navigation_info_;
- mutable read_write_mutex viewpoint_list_mutex_;
+ mutable boost::shared_mutex viewpoint_list_mutex_;
std::list<viewpoint_node *> viewpoint_list_;
- read_write_mutex scoped_lights_mutex_;
+ boost::shared_mutex scoped_lights_mutex_;
std::list<scoped_light_node *> scoped_lights_;
- read_write_mutex scripts_mutex_;
+ boost::shared_mutex scripts_mutex_;
std::list<script_node *> scripts_;
- read_write_mutex timers_mutex_;
+ boost::shared_mutex timers_mutex_;
std::list<time_dependent_node *> timers_;
- read_write_mutex listeners_mutex_;
+ boost::shared_mutex listeners_mutex_;
std::set<browser_listener *> listeners_;
bool new_view;
- mutable read_write_mutex delta_time_mutex_;
+ mutable boost::shared_mutex delta_time_mutex_;
double delta_time;
- mutable read_write_mutex viewer_mutex_;
+ mutable boost::shared_mutex viewer_mutex_;
openvrml::viewer * viewer_;
bool modified_;
- mutable read_write_mutex modified_mutex_;
+ mutable boost::shared_mutex modified_mutex_;
- mutable read_write_mutex frame_rate_mutex_;
+ mutable boost::shared_mutex frame_rate_mutex_;
double frame_rate_;
mutable boost::mutex out_mutex_;
Modified: trunk/src/libopenvrml/openvrml/event.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/event.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/event.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -437,7 +437,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::event_emitter::listeners_mutex_
+ * @var boost::shared_mutex openvrml::event_emitter::listeners_mutex_
*
* @brief Mutex guarding @c #listeners_.
*/
@@ -453,7 +453,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::event_emitter::last_time_mutex_
+ * @var boost::shared_mutex openvrml::event_emitter::last_time_mutex_
*
* @brief Mutex guarding @c #last_time_.
*/
@@ -516,7 +516,9 @@
*/
double openvrml::event_emitter::last_time() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->last_time_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->last_time_mutex_);
return this->last_time_;
}
Modified: trunk/src/libopenvrml/openvrml/event.h
===================================================================
--- trunk/src/libopenvrml/openvrml/event.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/event.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -163,10 +163,10 @@
const field_value & value_;
std::set<event_listener *> listeners_;
- mutable read_write_mutex listeners_mutex_;
+ mutable boost::shared_mutex listeners_mutex_;
double last_time_;
- mutable read_write_mutex last_time_mutex_;
+ mutable boost::shared_mutex last_time_mutex_;
public:
typedef std::set<event_listener *> listener_set;
@@ -200,7 +200,9 @@
bool event_emitter::add(field_value_listener<FieldValue> & listener)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return this->listeners_.insert(&listener).second;
}
@@ -208,7 +210,9 @@
bool event_emitter::remove(field_value_listener<FieldValue> & listener)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_write_lock lock(this->listeners_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->listeners_mutex_);
return (this->listeners_.erase(&listener) > 0);
}
@@ -216,10 +220,10 @@
void event_emitter::emit_event(const double timestamp)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock
- listeners_lock(this->listeners_mutex_);
- read_write_mutex::scoped_write_lock
- last_time_lock(this->last_time_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> listeners_lock(this->listeners_mutex_);
+ shared_lock<shared_mutex> last_time_lock(this->last_time_mutex_);
for (typename listener_set::iterator listener =
this->listeners_.begin();
listener != this->listeners_.end();
Modified: trunk/src/libopenvrml/openvrml/field_value.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/field_value.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/field_value.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -114,9 +114,9 @@
*/
/**
- * @var boost::mutex openvrml::field_value::counted_impl::mutex_
+ * @var boost::shared_mutex openvrml::field_value::counted_impl::mutex_
*
- * @brief Mutex protecting @a value_.
+ * @brief Mutex protecting @c #value_.
*/
/**
Modified: trunk/src/libopenvrml/openvrml/field_value.h
===================================================================
--- trunk/src/libopenvrml/openvrml/field_value.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/field_value.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -31,8 +31,8 @@
# include <boost/scoped_ptr.hpp>
# include <boost/shared_ptr.hpp>
# include <boost/utility.hpp>
+# include <boost/thread/shared_mutex.hpp>
# include <openvrml/basetypes.h>
-# include <openvrml/read_write_mutex.h>
namespace openvrml {
@@ -59,7 +59,7 @@
template <typename ValueType>
class counted_impl : public counted_impl_base {
- mutable read_write_mutex mutex_;
+ mutable boost::shared_mutex mutex_;
boost::shared_ptr<ValueType> value_;
public:
@@ -175,7 +175,9 @@
counted_impl(const counted_impl<ValueType> & ci) OPENVRML_NOTHROW:
counted_impl_base()
{
- read_write_mutex::scoped_read_lock lock(ci.mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(ci.mutex_);
value_ = ci.value_;
}
@@ -187,7 +189,9 @@
const ValueType & field_value::counted_impl<ValueType>::value() const
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
assert(this->value_);
return *this->value_;
}
@@ -196,7 +200,9 @@
void field_value::counted_impl<ValueType>::value(const ValueType & val)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_write_lock lock(this->mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->mutex_);
assert(this->value_);
if (!this->value_.unique()) {
this->value_.reset(new ValueType(val));
Modified: trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -175,11 +175,14 @@
const boost::shared_ptr<node_metatype> & metatype)
OPENVRML_THROW2(std::invalid_argument, std::bad_alloc)
{
+ using boost::unique_lock;
+ using boost::shared_mutex;
+
if (!metatype.get()) {
throw std::invalid_argument(
"cannot register null node_metatype pointer");
}
- read_write_mutex::scoped_write_lock lock(this->mutex_);
+ unique_lock<shared_mutex> lock(this->mutex_);
this->node_metatype_map_[id] = metatype;
}
@@ -221,7 +224,9 @@
openvrml::local::node_metatype_registry_impl::
init(viewpoint_node * initial_viewpoint, const double timestamp)
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
std::for_each(this->node_metatype_map_.begin(),
this->node_metatype_map_.end(),
init_node_metatype(initial_viewpoint, timestamp));
@@ -238,7 +243,9 @@
const boost::shared_ptr<openvrml::node_metatype>
openvrml::local::node_metatype_registry_impl::find(const std::string & id) const
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
const node_metatype_map_t::const_iterator pos =
this->node_metatype_map_.find(id);
return (pos != this->node_metatype_map_.end())
@@ -258,7 +265,9 @@
node_metatype_ids(const openvrml::node_metatype & node_metatype) const
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
std::vector<node_metatype_id> ids;
for (node_metatype_map_t::const_iterator entry =
this->node_metatype_map_.begin();
@@ -297,7 +306,9 @@
void openvrml::local::node_metatype_registry_impl::
render(openvrml::viewer & v)
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
std::for_each(this->node_metatype_map_.begin(),
this->node_metatype_map_.end(),
render_node_metatype(v));
@@ -330,7 +341,9 @@
openvrml::local::node_metatype_registry_impl::shutdown(const double timestamp)
OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->mutex_);
std::for_each(this->node_metatype_map_.begin(),
this->node_metatype_map_.end(),
shutdown_node_metatype(timestamp));
Modified: trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/local/node_metatype_registry_impl.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -38,7 +38,7 @@
class OPENVRML_LOCAL node_metatype_registry_impl : boost::noncopyable {
friend int (::openvrml_open_node_module)(const char * filename,
void * data);
- mutable read_write_mutex mutex_;
+ mutable boost::shared_mutex mutex_;
openvrml::browser & browser_;
Modified: trunk/src/libopenvrml/openvrml/node.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/node.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1890,7 +1890,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::node::scene_mutex_
+ * @var boost::shared_mutex openvrml::node::scene_mutex_
*
* @brief Mutex protecting @c #scene_.
*/
@@ -1906,7 +1906,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::node::modified_mutex_
+ * @var boost::shared_mutex openvrml::node::modified_mutex_
*
* @brief Mutex protecting @c #modified_.
*/
@@ -2118,7 +2118,9 @@
*/
openvrml::scene * openvrml::node::scene() const OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex_);
return this->scene_;
}
@@ -2169,11 +2171,16 @@
const double timestamp)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_write_lock lock(this->scene_mutex_);
+ using boost::upgrade_lock;
+ using boost::shared_mutex;
+
+ upgrade_lock<shared_mutex> lock(this->scene_mutex_);
+
if (!this->scene_) {
- lock.promote();
- this->scene_ = &scene;
- lock.demote();
+ {
+ boost::upgrade_to_unique_lock<shared_mutex> upgraded_lock(lock);
+ this->scene_ = &scene;
+ }
this->do_initialize(timestamp);
const node_interface_set & interfaces = this->type_.interfaces();
@@ -2312,12 +2319,17 @@
*/
void openvrml::node::shutdown(const double timestamp) OPENVRML_NOTHROW
{
- read_write_mutex::scoped_read_write_lock lock(this->scene_mutex_);
+ using boost::upgrade_lock;
+ using boost::shared_mutex;
+
+ upgrade_lock<shared_mutex> lock(this->scene_mutex_);
+
if (this->scene_) {
this->do_shutdown(timestamp);
- lock.promote();
- this->scene_ = 0;
- lock.demote();
+ {
+ boost::upgrade_to_unique_lock<shared_mutex> upgraded_lock(lock);
+ this->scene_ = 0;
+ }
const node_interface_set & interfaces = this->type_.interfaces();
for (node_interface_set::const_iterator interface_(interfaces.begin());
@@ -2705,7 +2717,9 @@
void openvrml::node::modified(const bool value)
OPENVRML_THROW1(boost::thread_resource_error)
{
- read_write_mutex::scoped_write_lock lock(this->modified_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->modified_mutex_);
this->modified_ = value;
if (this->modified_) { this->type_.metatype().browser().modified(true); }
}
@@ -2725,7 +2739,9 @@
bool openvrml::node::modified() const
OPENVRML_THROW1(boost::thread_resource_error)
{
- read_write_mutex::scoped_read_lock lock(this->modified_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->modified_mutex_);
return this->modified_ || this->do_modified();
}
@@ -2766,7 +2782,7 @@
*
* @return the @c scene mutex.
*/
-openvrml::read_write_mutex & openvrml::node::scene_mutex()
+boost::shared_mutex & openvrml::node::scene_mutex()
{
return this->scene_mutex_;
}
@@ -3309,7 +3325,9 @@
void openvrml::appearance_node::render_appearance(viewer & v,
rendering_context context)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (this->scene()) {
this->do_render_appearance(v, context);
this->modified(false);
@@ -3407,7 +3425,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::bounded_volume_node::bounding_volume_dirty_mutex_
+ * @var boost::shared_mutex openvrml::bounded_volume_node::bounding_volume_dirty_mutex_
*
* @brief Mutex protecting @c #bounding_volume_dirty_.
*/
@@ -3457,9 +3475,10 @@
const openvrml::bounding_volume &
openvrml::bounded_volume_node::bounding_volume() const
{
+ using boost::unique_lock;
+ using boost::shared_mutex;
const openvrml::bounding_volume & bv = this->do_bounding_volume();
- read_write_mutex::scoped_write_lock
- lock(this->bounding_volume_dirty_mutex_);
+ unique_lock<shared_mutex> lock(this->bounding_volume_dirty_mutex_);
this->bounding_volume_dirty_ = false;
return bv;
}
@@ -3497,8 +3516,9 @@
*/
void openvrml::bounded_volume_node::bounding_volume_dirty(const bool value)
{
- read_write_mutex::scoped_write_lock
- lock(this->bounding_volume_dirty_mutex_);
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex> lock(this->bounding_volume_dirty_mutex_);
this->bounding_volume_dirty_ = value;
if (value) { // only if dirtying, not clearing
this->type().metatype().browser().flags_need_updating = true;
@@ -3513,8 +3533,9 @@
*/
bool openvrml::bounded_volume_node::bounding_volume_dirty() const
{
- read_write_mutex::scoped_read_lock
- lock(this->bounding_volume_dirty_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->bounding_volume_dirty_mutex_);
if (this->type().metatype().browser().flags_need_updating) {
this->type().metatype().browser().update_flags();
this->type().metatype().browser().flags_need_updating = false;
@@ -3611,7 +3632,9 @@
void openvrml::child_node::render_child(viewer & v,
const rendering_context context)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (this->scene()) {
this->do_render_child(v, context);
this->modified(false);
@@ -4354,7 +4377,9 @@
void openvrml::geometry_node::render_geometry(viewer & v,
rendering_context context)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (!this->scene()) { return; }
@@ -5112,7 +5137,9 @@
*/
void openvrml::scoped_light_node::render_scoped_light(viewer & v)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (this->scene()) {
this->do_render_scoped_light(v);
}
@@ -5207,7 +5234,9 @@
*/
void openvrml::texture_node::render_texture(viewer & v)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (!this->scene()) { return; }
@@ -5397,7 +5426,9 @@
*/
void openvrml::texture_transform_node::render_texture_transform(viewer & v)
{
- read_write_mutex::scoped_read_lock lock(this->scene_mutex());
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->scene_mutex());
if (this->scene()) {
this->do_render_texture_transform(v);
this->modified(false);
Modified: trunk/src/libopenvrml/openvrml/node.h
===================================================================
--- trunk/src/libopenvrml/openvrml/node.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/node.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -522,10 +522,10 @@
const node_type & type_;
const boost::shared_ptr<openvrml::scope> scope_;
- mutable read_write_mutex scene_mutex_;
+ mutable boost::shared_mutex scene_mutex_;
openvrml::scene * scene_;
- mutable read_write_mutex modified_mutex_;
+ mutable boost::shared_mutex modified_mutex_;
bool modified_;
public:
@@ -590,7 +590,7 @@
const boost::shared_ptr<openvrml::scope> & scope)
OPENVRML_NOTHROW;
- read_write_mutex & scene_mutex();
+ boost::shared_mutex & scene_mutex();
private:
virtual
@@ -955,7 +955,7 @@
class OPENVRML_API bounded_volume_node : public virtual node {
- mutable read_write_mutex bounding_volume_dirty_mutex_;
+ mutable boost::shared_mutex bounding_volume_dirty_mutex_;
mutable bool bounding_volume_dirty_;
public:
Deleted: trunk/src/libopenvrml/openvrml/read_write_mutex.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/read_write_mutex.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/read_write_mutex.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1,298 +0,0 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*-
-//
-// OpenVRML
-//
-// Copyright 2007 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
-// the Free Software Foundation; either version 3 of the License, or (at your
-// option) any later version.
-//
-// This library is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-// License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this library; if not, see <http://www.gnu.org/licenses/>.
-//
-
-# ifdef HAVE_CONFIG_H
-# include <config.h>
-# endif
-
-#include "read_write_mutex.h"
-#include <cassert>
-
-/**
- * @file openvrml/read_write_mutex.h
- *
- * @brief A read/write mutex.
- */
-
-/**
- * @class openvrml::read_write_mutex openvrml/read_write_mutex.h
- *
- * @brief A read/write mutex with an interface that follows the
- * patterns established in the Boost thread library.
- *
- * This read/write mutex is implemented in terms of @c boost::mutex
- * and @c boost::condition.
- */
-
-/**
- * @internal
- *
- * @var boost::mutex openvrml::read_write_mutex::mutex_
- *
- * @brief The underlying mutex.
- */
-
-/**
- * @internal
- *
- * @var boost::condition openvrml::read_write_mutex::read_
- *
- * @brief When writing is done, this condition is signaled to indicate
- * that readers can acquire the lock.
- */
-
-/**
- * @internal
- *
- * @var boost::condition openvrml::read_write_mutex::write_
- *
- * @brief When reading is done, this condition is signaled to indicate
- * that a writer can acquire the lock.
- */
-
-/**
- * @internal
- *
- * @var std::size_t openvrml::read_write_mutex::readers_active_
- *
- * @brief The number of readers currently sharing the lock.
- */
-
-/**
- * @internal
- *
- * @var std::size_t openvrml::read_write_mutex::readers_waiting_
- *
- * @brief The number of readers currently waiting for the lock.
- */
-
-/**
- * @internal
- *
- * @var std::size_t openvrml::read_write_mutex::writers_waiting_
- *
- * @brief The number of writers currently waiting for the lock.
- */
-
-/**
- * @internal
- *
- * @var bool openvrml::read_write_mutex::writing_
- *
- * @brief @c true if a writer has the lock; @c false otherwise.
- */
-
-/**
- * @class openvrml::read_write_mutex::scoped_read_lock openvrml/read_write_mutex.h
- *
- * @brief Lock the mutex for read access.
- */
-
-/**
- * @internal
- *
- * @var openvrml::read_write_mutex & openvrml::read_write_mutex::scoped_read_lock::mutex_
- *
- * @brief The @c read_write_mutex being locked.
- */
-
-/**
- * @internal
- *
- * @var boost::mutex::scoped_lock openvrml::read_write_mutex::scoped_read_lock::lock_
- *
- * @brief A lock for @c read_write_mutex::mutex_.
- */
-
-/**
- * @brief Construct.
- *
- * Acquire the lock.
- *
- * @param[in] mutex a @c read_write_mutex.
- */
-openvrml::read_write_mutex::scoped_read_lock::
-scoped_read_lock(read_write_mutex & mutex):
- mutex_(mutex),
- lock_(mutex.mutex_)
-{
- if (this->mutex_.writing_) {
- ++this->mutex_.readers_waiting_;
- while (this->mutex_.writing_) {
- this->mutex_.read_.wait(this->lock_);
- }
- --this->mutex_.readers_waiting_;
- }
- ++this->mutex_.readers_active_;
- this->lock_.unlock();
-}
-
-/**
- * @brief Destroy.
- *
- * Release the lock.
- */
-openvrml::read_write_mutex::scoped_read_lock::~scoped_read_lock()
-{
- this->lock_.lock();
- --this->mutex_.readers_active_;
- if (this->mutex_.readers_active_ == 0
- && this->mutex_.writers_waiting_ != 0) {
- this->mutex_.write_.notify_one();
- }
-}
-
-/**
- * @class openvrml::read_write_mutex::scoped_write_lock openvrml/read_write_mutex.h
- *
- * @brief Lock the mutex for write access.
- */
-
-/**
- * @internal
- *
- * @var openvrml::read_write_mutex & openvrml::read_write_mutex::scoped_write_lock::mutex_
- *
- * @brief The @c read_write_mutex being locked.
- */
-
-/**
- * @internal
- *
- * @var boost::mutex::scoped_lock openvrml::read_write_mutex::scoped_write_lock::lock_
- *
- * @brief A lock for @c read_write_mutex::mutex_.
- */
-
-/**
- * @brief Construct.
- *
- * Acquire the lock.
- *
- * @param[in] mutex a @c read_write_mutex.
- */
-openvrml::read_write_mutex::scoped_write_lock::
-scoped_write_lock(read_write_mutex & mutex):
- mutex_(mutex),
- lock_(mutex.mutex_)
-{
- if (this->mutex_.writing_ || this->mutex_.readers_active_ != 0) {
- ++this->mutex_.writers_waiting_;
- while (this->mutex_.writing_ || this->mutex_.readers_active_ != 0) {
- this->mutex_.write_.wait(this->lock_);
- }
- --this->mutex_.writers_waiting_;
- }
- this->mutex_.writing_ = true;
- this->lock_.unlock();
-}
-
-/**
- * @brief Destroy.
- *
- * Release the lock.
- */
-openvrml::read_write_mutex::scoped_write_lock::~scoped_write_lock()
-{
- this->lock_.lock();
- this->mutex_.writing_ = false;
- if (this->mutex_.readers_waiting_ != 0) {
- this->mutex_.read_.notify_all();
- } else if (this->mutex_.writers_waiting_ != 0) {
- this->mutex_.write_.notify_one();
- }
-}
-
-/**
- * @brief Construct.
- */
-openvrml::read_write_mutex::read_write_mutex():
- readers_active_(0),
- readers_waiting_(0),
- writers_waiting_(0),
- writing_(false)
-{}
-
-
-/**
- * @class openvrml::read_write_mutex::scoped_read_write_lock openvrml/read_write_mutex.h
- *
- * @brief Lock the mutex for read/write access.
- *
- * Upon construction, the associated mutex is locked for reading. The lock
- * can be “promoted” to a write lock by calling @c #promote.
- */
-
-/**
- * @brief Construct.
- *
- * @param[in] mutex a @c read_write_mutex.
- */
-openvrml::read_write_mutex::scoped_read_write_lock::
-scoped_read_write_lock(read_write_mutex & mutex):
- scoped_read_lock(mutex)
-{}
-
-/**
- * @brief Destroy.
- */
-openvrml::read_write_mutex::scoped_read_write_lock::~scoped_read_write_lock()
-{
- this->demote();
-}
-
-/**
- * @brief Promote the lock to a write lock.
- */
-void openvrml::read_write_mutex::scoped_read_write_lock::promote()
-{
- this->lock_.lock();
- assert(!this->mutex_.writing_);
- --this->mutex_.readers_active_;
- if (this->mutex_.readers_active_ != 0) {
- ++this->mutex_.writers_waiting_;
- while (this->mutex_.readers_active_ != 0) {
- this->mutex_.write_.wait(this->lock_);
- }
- --this->mutex_.writers_waiting_;
- }
- this->mutex_.writing_ = true;
- this->lock_.unlock();
-}
-
-/**
- * @brief Demote the lock from a write lock back to a read lock.
- *
- * If the lock has not been promoted previously, this function has no effect.
- */
-void openvrml::read_write_mutex::scoped_read_write_lock::demote()
-{
- this->lock_.lock();
- if (this->mutex_.writing_) {
- ++this->mutex_.readers_active_;
- this->mutex_.writing_ = false;
- if (this->mutex_.readers_waiting_ != 0) {
- this->mutex_.read_.notify_all();
- } else if (this->mutex_.writers_waiting_ != 0) {
- this->mutex_.write_.notify_one();
- }
- }
- this->lock_.unlock();
-}
Deleted: trunk/src/libopenvrml/openvrml/read_write_mutex.h
===================================================================
--- trunk/src/libopenvrml/openvrml/read_write_mutex.h 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/read_write_mutex.h 2009-06-22 06:24:57 UTC (rev 3923)
@@ -1,72 +0,0 @@
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*-
-//
-// OpenVRML
-//
-// Copyright 2007 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
-// the Free Software Foundation; either version 3 of the License, or (at your
-// option) any later version.
-//
-// This library is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-// License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this library; if not, see <http://www.gnu.org/licenses/>.
-//
-
-# ifndef OPENVRML_READ_WRITE_MUTEX_H
-# define OPENVRML_READ_WRITE_MUTEX_H
-
-# include <openvrml-common.h>
-# include <boost/thread/mutex.hpp>
-# include <boost/thread/condition.hpp>
-
-namespace openvrml {
-
- class OPENVRML_API read_write_mutex : boost::noncopyable {
- boost::mutex mutex_;
- boost::condition read_, write_;
- std::size_t readers_active_, readers_waiting_, writers_waiting_;
- bool writing_;
-
- public:
- class scoped_read_write_lock;
-
- class OPENVRML_API scoped_read_lock : boost::noncopyable {
- friend class scoped_read_write_lock;
-
- read_write_mutex & mutex_;
- boost::mutex::scoped_lock lock_;
-
- public:
- explicit scoped_read_lock(read_write_mutex & mutex);
- ~scoped_read_lock();
- };
-
- class OPENVRML_API scoped_write_lock : boost::noncopyable {
- read_write_mutex & mutex_;
- boost::mutex::scoped_lock lock_;
-
- public:
- explicit scoped_write_lock(read_write_mutex & mutex);
- ~scoped_write_lock();
- };
-
- class OPENVRML_API scoped_read_write_lock : scoped_read_lock {
- public:
- explicit scoped_read_write_lock(read_write_mutex & mutex);
- ~scoped_read_write_lock();
-
- void promote();
- void demote();
- };
-
- read_write_mutex();
- };
-}
-
-# endif // OPENVRML_READ_WRITE_MUTEX_H
Modified: trunk/src/libopenvrml/openvrml/scene.cpp
===================================================================
--- trunk/src/libopenvrml/openvrml/scene.cpp 2009-06-22 01:14:04 UTC (rev 3922)
+++ trunk/src/libopenvrml/openvrml/scene.cpp 2009-06-22 06:24:57 UTC (rev 3923)
@@ -62,7 +62,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::scene::nodes_mutex_
+ * @var boost::shared_mutex openvrml::scene::nodes_mutex_
*
* @brief Mutex protecting @a nodes_.
*/
@@ -78,7 +78,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::scene::url_mutex_
+ * @var boost::shared_mutex openvrml::scene::url_mutex_
*
* @brief Mutex protecting @a url_.
*/
@@ -96,7 +96,7 @@
/**
* @internal
*
- * @var openvrml::read_write_mutex openvrml::scene::meta_mutex_
+ * @var boost::shared_mutex openvrml::scene::meta_mutex_
*
* @brief Mutex protecting @c #meta_.
*/
@@ -171,7 +171,9 @@
void openvrml::scene::load(resource_istream & in)
{
{
- read_write_mutex::scoped_write_lock
+ using boost::unique_lock;
+ using boost::shared_mutex;
+ unique_lock<shared_mutex>
nodes_lock(this->nodes_mutex_),
url_lock(this->url_mutex_),
meta_lock(this->meta_mutex_);
@@ -195,7 +197,9 @@
void openvrml::scene::initialize(const double timestamp)
OPENVRML_THROW1(std::bad_alloc)
{
- read_write_mutex::scoped_read_lock lock(this->nodes_mutex_);
+ using boost::shared_lock;
+ using boost::shared_mutex;
+ shared_lock<shared_mutex> lock(this->nodes_mutex_);
for (std::vector<boost::intrusive_ptr<node> >::iterator node(
this->nodes_.begin());
node != this->nodes_.end();
@@ -222,7 +226,9 @@
const std::...
[truncated message content] |
|
From: <br...@us...> - 2009-06-22 01:14:13
|
Revision: 3922
http://openvrml.svn.sourceforge.net/openvrml/?rev=3922&view=rev
Author: braden
Date: 2009-06-22 01:14:04 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
The Web browser still wants the plug-in to have the NPN_* entry points.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/mozilla-plugin/openvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 16:09:54 UTC (rev 3921)
+++ trunk/ChangeLog 2009-06-22 01:14:04 UTC (rev 3922)
@@ -1,3 +1,60 @@
+2009-06-21 Braden McDaniel <br...@en...>
+
+ The Web browser still wants the plug-in to have the NPN_* entry
+ points.
+
+ * src/mozilla-plugin/openvrml.cpp
+ (NPN_Version(int *, int *, int *, int *)): Replaced.
+ (NPN_GetURLNotify(NPP, const char *, const char *, void *)):
+ Replaced.
+ (NPN_GetURL(NPP, const char *, const char *)): Replaced.
+ (NPN_PostURLNotify(NPP, const char *, const char *, uint32, const
+ char *, NPBool, void *)): Replaced.
+ (NPN_PostURL(NPP, const char *, const char *, uint32, const
+ char *, NPBool)): Replaced.
+ (NPN_RequestRead(NPStream *, NPByteRange *)): Replaced.
+ (NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
+ Replaced.
+ (NPN_Write(NPP, NPStream *, int32, void *)): Replaced.
+ (NPN_DestryStream(NPP, NPStream *, NPError)): Replaced.
+ (NPN_Status(NPP, const char *)): Replaced.
+ (NPN_UserAgent(NPP)): Replaced.
+ (NPN_MemAlloc(uint32)): Replaced.
+ (NPN_MemFree(void *)): Replaced.
+ (NPN_MemFlush(uint32)): Replaced.
+ (NPN_ReloadPlugins(NPBool)): Replaced.
+ (NPN_GetJavaEnv()): Replaced.
+ (NPN_GetJavaPeer(NPP)): Replaced.
+ (NPN_GetValue(NPP, NPNVariable, void *)): Replaced.
+ (NPN_SetValue(NPP, NPPVariable, void *)): Replaced.
+ (NPN_InvalidateRect(NPP, NPRect *)): Replaced.
+ (NPN_InvalidateRegion(NPP, NPRegion)): Replaced.
+ (NPN_ForceRedraw(NPP)): Replaced.
+ (NPN_ReleaseVariantValue(NPVariant *)): Replaced.
+ (NPN_GetStringIdentifier(const NPUTF8 *)): Replaced.
+ (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t,
+ NPIdentifier *)): Replaced.
+ (NPN_GetIdentifier(int32_t)): Replaced.
+ (NPN_IdentifierIsString(NPIdentifier *)): Replaced.
+ (NPN_UTF8FromIdentifier(NPIdentifier)): Replaced.
+ (NPN_IntFromIdentifier(NPIdentifier)): Replaced.
+ (NPN_CreateObject(NPP, NPClass *)): Replaced.
+ (NPN_RetainObject(NPObject *)): Replaced.
+ (NPN_ReleaseObject(NPObject *)): Replaced.
+ (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *,
+ uint32_t, NPVariant *)): Replaced.
+ (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t,
+ NPVariant *)): Replaced.
+ (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Replaced.
+ (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)):
+ Replaced.
+ (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const
+ NPVariant *)): Replaced.
+ (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Replaced.
+ (NPN_SetException(NPObject *, const NPUTF8 *)): Replaced.
+
2009-06-18 Braden McDaniel <br...@en...>
* configure.ac: Fixed JNI const test.
Modified: trunk/src/mozilla-plugin/openvrml.cpp
===================================================================
--- trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 16:09:54 UTC (rev 3921)
+++ trunk/src/mozilla-plugin/openvrml.cpp 2009-06-22 01:14:04 UTC (rev 3922)
@@ -149,8 +149,6 @@
}
namespace {
- NPNetscapeFuncs mozillaFuncs;
-
enum np_host_signal_id {
shutdown_id,
last_signal_id
@@ -209,7 +207,7 @@
const char * const url,
GError ** /* error */)
{
- return mozillaFuncs.geturl(host->npp, url, 0);
+ return NPN_GetURL(host->npp, url, 0);
}
void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * /* host */,
@@ -223,6 +221,10 @@
return NPP_GetMIMEDescription();
}
+namespace {
+ NPNetscapeFuncs mozillaFuncs;
+}
+
/**
* @brief Provides global initialization for a plug-in.
*
@@ -338,7 +340,7 @@
// Make sure the browser supports XEmbed plug-ins.
//
PRBool supportsXEmbed = PR_FALSE;
- err = mozillaFuncs.getvalue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
+ err = NPN_GetValue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
if (err != NPERR_NO_ERROR || !supportsXEmbed) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -348,7 +350,7 @@
// Make sure the browser tookit is Gtk2.
//
NPNToolkitType toolkit = NPNToolkitType();
- err = mozillaFuncs.getvalue(0, NPNVToolkit, &toolkit);
+ err = NPN_GetValue(0, NPNVToolkit, &toolkit);
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -684,7 +686,7 @@
case NPPVpluginScriptableNPObject:
assert(npp->pdata);
instance = static_cast<plugin_instance *>(npp->pdata);
- mozillaFuncs.retainobject(instance->npobj);
+ NPN_RetainObject(instance->npobj);
*static_cast<NPObject **>(value) = instance->npobj;
break;
default:
@@ -698,6 +700,262 @@
return NPERR_NO_ERROR;
}
+void NPN_Version(int * plugin_major,
+ int * plugin_minor,
+ int * mozilla_major,
+ int * mozilla_minor)
+{
+ *plugin_major = NP_VERSION_MAJOR;
+ *plugin_minor = NP_VERSION_MINOR;
+ *mozilla_major = mozillaFuncs.version >> 8;
+ *mozilla_minor = mozillaFuncs.version & 0xff;
+}
+
+NPError NPN_GetURLNotify(NPP instance,
+ const char * url,
+ const char * target,
+ void * notifyData)
+{
+ const int navMinorVers = mozillaFuncs.version & 0xFF;
+ return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
+ ? mozillaFuncs.geturlnotify(instance, url, target, notifyData)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+NPError NPN_GetURL(NPP instance, const char * url, const char * target)
+{
+ return mozillaFuncs.geturl(instance, url, target);
+}
+
+NPError NPN_PostURLNotify(NPP instance,
+ const char * url,
+ const char * window,
+ uint32 len,
+ const char * buf,
+ NPBool file,
+ void * notifyData)
+{
+ const int navMinorVers = mozillaFuncs.version & 0xFF;
+ return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
+ ? mozillaFuncs.posturlnotify(instance,
+ url,
+ window,
+ len,
+ buf,
+ file,
+ notifyData)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+NPError NPN_PostURL(NPP instance,
+ const char * url,
+ const char * window,
+ uint32 len,
+ const char * buf,
+ NPBool file)
+{
+ return mozillaFuncs.posturl(instance, url, window, len, buf, file);
+}
+
+NPError NPN_RequestRead(NPStream * stream, NPByteRange * rangeList)
+{
+ return mozillaFuncs.requestread(stream, rangeList);
+}
+
+NPError NPN_NewStream(NPP instance,
+ NPMIMEType type,
+ const char * target,
+ NPStream ** stream)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.newstream(instance, type, target, stream)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void * buffer)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.write(instance, stream, len, buffer)
+ : -1;
+}
+
+NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
+{
+ const int navMinorVersion = mozillaFuncs.version & 0xFF;
+ return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
+ ? mozillaFuncs.destroystream(instance, stream, reason)
+ : NPERR_INCOMPATIBLE_VERSION_ERROR;
+}
+
+void NPN_Status(NPP instance, const char * message)
+{
+ mozillaFuncs.status(instance, message);
+}
+
+const char * NPN_UserAgent(NPP instance)
+{
+ return mozillaFuncs.uagent(instance);
+}
+
+void * NPN_MemAlloc(uint32 size)
+{
+ return mozillaFuncs.memalloc(size);
+}
+
+void NPN_MemFree(void * ptr)
+{
+ mozillaFuncs.memfree(ptr);
+}
+
+uint32 NPN_MemFlush(uint32 size)
+{
+ return mozillaFuncs.memflush(size);
+}
+
+void NPN_ReloadPlugins(NPBool reloadPages)
+{
+ mozillaFuncs.reloadplugins(reloadPages);
+}
+
+JRIEnv * NPN_GetJavaEnv()
+{
+ return static_cast<JRIEnv *>(mozillaFuncs.getJavaEnv());
+}
+
+jref NPN_GetJavaPeer(NPP instance)
+{
+ return static_cast<jref>(mozillaFuncs.getJavaPeer(instance));
+}
+
+NPError NPN_GetValue(NPP instance, NPNVariable variable, void * value)
+{
+ return mozillaFuncs.getvalue(instance, variable, value);
+}
+
+NPError NPN_SetValue(NPP instance, NPPVariable variable, void * value)
+{
+ return mozillaFuncs.setvalue(instance, variable, value);
+}
+
+void NPN_InvalidateRect(NPP instance, NPRect * invalidRect)
+{
+ mozillaFuncs.invalidaterect(instance, invalidRect);
+}
+
+void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
+{
+ mozillaFuncs.invalidateregion(instance, invalidRegion);
+}
+
+void NPN_ForceRedraw(NPP instance)
+{
+ mozillaFuncs.forceredraw(instance);
+}
+
+void NPN_ReleaseVariantValue(NPVariant * variant)
+{
+ mozillaFuncs.releasevariantvalue(variant);
+}
+
+NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name)
+{
+ return mozillaFuncs.getstringidentifier(name);
+}
+
+void NPN_GetStringIdentifiers(const NPUTF8 ** names,
+ int32_t nameCount,
+ NPIdentifier * identifiers)
+{
+ mozillaFuncs.getstringidentifiers(names, nameCount, identifiers);
+}
+
+NPIdentifier NPN_GetIntIdentifier(int32_t intid)
+{
+ return mozillaFuncs.getintidentifier(intid);
+}
+
+bool NPN_IdentifierIsString(NPIdentifier * identifier)
+{
+ return mozillaFuncs.identifierisstring(identifier);
+}
+
+NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier)
+{
+ return mozillaFuncs.utf8fromidentifier(identifier);
+}
+
+int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
+{
+ return mozillaFuncs.intfromidentifier(identifier);
+}
+
+NPObject * NPN_CreateObject(NPP npp, NPClass * aClass)
+{
+ return mozillaFuncs.createobject(npp, aClass);
+}
+
+NPObject * NPN_RetainObject(NPObject * npobj)
+{
+ return mozillaFuncs.retainobject(npobj);
+}
+
+void NPN_ReleaseObject(NPObject * npobj)
+{
+ mozillaFuncs.releaseobject(npobj);
+}
+
+bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName,
+ const NPVariant * args, uint32_t argCount, NPVariant * result)
+{
+ return mozillaFuncs.invoke(npp, npobj, methodName, args, argCount, result);
+}
+
+bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args,
+ uint32_t argCount, NPVariant * result)
+{
+ return mozillaFuncs.invokeDefault(npp, npobj, args, argCount, result);
+}
+
+bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script,
+ NPVariant * result)
+{
+ return mozillaFuncs.evaluate(npp, npobj, script, result);
+}
+
+bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
+ NPVariant * result)
+{
+ return mozillaFuncs.getproperty(npp, npobj, propertyName, result);
+}
+
+bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
+ const NPVariant * result)
+{
+ return mozillaFuncs.setproperty(npp, npobj, propertyName, result);
+}
+
+bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
+{
+ return mozillaFuncs.removeproperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
+{
+ return mozillaFuncs.hasproperty(npp, npobj, propertyName);
+}
+
+bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName)
+{
+ return mozillaFuncs.hasmethod(npp, npobj, methodName);
+}
+
+void NPN_SetException(NPObject * npobj, const NPUTF8 * message)
+{
+ return mozillaFuncs.setexception(npobj, message);
+}
+
namespace {
boost::scoped_ptr<const script_callback_map> script_callback_map::instance_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-19 12:29:43
|
Revision: 3920
http://openvrml.svn.sourceforge.net/openvrml/?rev=3920&view=rev
Author: braden
Date: 2009-06-18 05:20:18 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_* function implementations in favor of directly using the function pointers provided by the browser.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/mozilla-plugin/openvrml.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/ChangeLog 2009-06-18 05:20:18 UTC (rev 3920)
@@ -1,5 +1,70 @@
2009-06-18 Braden McDaniel <br...@en...>
+ Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_*
+ function implementations in favor of directly using the function
+ pointers provided by the browser.
+
+ * configure.ac: Require mozilla-plugin.pc version 1.9.1.
+ * src/mozilla-plugin/openvrml.cpp
+ (openvrml_np_browser_host_get_url(OpenvrmlNpBrowserHost *, const
+ char *, GError **)): Call mozillaFuncs.geturl directly.
+ (NP_Initialize(NPNetscapeFuncs *, NPPluginFuncs *)): Call
+ mozillaFuncs.getvalue directly.
+ (NPP_GetValue(NPP, NPPVariable, void *)): Call
+ mozillaFuncs.retainobject directly.
+ (NPN_Version(int *, int *, int *, int *)): Removed.
+ (NPN_GetURLNotify(NPP, const char *, const char *, void *)):
+ Removed.
+ (NPN_GetURL(NPP, const char *, const char *)): Removed.
+ (NPN_PostURLNotify(NPP, const char *, const char *, uint32, const
+ char *, NPBool, void *)): Removed.
+ (NPN_PostURL(NPP, const char *, const char *, uint32, const
+ char *, NPBool)): Removed.
+ (NPN_RequestRead(NPStream *, NPByteRange *)): Removed.
+ (NPN_NewStream(NPP, NPMIMEType, const char *, NPStream **)):
+ Removed.
+ (NPN_Write(NPP, NPStream *, int32, void *)): Removed.
+ (NPN_DestryStream(NPP, NPStream *, NPError)): Removed.
+ (NPN_Status(NPP, const char *)): Removed.
+ (NPN_UserAgent(NPP)): Removed.
+ (NPN_MemAlloc(uint32)): Removed.
+ (NPN_MemFree(void *)): Removed.
+ (NPN_MemFlush(uint32)): Removed.
+ (NPN_ReloadPlugins(NPBool)): Removed.
+ (NPN_GetJavaEnv()): Removed.
+ (NPN_GetJavaPeer(NPP)): Removed.
+ (NPN_GetValue(NPP, NPNVariable, void *)): Removed.
+ (NPN_SetValue(NPP, NPPVariable, void *)): Removed.
+ (NPN_InvalidateRect(NPP, NPRect *)): Removed.
+ (NPN_InvalidateRegion(NPP, NPRegion)): Removed.
+ (NPN_ForceRedraw(NPP)): Removed.
+ (NPN_ReleaseVariantValue(NPVariant *)): Removed.
+ (NPN_GetStringIdentifier(const NPUTF8 *)): Removed.
+ (NPN_GetStringIdentifiers(const NPUTF8 **, int32_t,
+ NPIdentifier *)): Removed.
+ (NPN_GetIdentifier(int32_t)): Removed.
+ (NPN_IdentifierIsString(NPIdentifier *)): Removed.
+ (NPN_UTF8FromIdentifier(NPIdentifier)): Removed.
+ (NPN_IntFromIdentifier(NPIdentifier)): Removed.
+ (NPN_CreateObject(NPP, NPClass *)): Removed.
+ (NPN_RetainObject(NPObject *)): Removed.
+ (NPN_ReleaseObject(NPObject *)): Removed.
+ (NPN_Invoke(NPP, NPObject *, NPIdentifier, const NPVariant *,
+ uint32_t, NPVariant *)): Removed.
+ (NPN_InvokeDefault(NPP, NPObject *, const NPVariant *, uint32_t,
+ NPVariant *)): Removed.
+ (NPN_Evaluate(NPP, NPObject *, NPString *, NPVariant *)): Removed.
+ (NPN_GetProperty(NPP, NPObject *, NPIdentifier, NPVariant *)):
+ Removed.
+ (NPN_SetProperty(NPP, NPObject *, NPIdentifier, const
+ NPVariant *)): Removed.
+ (NPN_RemoveProperty(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_HasProperty(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_HasMethod(NPP, NPObject *, NPIdentifier)): Removed.
+ (NPN_SetException(NPObject *, const NPUTF8 *)): Removed.
+
+2009-06-18 Braden McDaniel <br...@en...>
+
Conditionally apply "const" when using the JNI functions
SetFloatArrayRegion and SetDoubleArrayRegion.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/configure.ac 2009-06-18 05:20:18 UTC (rev 3920)
@@ -201,15 +201,13 @@
PKG_CHECK_MODULES([GNOMEUI], [libgnomeui-2.0 libgnome-2.0 >= 2.14], ,
[have_gnomeui=no])
PKG_CHECK_MODULES([CURL], [libcurl], , [have_libcurl=no])
-PKG_CHECK_MODULES([MOZILLA_PLUGIN], [xulrunner-plugin],
- [mozilla_plugin_pkg=xulrunner-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [firefox-plugin],
- [mozilla_plugin_pkg=firefox-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [seamonkey-plugin],
- [mozilla_plugin_pkg=seamonkey-plugin],
- [PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.6],
- [mozilla_plugin_pkg=mozilla-plugin],
- [have_mozilla_plugin=no])])])])
+#
+# The Mozilla plug-in uses the npfunctions.h header introduced in
+# XULRunner 1.9.1.
+#
+PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin >= 1.9.1],
+ [have_mozilla_plugin=yes],
+ [have_mozilla_plugin=no])
AC_PATH_XTRA
AX_CHECK_GLU
@@ -460,7 +458,7 @@
AS_IF([test X$enable_mozilla_plugin != Xno],
[AS_IF([test X$enable_xembed = Xno],
[AC_MSG_FAILURE([the Mozilla plug-in cannot be built without the XEmbed control])])
- AS_IF([test "X$have_mozilla_plugin" = "Xno"],
+ AS_IF([test X$have_mozilla_plugin = Xno],
[AC_MSG_FAILURE([Mozilla plug-in development headers are required to build the Mozilla plug-in.])])
AS_IF([test "X$have_dbus_glib" = "Xno"],
[AC_MSG_FAILURE([The D-Bus GLib binding is required to build the Mozilla plug-in])])])
Modified: trunk/src/mozilla-plugin/openvrml.cpp
===================================================================
--- trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 04:26:38 UTC (rev 3919)
+++ trunk/src/mozilla-plugin/openvrml.cpp 2009-06-18 05:20:18 UTC (rev 3920)
@@ -31,7 +31,7 @@
# include <boost/noncopyable.hpp>
# include <boost/ref.hpp>
# include <boost/scoped_ptr.hpp>
-# include <npupp.h>
+# include <npfunctions.h>
# if defined MOZ_X11
# include <dbus/dbus-glib-bindings.h>
# else
@@ -149,6 +149,8 @@
}
namespace {
+ NPNetscapeFuncs mozillaFuncs;
+
enum np_host_signal_id {
shutdown_id,
last_signal_id
@@ -207,7 +209,7 @@
const char * const url,
GError ** /* error */)
{
- return NPN_GetURL(host->npp, url, 0);
+ return mozillaFuncs.geturl(host->npp, url, 0);
}
void openvrml_np_browser_host_set_world_url(OpenvrmlNpBrowserHost * /* host */,
@@ -221,10 +223,6 @@
return NPP_GetMIMEDescription();
}
-namespace {
- NPNetscapeFuncs mozillaFuncs;
-}
-
/**
* @brief Provides global initialization for a plug-in.
*
@@ -340,10 +338,7 @@
// Make sure the browser supports XEmbed plug-ins.
//
PRBool supportsXEmbed = PR_FALSE;
- err = CallNPN_GetValueProc(mozillaFuncs.getvalue,
- 0,
- NPNVSupportsXEmbedBool,
- &supportsXEmbed);
+ err = mozillaFuncs.getvalue(0, NPNVSupportsXEmbedBool, &supportsXEmbed);
if (err != NPERR_NO_ERROR || !supportsXEmbed) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -353,10 +348,7 @@
// Make sure the browser tookit is Gtk2.
//
NPNToolkitType toolkit = NPNToolkitType();
- err = CallNPN_GetValueProc(mozillaFuncs.getvalue,
- 0,
- NPNVToolkit,
- &toolkit);
+ err = mozillaFuncs.getvalue(0, NPNVToolkit, &toolkit);
if (err != NPERR_NO_ERROR || toolkit != NPNVGtk2) {
return NPERR_INCOMPATIBLE_VERSION_ERROR;
@@ -692,7 +684,7 @@
case NPPVpluginScriptableNPObject:
assert(npp->pdata);
instance = static_cast<plugin_instance *>(npp->pdata);
- NPN_RetainObject(instance->npobj);
+ mozillaFuncs.retainobject(instance->npobj);
*static_cast<NPObject **>(value) = instance->npobj;
break;
default:
@@ -706,307 +698,6 @@
return NPERR_NO_ERROR;
}
-void NPN_Version(int * plugin_major,
- int * plugin_minor,
- int * mozilla_major,
- int * mozilla_minor)
-{
- *plugin_major = NP_VERSION_MAJOR;
- *plugin_minor = NP_VERSION_MINOR;
- *mozilla_major = mozillaFuncs.version >> 8;
- *mozilla_minor = mozillaFuncs.version & 0xff;
-}
-
-NPError NPN_GetURLNotify(NPP instance,
- const char * url,
- const char * target,
- void * notifyData)
-{
- const int navMinorVers = mozillaFuncs.version & 0xFF;
- return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
- ? CallNPN_GetURLNotifyProc(mozillaFuncs.geturlnotify,
- instance,
- url,
- target,
- notifyData)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-NPError NPN_GetURL(NPP instance, const char * url, const char * target)
-{
- return CallNPN_GetURLProc(mozillaFuncs.geturl, instance, url, target);
-}
-
-NPError NPN_PostURLNotify(NPP instance,
- const char * url,
- const char * window,
- uint32 len,
- const char * buf,
- NPBool file,
- void * notifyData)
-{
- const int navMinorVers = mozillaFuncs.version & 0xFF;
- return (navMinorVers >= NPVERS_HAS_NOTIFICATION)
- ? CallNPN_PostURLNotifyProc(mozillaFuncs.posturlnotify,
- instance,
- url,
- window,
- len,
- buf,
- file,
- notifyData)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-NPError NPN_PostURL(NPP instance,
- const char * url,
- const char * window,
- uint32 len,
- const char * buf,
- NPBool file)
-{
- return CallNPN_PostURLProc(mozillaFuncs.posturl,
- instance,
- url,
- window,
- len,
- buf,
- file);
-}
-
-NPError NPN_RequestRead(NPStream * stream, NPByteRange * rangeList)
-{
- return CallNPN_RequestReadProc(mozillaFuncs.requestread,
- stream,
- rangeList);
-}
-
-NPError NPN_NewStream(NPP instance,
- NPMIMEType type,
- const char * target,
- NPStream ** stream)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_NewStreamProc(mozillaFuncs.newstream,
- instance,
- type,
- target,
- stream)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-int32 NPN_Write(NPP instance, NPStream * stream, int32 len, void * buffer)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_WriteProc(mozillaFuncs.write, instance, stream, len, buffer)
- : -1;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
- const int navMinorVersion = mozillaFuncs.version & 0xFF;
- return (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
- ? CallNPN_DestroyStreamProc(mozillaFuncs.destroystream,
- instance,
- stream,
- reason)
- : NPERR_INCOMPATIBLE_VERSION_ERROR;
-}
-
-void NPN_Status(NPP instance, const char * message)
-{
- CallNPN_StatusProc(mozillaFuncs.status, instance, message);
-}
-
-const char * NPN_UserAgent(NPP instance)
-{
- return CallNPN_UserAgentProc(mozillaFuncs.uagent, instance);
-}
-
-void * NPN_MemAlloc(uint32 size)
-{
- return CallNPN_MemAllocProc(mozillaFuncs.memalloc, size);
-}
-
-void NPN_MemFree(void * ptr)
-{
- CallNPN_MemFreeProc(mozillaFuncs.memfree, ptr);
-}
-
-uint32 NPN_MemFlush(uint32 size)
-{
- return CallNPN_MemFlushProc(mozillaFuncs.memflush, size);
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
- CallNPN_ReloadPluginsProc(mozillaFuncs.reloadplugins, reloadPages);
-}
-
-JRIEnv * NPN_GetJavaEnv()
-{
- return CallNPN_GetJavaEnvProc(mozillaFuncs.getJavaEnv);
-}
-
-jref NPN_GetJavaPeer(NPP instance)
-{
- return CallNPN_GetJavaPeerProc(mozillaFuncs.getJavaPeer, instance);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void * value)
-{
- return CallNPN_GetValueProc(mozillaFuncs.getvalue,
- instance,
- variable,
- value);
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void * value)
-{
- return CallNPN_SetValueProc(mozillaFuncs.setvalue,
- instance,
- variable,
- value);
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect * invalidRect)
-{
- CallNPN_InvalidateRectProc(mozillaFuncs.invalidaterect,
- instance,
- invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
- CallNPN_InvalidateRegionProc(mozillaFuncs.invalidateregion,
- instance,
- invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
- CallNPN_ForceRedrawProc(mozillaFuncs.forceredraw, instance);
-}
-
-void NPN_ReleaseVariantValue(NPVariant * variant)
-{
- CallNPN_ReleaseVariantValueProc(mozillaFuncs.releasevariantvalue, variant);
-}
-
-NPIdentifier NPN_GetStringIdentifier(const NPUTF8 * name)
-{
- return CallNPN_GetStringIdentifierProc(mozillaFuncs.getstringidentifier,
- name);
-}
-
-void NPN_GetStringIdentifiers(const NPUTF8 ** names,
- int32_t nameCount,
- NPIdentifier * identifiers)
-{
- CallNPN_GetStringIdentifiersProc(mozillaFuncs.getstringidentifiers,
- names,
- nameCount,
- identifiers);
-}
-
-NPIdentifier NPN_GetIntIdentifier(int32_t intid)
-{
- return CallNPN_GetIntIdentifierProc(mozillaFuncs.getintidentifier, intid);
-}
-
-bool NPN_IdentifierIsString(NPIdentifier * identifier)
-{
- return CallNPN_IdentifierIsStringProc(mozillaFuncs.identifierisstring,
- identifier);
-}
-
-NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier)
-{
- return CallNPN_UTF8FromIdentifierProc(mozillaFuncs.utf8fromidentifier,
- identifier);
-}
-
-int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
-{
- return CallNPN_IntFromIdentifierProc(mozillaFuncs.intfromidentifier,
- identifier);
-}
-
-NPObject * NPN_CreateObject(NPP npp, NPClass * aClass)
-{
- return CallNPN_CreateObjectProc(mozillaFuncs.createobject, npp, aClass);
-}
-
-NPObject * NPN_RetainObject(NPObject * npobj)
-{
- return CallNPN_RetainObjectProc(mozillaFuncs.retainobject, npobj);
-}
-
-void NPN_ReleaseObject(NPObject * npobj)
-{
- CallNPN_ReleaseObjectProc(mozillaFuncs.releaseobject, npobj);
-}
-
-bool NPN_Invoke(NPP npp, NPObject * npobj, NPIdentifier methodName,
- const NPVariant * args, uint32_t argCount, NPVariant * result)
-{
- return CallNPN_InvokeProc(mozillaFuncs.invoke,
- npp, npobj, methodName, args, argCount, result);
-}
-
-bool NPN_InvokeDefault(NPP npp, NPObject * npobj, const NPVariant * args,
- uint32_t argCount, NPVariant * result)
-{
- return CallNPN_InvokeDefaultProc(mozillaFuncs.invokeDefault,
- npp, npobj, args, argCount, result);
-}
-
-bool NPN_Evaluate(NPP npp, NPObject * npobj, NPString * script,
- NPVariant * result)
-{
- return CallNPN_EvaluateProc(mozillaFuncs.evaluate, npp, npobj, script,
- result);
-}
-
-bool NPN_GetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
- NPVariant * result)
-{
- return CallNPN_GetPropertyProc(mozillaFuncs.getproperty,
- npp, npobj, propertyName, result);
-}
-
-bool NPN_SetProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName,
- const NPVariant * result)
-{
- return CallNPN_SetPropertyProc(mozillaFuncs.setproperty,
- npp, npobj, propertyName, result);
-}
-
-bool NPN_RemoveProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
-{
- return CallNPN_RemovePropertyProc(mozillaFuncs.removeproperty,
- npp, npobj, propertyName);
-}
-
-bool NPN_HasProperty(NPP npp, NPObject * npobj, NPIdentifier propertyName)
-{
- return CallNPN_HasPropertyProc(mozillaFuncs.hasproperty,
- npp, npobj, propertyName);
-}
-
-bool NPN_HasMethod(NPP npp, NPObject * npobj, NPIdentifier methodName)
-{
- return CallNPN_HasMethodProc(mozillaFuncs.hasmethod,
- npp, npobj, methodName);
-}
-
-void NPN_SetException(NPObject * npobj, const NPUTF8 * message)
-{
- return CallNPN_SetExceptionProc(mozillaFuncs.setexception, npobj, message);
-}
-
namespace {
boost::scoped_ptr<const script_callback_map> script_callback_map::instance_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-18 16:10:05
|
Revision: 3921
http://openvrml.svn.sourceforge.net/openvrml/?rev=3921&view=rev
Author: braden
Date: 2009-06-18 16:09:54 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Fixed JNI const test.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-18 05:20:18 UTC (rev 3920)
+++ trunk/ChangeLog 2009-06-18 16:09:54 UTC (rev 3921)
@@ -1,5 +1,9 @@
2009-06-18 Braden McDaniel <br...@en...>
+ * configure.ac: Fixed JNI const test.
+
+2009-06-18 Braden McDaniel <br...@en...>
+
Build the Mozilla plug-in with XULRunner 1.9.1. Removed the NPN_*
function implementations in favor of directly using the function
pointers provided by the browser.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-18 05:20:18 UTC (rev 3920)
+++ trunk/configure.ac 2009-06-18 16:09:54 UTC (rev 3921)
@@ -88,19 +88,19 @@
#
ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])])
AC_CHECK_HEADER([ltdl.h], , [AC_MSG_FAILURE([ltdl.h not found])])
-AC_CHECK_HEADER([jni.h], [have_jni=yes])
+AC_CHECK_HEADER([jni.h], [have_jni=yes], [have_jni=no])
#
# Some jni.h implementations (well, GCJ, at least), don't apply const
# in function signatures.
#
-AS_IF([test X$have_jni != Xno],
+AS_IF([test X$have_jni = Xyes],
[AC_MSG_CHECKING([if JNI function signatures use const])
AC_CACHE_VAL([ov_cv_jni_const],
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <jni.h>],
- [void (*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
+ [void (JNIEnv::*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
[ov_cv_jni_const=const],
[ov_cv_jni_const= ])
AC_LANG_POP])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-18 04:28:05
|
Revision: 3919
http://openvrml.svn.sourceforge.net/openvrml/?rev=3919&view=rev
Author: braden
Date: 2009-06-18 04:26:38 +0000 (Thu, 18 Jun 2009)
Log Message:
-----------
Conditionally apply "const" when using the JNI functions SetFloatArrayRegion and SetDoubleArrayRegion.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/src/script/java.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/ChangeLog 2009-06-18 04:26:38 UTC (rev 3919)
@@ -1,3 +1,14 @@
+2009-06-18 Braden McDaniel <br...@en...>
+
+ Conditionally apply "const" when using the JNI functions
+ SetFloatArrayRegion and SetDoubleArrayRegion.
+
+ * configure.ac: Check to see whether JNI function signatures use
+ "const".
+ * src/script/java.cpp: Use OPENVRML_JNI_CONST to conditionally
+ apply "const" when using SetFloatArrayRegion and
+ SetDoubleArrayRegion.
+
2009-06-17 Braden McDaniel <br...@en...>
* configure.ac: Fixed error message to note missing GtkGLExt
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/configure.ac 2009-06-18 04:26:38 UTC (rev 3919)
@@ -91,6 +91,25 @@
AC_CHECK_HEADER([jni.h], [have_jni=yes])
#
+# Some jni.h implementations (well, GCJ, at least), don't apply const
+# in function signatures.
+#
+AS_IF([test X$have_jni != Xno],
+ [AC_MSG_CHECKING([if JNI function signatures use const])
+ AC_CACHE_VAL([ov_cv_jni_const],
+[AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [#include <jni.h>],
+ [void (*fn)(jfloatArray, jsize, jsize, const jfloat *) = &JNIEnv::SetFloatArrayRegion])],
+ [ov_cv_jni_const=const],
+ [ov_cv_jni_const= ])
+AC_LANG_POP])
+ AS_IF([test -n "$ov_cv_jni_const"],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+])
+
+#
# Allow users to specify any Boost library name suffix
#
AC_ARG_VAR([BOOST_LIB_SUFFIX], [Boost library name suffix])
@@ -365,6 +384,8 @@
AS_IF([test X$enable_script_node_java != Xno],
[AS_IF([test X$have_jni != Xyes],
[AC_MSG_FAILURE([The Java Native Interface is required for Script node Java support.])])
+AC_DEFINE_UNQUOTED([OPENVRML_JNI_CONST], [$ov_cv_jni_const],
+ [const for JNI function signatures.])
AS_IF([test -z "$JAVA_HOME"],
[AC_MSG_WARN([JAVA_HOME has not been set. JAVA_HOME must be set at run time to locate libjvm.])],
[ov_save_LDFLAGS=$LDFLAGS
Modified: trunk/src/script/java.cpp
===================================================================
--- trunk/src/script/java.cpp 2009-06-17 05:33:18 UTC (rev 3918)
+++ trunk/src/script/java.cpp 2009-06-18 04:26:38 UTC (rev 3919)
@@ -4492,20 +4492,22 @@
template <> struct set_array_region_t<jfloat> {
static void (JNIEnv::* const value)(
- array_type<jfloat>::type, jsize, jsize, const jfloat *);
+ array_type<jfloat>::type, jsize, jsize,
+ OPENVRML_JNI_CONST jfloat *);
};
void (JNIEnv::* const set_array_region_t<jfloat>::value)(
- array_type<jfloat>::type, jsize, jsize, const jfloat *) =
+ array_type<jfloat>::type, jsize, jsize, OPENVRML_JNI_CONST jfloat *) =
&JNIEnv::SetFloatArrayRegion;
template <> struct set_array_region_t<jdouble> {
static void (JNIEnv::* const value)(
- array_type<jdouble>::type, jsize, jsize, const jdouble *);
+ array_type<jdouble>::type, jsize, jsize,
+ OPENVRML_JNI_CONST jdouble *);
};
void (JNIEnv::* const set_array_region_t<jdouble>::value)(
- array_type<jdouble>::type, jsize, jsize, const jdouble *) =
+ array_type<jdouble>::type, jsize, jsize, OPENVRML_JNI_CONST jdouble *) =
&JNIEnv::SetDoubleArrayRegion;
template <typename T>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-17 05:33:26
|
Revision: 3918
http://openvrml.svn.sourceforge.net/openvrml/?rev=3918&view=rev
Author: braden
Date: 2009-06-17 05:33:18 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
Fixed error message to note missing GtkGLExt rather than just GTK+.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-17 05:30:24 UTC (rev 3917)
+++ trunk/ChangeLog 2009-06-17 05:33:18 UTC (rev 3918)
@@ -1,5 +1,10 @@
2009-06-17 Braden McDaniel <br...@en...>
+ * configure.ac: Fixed error message to note missing GtkGLExt
+ rather than just GTK+.
+
+2009-06-17 Braden McDaniel <br...@en...>
+
* configure.ac: Added check for ltdl.h.
2009-06-07 Braden McDaniel <br...@en...>
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-17 05:30:24 UTC (rev 3917)
+++ trunk/configure.ac 2009-06-17 05:33:18 UTC (rev 3918)
@@ -174,7 +174,7 @@
#
PKG_CHECK_MODULES([GTKGL],
[gtkglext-1.0 gtk+-2.0 >= 2.12 gthread-2.0 glib-2.0 >= 2.6], ,
- [have_gtk=no])
+ [have_gtkgl=no])
#
# openvrml-player uses GNOME_PARAM_GOPTION_CONTEXT, which was
# introduced in libgnome 2.14.
@@ -406,8 +406,8 @@
AS_IF([test X$enable_xembed != Xno],
[AS_IF([test X$have_dbus_glib = Xno],
[AC_MSG_FAILURE([D-Bus GLib bindings are required to build the XEmbed control])])
- AS_IF([test X$have_gtk = Xno],
- [AC_MSG_FAILURE([GTK+ is required to build the XEmbed control])])
+ AS_IF([test X$have_gtkgl = Xno],
+ [AC_MSG_FAILURE([GtkGLExt is required to build the XEmbed control])])
AS_IF([test X$enable_gl_renderer = Xno],
[AC_MSG_FAILURE([the XEmbed control cannot be built without the GL renderer])])])
AM_CONDITIONAL([ENABLE_XEMBED], [test X$enable_xembed != Xno])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2009-06-17 05:30:27
|
Revision: 3917
http://openvrml.svn.sourceforge.net/openvrml/?rev=3917&view=rev
Author: braden
Date: 2009-06-17 05:30:24 +0000 (Wed, 17 Jun 2009)
Log Message:
-----------
Added check for ltdl.h.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-07 06:13:31 UTC (rev 3916)
+++ trunk/ChangeLog 2009-06-17 05:30:24 UTC (rev 3917)
@@ -1,3 +1,7 @@
+2009-06-17 Braden McDaniel <br...@en...>
+
+ * configure.ac: Added check for ltdl.h.
+
2009-06-07 Braden McDaniel <br...@en...>
* src/mozilla-plugin/openvrml.cpp
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-06-07 06:13:31 UTC (rev 3916)
+++ trunk/configure.ac 2009-06-17 05:30:24 UTC (rev 3917)
@@ -87,6 +87,7 @@
# Checks for libraries/headers.
#
ACX_PTHREAD(, [AC_MSG_FAILURE([pthread support not found])])
+AC_CHECK_HEADER([ltdl.h], , [AC_MSG_FAILURE([ltdl.h not found])])
AC_CHECK_HEADER([jni.h], [have_jni=yes])
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|