|
From: <br...@us...> - 2009-07-30 08:14:59
|
Revision: 3973
http://openvrml.svn.sourceforge.net/openvrml/?rev=3973&view=rev
Author: braden
Date: 2009-07-30 08:13:59 +0000 (Thu, 30 Jul 2009)
Log Message:
-----------
Fixes for building on windows. Revert change that removed OPENVRML_JAVASCRIPT_API, OPENVRML_JAVASCRIPT_LOCAL, OPENVRML_JAVA_API, OPENVRML_JAVA_LOCAL, OPENVRML_GL_API, and OPENVRML_GL_LOCAL preprocessor definitions. Include Boost headers that appear to be necessary on Windows.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj
trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
trunk/src/libopenvrml/openvrml/event.h
trunk/src/libopenvrml/openvrml/field_value.h
trunk/src/libopenvrml/openvrml/node.h
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-13 08:51:42 UTC (rev 3972)
+++ trunk/ChangeLog 2009-07-30 08:13:59 UTC (rev 3973)
@@ -1,3 +1,36 @@
+2009-07-30 Braden McDaniel <br...@en...>
+
+ Fixes for building on windows. Revert change that removed
+ OPENVRML_JAVASCRIPT_API, OPENVRML_JAVASCRIPT_LOCAL,
+ OPENVRML_JAVA_API, OPENVRML_JAVA_LOCAL, OPENVRML_GL_API, and
+ OPENVRML_GL_LOCAL preprocessor definitions. Include Boost headers
+ that appear to be necessary on Windows.
+
+ * configure.ac: Revert change that removed
+ OPENVRML_JAVASCRIPT_API, OPENVRML_JAVASCRIPT_LOCAL,
+ OPENVRML_JAVA_API, and OPENVRML_JAVA_LOCAL preprocessor
+ definitions.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj:
+ Define preprocessor symbols OPENVRML_JAVASCRIPT_API and
+ OPENVRML_JAVASCRIPT_LOCAL.
+ * ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj:
+ Removed references to obsolete files
+ src/libopenvrml/openvrml/read_write_mutex.{cpp,h}.
+ * src/libopenvrml/openvrml/event.h: Do not apply OPENVRML_API to
+ node_field_value_listener; the Microsoft compiler does not like
+ __declspec(dllimport) applied to class templates.
+ * src/libopenvrml/openvrml/field_value.h: Include
+ <boost/thread/locks.hpp>.
+ * src/libopenvrml/openvrml/node.h: Include
+ <boost/thread/mutex.hpp>.
+ * src/libopenvrml-gl/openvrml/gl/viewer.cpp: Apply
+ OPENVRML_GL_LOCAL.
+ * src/libopenvrml-gl/openvrml/gl/viewer.h: Apply OPENVRML_GL_API.
+ * src/script/java.cpp: Apply OPENVRML_JAVA_API and
+ OPENVRML_JAVA_LOCAL.
+ * src/script/javascript.cpp: Apply OPENVRML_JAVASCRIPT_API and
+ OPENVRML_JAVASCRIPT_LOCAL.
+
2009-07-13 Braden McDaniel <br...@en...>
Apply OPENVRML_API to *_get_type functions for GTK+ widgets.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/configure.ac 2009-07-30 08:13:59 UTC (rev 3973)
@@ -62,10 +62,27 @@
#
OV_CXX_VISIBILITY(
[OPENVRML_API="__attribute__((visibility(\"default\")))"
-OPENVRML_LOCAL="__attribute__((visibility(\"hidden\")))"])
+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\")))"])
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-13 08:51:42 UTC (rev 3972)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/javascript/javascript.vcproj 2009-07-30 08:13:59 UTC (rev 3973)
@@ -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"
+ 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="
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Modified: trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj
===================================================================
--- trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/ide-projects/Windows/VisualC9_0/OpenVRML/openvrml/openvrml.vcproj 2009-07-30 08:13:59 UTC (rev 3973)
@@ -276,10 +276,6 @@
>
</File>
<File
- RelativePath="..\..\..\..\..\src\libopenvrml\openvrml\read_write_mutex.cpp"
- >
- </File>
- <File
RelativePath="..\..\..\..\..\src\libopenvrml\openvrml\rendering_context.cpp"
>
</File>
@@ -401,10 +397,6 @@
>
</File>
<File
- RelativePath="..\..\..\..\..\src\libopenvrml\openvrml\read_write_mutex.h"
- >
- </File>
- <File
RelativePath="..\..\..\..\..\src\libopenvrml\openvrml\rendering_context.h"
>
</File>
Modified: trunk/src/libopenvrml/openvrml/event.h
===================================================================
--- trunk/src/libopenvrml/openvrml/event.h 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/src/libopenvrml/openvrml/event.h 2009-07-30 08:13:59 UTC (rev 3973)
@@ -133,7 +133,7 @@
template <typename FieldValue>
- class OPENVRML_API node_field_value_listener :
+ class node_field_value_listener :
public virtual node_event_listener,
public field_value_listener<FieldValue> {
public:
Modified: trunk/src/libopenvrml/openvrml/field_value.h
===================================================================
--- trunk/src/libopenvrml/openvrml/field_value.h 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/src/libopenvrml/openvrml/field_value.h 2009-07-30 08:13:59 UTC (rev 3973)
@@ -31,6 +31,7 @@
# include <boost/scoped_ptr.hpp>
# include <boost/shared_ptr.hpp>
# include <boost/utility.hpp>
+# include <boost/thread/locks.hpp>
# include <boost/thread/shared_mutex.hpp>
# include <openvrml/basetypes.h>
Modified: trunk/src/libopenvrml/openvrml/node.h
===================================================================
--- trunk/src/libopenvrml/openvrml/node.h 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/src/libopenvrml/openvrml/node.h 2009-07-30 08:13:59 UTC (rev 3973)
@@ -25,6 +25,7 @@
# include <openvrml/field_value.h>
# include <openvrml/rendering_context.h>
# include <boost/bind.hpp>
+# include <boost/thread/mutex.hpp>
# include <deque>
# include <map>
# include <set>
Modified: trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp
===================================================================
--- trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2009-07-13 08:51:42 UTC (rev 3972)
+++ trunk/src/libopenvrml-gl/openvrml/gl/viewer.cpp 2009-07-30 08:13:59 UTC (rev 3973)
@@ -75,12 +75,12 @@
const double inv_pi = 0.31830988618379067154;
template <typename Float>
- OPENVRML_LOCAL inline Float fabs(const Float f)
+ OPENVRML_GL_LOCAL inline Float fabs(const Float f)
{
return f < 0.0 ? -f : f;
}
- struct OPENVRML_LOCAL fequal_t {
+ struct OPENVRML_GL_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_LOCAL gl_capabilities {
+ class OPENVRML_GL_LOCAL gl_capabilities {
public:
GLint max_modelview_stack_depth;
GLint max_texture_size;
@@ -130,7 +130,7 @@
}
- struct OPENVRML_LOCAL vertex_data {
+ struct OPENVRML_GL_LOCAL vertex_data {
GLdouble coord[3];
const openvrml::color * color;
const openvrml::vec3f * normal;
@@ -146,14 +146,14 @@
{}
- struct OPENVRML_LOCAL combined_vertex_data_ {
+ struct OPENVRML_GL_LOCAL combined_vertex_data_ {
openvrml::color color;
openvrml::vec3f normal;
openvrml::vec2f tex_coord;
};
- struct OPENVRML_LOCAL shell_tess_user_data {
+ struct OPENVRML_GL_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_LOCAL ShellData {
+ struct OPENVRML_GL_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_LOCAL const openvrml::vec3f
+ OPENVRML_GL_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_LOCAL float tb_project_to_sphere(float r, float x, float y)
+ OPENVRML_GL_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_LOCAL const openvrml::rotation trackball(float p1x,
- float p1y,
- float p2x,
- float p2y)
+ OPENVRML_GL_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_LOCAL void checkErrors(const std::string & s)
+ OPENVRML_GL_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_LOCAL void computeCylinder(const double height,
- const double radius,
- const int numFacets,
- float (*c)[3],
- float (*tc)[3],
- int * faces)
+ OPENVRML_GL_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_LOCAL const openvrml::vec3f elevationVertexNormal(
+ OPENVRML_GL_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_LOCAL TessExtrusion {
+ struct OPENVRML_GL_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_LOCAL void
+ OPENVRML_GL_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_LOCAL
+ OPENVRML_GL_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_LOCAL
+ OPENVRML_GL_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_LOCAL
+ OPENVRML_GL_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_LOCAL
+ OPENVRML_GL_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_LOCAL
+ OPENVRML_GL_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_LOCAL void
+ OPENVRML_GL_LOCAL void
compute_extrusion_coords_(
const std::vector<openvrml::vec2f> & cross_section,
const std::vector<openvrml::vec3f> & spine,
@@ -2794,9 +2794,9 @@
namespace {
- OPENVRML_LOCAL void computeBounds(size_t npoints,
- const float * points,
- float (&bounds)[6])
+ OPENVRML_GL_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_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_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
{
axes[0] = 0;
axes[1] = 1;
@@ -2848,7 +2848,7 @@
params[3] = float(1.0 / params[3]);
}
- OPENVRML_LOCAL void insertShellConvex(ShellData * const s)
+ OPENVRML_GL_LOCAL void insertShellConvex(ShellData * const s)
{
using openvrml::vec3f;
using openvrml::gl::viewer;
@@ -2951,7 +2951,7 @@
}
}
- OPENVRML_LOCAL void
+ OPENVRML_GL_LOCAL void
insertShellTess(GLUtesselator & tessobj,
const std::vector<vertex_data> & vertices,
const std::vector<openvrml::int32> & coord_index,
@@ -3202,11 +3202,11 @@
namespace {
- OPENVRML_LOCAL void computeSphere(const double radius,
- const int numLatLong,
- float (*c)[3],
- float (*tc)[3],
- int *faces)
+ OPENVRML_GL_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_LOCAL inline bool power_of_2(unsigned long n)
+ OPENVRML_GL_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_LOCAL void computeView(const openvrml::vec3f & position,
- const openvrml::rotation & orientation,
- const float distance,
- openvrml::vec3f & target,
- openvrml::vec3f & up)
+ OPENVRML_GL_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-13 08:51:42 UTC (rev 3972)
+++ trunk/src/libopenvrml-gl/openvrml/gl/viewer.h 2009-07-30 08:13:59 UTC (rev 3973)
@@ -43,7 +43,7 @@
namespace gl {
- class OPENVRML_API viewer : public openvrml::viewer {
+ class OPENVRML_GL_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-13 08:51:42 UTC (rev 3972)
+++ trunk/src/script/java.cpp 2009-07-30 08:13:59 UTC (rev 3973)
@@ -107,18 +107,18 @@
namespace {
- OPENVRML_LOCAL lt_dlhandle libjvm_handle;
- OPENVRML_LOCAL jint (*CreateJavaVM)(JavaVM **, void **, void *);
+ OPENVRML_JAVA_LOCAL lt_dlhandle libjvm_handle;
+ OPENVRML_JAVA_LOCAL jint (*CreateJavaVM)(JavaVM **, void **, void *);
- OPENVRML_LOCAL JavaVM * vm;
+ OPENVRML_JAVA_LOCAL JavaVM * vm;
- OPENVRML_LOCAL class OPENVRML_LOCAL load_libjvm {
+ OPENVRML_JAVA_LOCAL class OPENVRML_JAVA_LOCAL load_libjvm {
public:
load_libjvm();
~load_libjvm();
} load_libjvm_;
- OPENVRML_LOCAL const std::string
+ OPENVRML_JAVA_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_LOCAL script : public openvrml::script {
+ class OPENVRML_JAVA_LOCAL script : public openvrml::script {
friend void JNICALL (::Java_vrml_node_Script_updateField)(
JNIEnv * env,
@@ -245,7 +245,7 @@
};
- class OPENVRML_LOCAL script_factory : public openvrml::script_factory {
+ class OPENVRML_JAVA_LOCAL script_factory : public openvrml::script_factory {
public:
virtual ~script_factory() OPENVRML_NOTHROW;
@@ -257,7 +257,7 @@
} // namespace
-extern "C" OPENVRML_API void
+extern "C" OPENVRML_JAVA_API void
openvrml_script_LTX_register_factory(
openvrml::script_factory_registry & registry)
{
@@ -304,7 +304,7 @@
namespace {
- OPENVRML_LOCAL jint create_java_vm(JavaVM *& vm, JNIEnv *& env)
+ OPENVRML_JAVA_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_LOCAL jobject create_url(JNIEnv & env, const char * const url)
+ OPENVRML_JAVA_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_LOCAL jobject create_class_loader(JNIEnv & env,
+ OPENVRML_JAVA_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_LOCAL jobject
+ OPENVRML_JAVA_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_LOCAL jobject
+ OPENVRML_JAVA_LOCAL jobject
create_Field(JNIEnv & env,
const openvrml::field_value::type_id type,
const bool const_ = false)
@@ -834,7 +834,7 @@
return result;
}
- OPENVRML_LOCAL void
+ OPENVRML_JAVA_LOCAL void
init_script_fields(
JNIEnv & env,
const jclass script_class,
@@ -883,7 +883,7 @@
}
}
- OPENVRML_LOCAL jobject
+ OPENVRML_JAVA_LOCAL jobject
clone_NodeField(JNIEnv & env,
const openvrml::field_value & value)
OPENVRML_THROW1(std::bad_alloc)
@@ -940,7 +940,7 @@
return result;
}
- OPENVRML_LOCAL void
+ OPENVRML_JAVA_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_LOCAL jobject
+ OPENVRML_JAVA_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_LOCAL FieldValue & get_Field_peer(JNIEnv & env,
+ OPENVRML_JAVA_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_LOCAL openvrml::browser &
+ OPENVRML_JAVA_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_LOCAL jobject
+ OPENVRML_JAVA_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_LOCAL jobjectArray
+ OPENVRML_JAVA_LOCAL jobjectArray
create_BaseNode_array(
JNIEnv & env,
std::vector<boost::intrusive_ptr<openvrml::node> > & nodes)
@@ -1892,7 +1892,7 @@
namespace {
- OPENVRML_LOCAL script &
+ OPENVRML_JAVA_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_LOCAL const boost::intrusive_ptr<openvrml::node> &
+ OPENVRML_JAVA_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-13 08:51:42 UTC (rev 3972)
+++ trunk/src/script/javascript.cpp 2009-07-30 08:13:59 UTC (rev 3973)
@@ -44,23 +44,23 @@
class MFNode;
namespace Browser {
- OPENVRML_LOCAL
+ OPENVRML_JAVASCRIPT_LOCAL
JSBool createVrmlFromURL(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL
+ OPENVRML_JAVASCRIPT_LOCAL
JSBool addRoute(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv, jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL
+ OPENVRML_JAVASCRIPT_LOCAL
JSBool deleteRoute(JSContext * cx, JSObject * obj,
uintN argc, jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
}
- class OPENVRML_LOCAL script : public openvrml::script {
+ class OPENVRML_JAVASCRIPT_LOCAL script : public openvrml::script {
friend class SFNode;
friend class MFNode;
@@ -118,7 +118,7 @@
};
- class OPENVRML_LOCAL script_factory : public openvrml::script_factory {
+ class OPENVRML_JAVASCRIPT_LOCAL script_factory : public openvrml::script_factory {
public:
virtual ~script_factory() OPENVRML_NOTHROW;
@@ -129,7 +129,7 @@
};
} // namespace
-extern "C" OPENVRML_API void
+extern "C" OPENVRML_JAVASCRIPT_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_LOCAL bad_conversion : public std::runtime_error {
+ class OPENVRML_JAVASCRIPT_LOCAL bad_conversion : public std::runtime_error {
public:
bad_conversion(const std::string & msg): runtime_error(msg) {}
virtual ~bad_conversion() throw () {}
};
- OPENVRML_LOCAL JSBool floatsToJSArray(size_t numFloats,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool floatsToJSArray(size_t numFloats,
const float * floats,
JSContext * cx, jsval * rval);
- OPENVRML_LOCAL std::auto_ptr<openvrml::field_value>
+ OPENVRML_JAVASCRIPT_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_LOCAL JSBool getName(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool getName(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool getVersion(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool getVersion(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool getCurrentSpeed(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentSpeed(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool getCurrentFrameRate(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool getCurrentFrameRate(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool getWorldURL(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool getWorldURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool replaceWorld(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool replaceWorld(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool createVrmlFromString(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromString(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool createVrmlFromURL(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool createVrmlFromURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool addRoute(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool addRoute(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool deleteRoute(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool deleteRoute(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool loadURL(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool loadURL(JSContext * cx,
JSObject * obj,
uintN argc,
jsval * argv,
jsval * rval)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL JSBool setDescription(JSContext * cx,
+ OPENVRML_JAVASCRIPT_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_LOCAL field_data : boost::noncopyable {
+ class OPENVRML_JAVASCRIPT_LOCAL field_data : boost::noncopyable {
public:
bool changed;
@@ -316,7 +316,7 @@
field_data();
};
- class OPENVRML_LOCAL sfield {
+ class OPENVRML_JAVASCRIPT_LOCAL sfield {
public:
/**
* The sfdata class takes ownership of the field_value and deletes it
@@ -341,7 +341,7 @@
sfield();
};
- class OPENVRML_LOCAL SFColor : public sfield {
+ class OPENVRML_JAVASCRIPT_LOCAL SFColor : public sfield {
public:
static JSClass jsclass;
@@ -373,7 +373,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL SFImage : public sfield {
+ class OPENVRML_JAVASCRIPT_LOCAL SFImage : public sfield {
public:
static JSClass jsclass;
@@ -400,7 +400,7 @@
jsval * vp) OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL SFNode : public sfield {
+ class OPENVRML_JAVASCRIPT_LOCAL SFNode : public sfield {
public:
static JSClass jsclass;
static JSClass direct_output_jsclass;
@@ -428,7 +428,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL SFRotation : public sfield {
+ class OPENVRML_JAVASCRIPT_LOCAL SFRotation : public sfield {
public:
static JSClass jsclass;
@@ -517,7 +517,7 @@
OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL SFVec2f : public sfvec2_jsobject<SFVec2f> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL SFVec2d : public sfvec2_jsobject<SFVec2f> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL SFVec3f : public sfvec3_jsobject<SFVec3f> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL SFVec3d : public sfvec3_jsobject<SFVec3d> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MField {
+ class OPENVRML_JAVASCRIPT_LOCAL MField {
public:
typedef std::vector<jsval> JsvalArray;
@@ -653,7 +653,7 @@
* SFVec2f, SFVec3f.
*/
template <typename Subclass>
- class OPENVRML_LOCAL MFJSObject : public MField {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFJSDouble : public MField {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFBool : public MField {
+ class OPENVRML_JAVASCRIPT_LOCAL MFBool : public MField {
public:
static JSClass jsclass;
@@ -731,7 +731,7 @@
static void finalize(JSContext * cx, JSObject * obj);
};
- class OPENVRML_LOCAL MFColor : public MFJSObject<MFColor> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFFloat : public MFJSDouble<MFFloat> {
+ class OPENVRML_JAVASCRIPT_LOCAL MFFloat : public MFJSDouble<MFFloat> {
public:
static JSClass jsclass;
@@ -768,7 +768,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_LOCAL MFInt32 : public MField {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFNode : public MField {
+ class OPENVRML_JAVASCRIPT_LOCAL MFNode : public MField {
public:
static JSClass jsclass;
@@ -829,7 +829,7 @@
static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL MFRotation : public MFJSObject<MFRotation> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFString : public MField {
+ class OPENVRML_JAVASCRIPT_LOCAL MFString : public MField {
public:
static JSClass jsclass;
@@ -872,7 +872,7 @@
static void finalize(JSContext * cx, JSObject * obj) OPENVRML_NOTHROW;
};
- class OPENVRML_LOCAL MFTime : public MFJSDouble<MFTime> {
+ class OPENVRML_JAVASCRIPT_LOCAL MFTime : public MFJSDouble<MFTime> {
public:
static JSClass jsclass;
@@ -884,7 +884,7 @@
OPENVRML_THROW2(bad_conversion, std::bad_alloc);
};
- class OPENVRML_LOCAL MFVec2f : public MFJSObject<MFVec2f> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL MFVec3f : public MFJSObject<MFVec3f> {
+ class OPENVRML_JAVASCRIPT_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_LOCAL VrmlMatrix {
+ class OPENVRML_JAVASCRIPT_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_LOCAL JSBool eventOut_setProperty(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL JSBool eventOut_setProperty(JSContext * cx,
JSObject * obj,
jsval id,
jsval * val)
OPENVRML_NOTHROW;
- OPENVRML_LOCAL void errorReporter(JSContext * cx,
+ OPENVRML_JAVASCRIPT_LOCAL void errorReporter(JSContext * cx,
const char * message,
JSErrorReport * report);
@@ -3627,7 +3627,7 @@
return initObject(cx, obj, rot);
}
- OPENVRML_LOCAL bool normalized(const openvrml::vec3f & v)
+ OPENVRML_JAVASCRIPT_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.
|