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: Braden M. <br...@us...> - 2006-02-20 04:42:30
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12808 Modified Files: ChangeLog Log Message: The Microsoft C/C++ compiler 14.0 seems picky about requiring the OPENVRML_API macro in the friend declaration of operator<<. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1143 retrieving revision 1.1144 diff -C2 -d -r1.1143 -r1.1144 *** ChangeLog 20 Feb 2006 04:37:28 -0000 1.1143 --- ChangeLog 20 Feb 2006 04:42:27 -0000 1.1144 *************** *** 1,4 **** --- 1,11 ---- 2006-02-19 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/field_value.h + (openvrml::field_value): The Microsoft C/C++ compiler 14.0 seems + picky about requiring the OPENVRML_API macro in the friend + declaration of operator<<. + + 2006-02-19 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/basetypes.h (openvrml::vec3f): Added missing OPENVRML_API. |
From: Braden M. <br...@us...> - 2006-02-20 04:37:32
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10938/src/libopenvrml/openvrml Modified Files: basetypes.h Log Message: Added missing OPENVRML_API. Index: basetypes.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** basetypes.h 17 Feb 2006 23:37:30 -0000 1.22 --- basetypes.h 20 Feb 2006 04:37:28 -0000 1.23 *************** *** 359,363 **** class mat4f; ! class vec3f { float vec[3]; --- 359,363 ---- class mat4f; ! class OPENVRML_API vec3f { float vec[3]; *************** *** 470,474 **** ! class vec3d { double vec[3]; --- 470,474 ---- ! class OPENVRML_API vec3d { double vec[3]; |
From: Braden M. <br...@us...> - 2006-02-20 04:37:31
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10938 Modified Files: ChangeLog Log Message: Added missing OPENVRML_API. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1142 retrieving revision 1.1143 diff -C2 -d -r1.1142 -r1.1143 *** ChangeLog 20 Feb 2006 03:39:46 -0000 1.1142 --- ChangeLog 20 Feb 2006 04:37:28 -0000 1.1143 *************** *** 1,4 **** --- 1,10 ---- 2006-02-19 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/basetypes.h + (openvrml::vec3f): Added missing OPENVRML_API. + (openvrml::vec3d): Added missing OPENVRML_API. + + 2006-02-19 Braden McDaniel <br...@en...> + Added member functions to return the root scope from openvrml::browser and openvrml::scene. |
From: Braden M. <br...@us...> - 2006-02-20 03:39:55
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20513/src/libopenvrml/openvrml Modified Files: browser.cpp browser.h Log Message: Added member functions to return the root scope from openvrml::browser and openvrml::scene. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** browser.cpp 15 Feb 2006 08:32:32 -0000 1.128 --- browser.cpp 20 Feb 2006 03:39:46 -0000 1.129 *************** *** 7575,7578 **** --- 7575,7590 ---- /** + * @brief Get the root scope. + * + * @return the root scope. + */ + const openvrml::scope * openvrml::browser::root_scope() const OPENVRML_NOTHROW + { + boost::recursive_mutex::scoped_lock lock(this->mutex_); + assert(this->scene_); + return this->scene_->root_scope(); + } + + /** * @brief Get the path to a node in the scene graph. * *************** *** 9155,9158 **** --- 9167,9184 ---- /** + * @brief Get the root scope. + * + * @return the root scope. + */ + const openvrml::scope * openvrml::scene::root_scope() const + OPENVRML_NOTHROW + { + boost::recursive_mutex::scoped_lock lock(this->nodes_mutex_); + return this->nodes_.empty() + ? 0 + : &this->nodes_.front()->scope(); + } + + /** * @brief Get the absolute URI for the scene. * Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** browser.h 12 Feb 2006 09:40:17 -0000 1.43 --- browser.h 20 Feb 2006 03:39:46 -0000 1.44 *************** *** 282,285 **** --- 282,286 ---- const std::vector<boost::intrusive_ptr<node> > & root_nodes() const OPENVRML_NOTHROW; + const scope * root_scope() const OPENVRML_NOTHROW; const node_path find_node(const node & n) const OPENVRML_THROW1(std::bad_alloc); *************** *** 393,396 **** --- 394,398 ---- void nodes(const std::vector<boost::intrusive_ptr<node> > & n) OPENVRML_THROW1(std::bad_alloc); + const scope * root_scope() const OPENVRML_NOTHROW; const std::string url() const OPENVRML_THROW1(std::bad_alloc); void render(openvrml::viewer & viewer, rendering_context context); *************** *** 406,409 **** --- 408,413 ---- virtual void scene_loaded(); }; + + OPENVRML_API const scope * root_scope(const scene & s) OPENVRML_NOTHROW; } |
From: Braden M. <br...@us...> - 2006-02-20 03:39:51
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20513 Modified Files: ChangeLog Log Message: Added member functions to return the root scope from openvrml::browser and openvrml::scene. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1141 retrieving revision 1.1142 diff -C2 -d -r1.1141 -r1.1142 *** ChangeLog 20 Feb 2006 02:23:43 -0000 1.1141 --- ChangeLog 20 Feb 2006 03:39:46 -0000 1.1142 *************** *** 1,4 **** --- 1,18 ---- 2006-02-19 Braden McDaniel <br...@en...> + Added member functions to return the root scope from + openvrml::browser and openvrml::scene. + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::root_scope() const): Added function. Return + the root scope. + (openvrml::scene::root_scope() const): Added function. Return + the root scope. + * src/libopenvrml/openvrml/browser.h + (openvrml::browser): Added member function root_scope. + (openvrml::scene): Added member function root_scope. + + 2006-02-19 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/node.h (openvrml::node::scope() const): Return a reference to a const |
From: Braden M. <br...@us...> - 2006-02-20 02:23:50
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21352/src/libopenvrml/openvrml Modified Files: node.h Log Message: Return a reference to a const scope. Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** node.h 12 Feb 2006 09:40:17 -0000 1.48 --- node.h 20 Feb 2006 02:23:43 -0000 1.49 *************** *** 435,439 **** void id(const std::string & node_id) OPENVRML_THROW1(std::bad_alloc); ! openvrml::scope & scope() const OPENVRML_NOTHROW; openvrml::scene * scene() const OPENVRML_NOTHROW; --- 435,439 ---- void id(const std::string & node_id) OPENVRML_THROW1(std::bad_alloc); ! const openvrml::scope & scope() const OPENVRML_NOTHROW; openvrml::scene * scene() const OPENVRML_NOTHROW; *************** *** 482,486 **** private: ! virtual void do_initialize(double timestamp) OPENVRML_THROW1(std::bad_alloc); virtual const field_value & do_field(const std::string & id) const OPENVRML_THROW1(unsupported_interface) = 0; --- 482,487 ---- private: ! virtual void do_initialize(double timestamp) ! OPENVRML_THROW1(std::bad_alloc); virtual const field_value & do_field(const std::string & id) const OPENVRML_THROW1(unsupported_interface) = 0; *************** *** 555,559 **** } ! inline scope & node::scope() const OPENVRML_NOTHROW { assert(this->scope_); --- 556,560 ---- } ! inline const scope & node::scope() const OPENVRML_NOTHROW { assert(this->scope_); |
From: Braden M. <br...@us...> - 2006-02-20 02:23:47
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21352 Modified Files: ChangeLog Log Message: Return a reference to a const scope. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1140 retrieving revision 1.1141 diff -C2 -d -r1.1140 -r1.1141 *** ChangeLog 18 Feb 2006 05:41:57 -0000 1.1140 --- ChangeLog 20 Feb 2006 02:23:43 -0000 1.1141 *************** *** 1,2 **** --- 1,8 ---- + 2006-02-19 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/node.h + (openvrml::node::scope() const): Return a reference to a const + scope. + 2006-02-18 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-02-18 05:42:04
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5393 Modified Files: ChangeLog Log Message: Forward declare field_value types to avoid depencency on <openvrml/field_value.h>. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1139 retrieving revision 1.1140 diff -C2 -d -r1.1139 -r1.1140 *** ChangeLog 17 Feb 2006 23:37:30 -0000 1.1139 --- ChangeLog 18 Feb 2006 05:41:57 -0000 1.1140 *************** *** 1,2 **** --- 1,7 ---- + 2006-02-18 Braden McDaniel <br...@en...> + + * src/libopenvrml/private.h: Forward declare field_value types to + avoid depencency on <openvrml/field_value.h>. + 2006-02-17 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-02-18 05:42:04
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5393/src/libopenvrml Modified Files: private.h Log Message: Forward declare field_value types to avoid depencency on <openvrml/field_value.h>. Index: private.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/private.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** private.h 12 Dec 2005 04:16:18 -0000 1.9 --- private.h 18 Feb 2006 05:41:57 -0000 1.10 *************** *** 67,71 **** # include <boost/concept_check.hpp> # include <boost/mpl/vector.hpp> ! # include <openvrml/field_value.h> namespace { --- 67,103 ---- # include <boost/concept_check.hpp> # include <boost/mpl/vector.hpp> ! ! namespace openvrml { ! class sfbool; ! class sfcolor; ! class sfcolorrgba; ! class sfdouble; ! class sffloat; ! class sfimage; ! class sfint32; ! class sfnode; ! class sfrotation; ! class sfstring; ! class sftime; ! class sfvec2d; ! class sfvec2f; ! class sfvec3d; ! class sfvec3f; ! class mfbool; ! class mfcolor; ! class mfcolorrgba; ! class mfdouble; ! class mffloat; ! class mfimage; ! class mfint32; ! class mfnode; ! class mfrotation; ! class mfstring; ! class mftime; ! class mfvec2d; ! class mfvec2f; ! class mfvec3d; ! class mfvec3f; ! } namespace { |
From: Braden M. <br...@us...> - 2006-02-17 23:37:35
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30868/src/libopenvrml/openvrml Modified Files: basetypes.h basetypes.cpp Log Message: Define openvrml::vec2f, openvrml::vec2d, openvrml::vec3f, and openvrml::vec3d as classes rather than class template instances. The approach of keeping the function template definitions in the implementations and providing explicit template instantiations plays poorly with gcc's symbol visibility (and culling) machinery. Index: basetypes.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** basetypes.cpp 12 Feb 2006 09:40:17 -0000 1.29 --- basetypes.cpp 17 Feb 2006 23:37:30 -0000 1.30 *************** *** 509,513 **** /** ! * @class openvrml::vec2 * * @ingroup basetypes --- 509,513 ---- /** ! * @class openvrml::vec2f * [...2207 lines suppressed...] + { + return !(lhs == rhs); + } + + /** + * @relatesalso openvrml::vec3d + * + * @brief Stream output. + * + * @param out output stream. + * @param v a 3-component vector. + * + * @return @p out. + */ + std::ostream & openvrml::operator<<(std::ostream & out, const vec3d & v) + { + return out << v.x() << ' ' << v.y() << ' ' << v.z(); + } Index: basetypes.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/basetypes.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** basetypes.h 12 Feb 2006 09:40:17 -0000 1.21 --- basetypes.h 17 Feb 2006 23:37:30 -0000 1.22 *************** *** 189,240 **** ! template<typename T> ! class OPENVRML_API vec2 { ! T vec[2]; public: ! vec2() OPENVRML_NOTHROW; ! explicit vec2(const T (&vec)[2]) OPENVRML_NOTHROW; ! explicit vec2(T x, T y) OPENVRML_NOTHROW; ! vec2<T> & operator*=(T scalar) OPENVRML_NOTHROW; ! vec2<T> & operator/=(T scalar) OPENVRML_NOTHROW; ! vec2<T> & operator+=(const vec2<T> & vec) OPENVRML_NOTHROW; ! vec2<T> & operator-=(const vec2<T> & vec) OPENVRML_NOTHROW; ! const vec2<T> operator-() const OPENVRML_NOTHROW; ! const vec2<T> operator*(T rhs) const OPENVRML_NOTHROW; ! const vec2<T> operator/(T rhs) const OPENVRML_NOTHROW; ! const vec2<T> operator+(const vec2<T> & rhs) const OPENVRML_NOTHROW; ! const vec2<T> operator-(const vec2<T> & rhs) const OPENVRML_NOTHROW; ! bool operator==(const vec2<T> & rhs) const OPENVRML_NOTHROW; ! bool operator!=(const vec2<T> & rhs) const OPENVRML_NOTHROW; ! const T & operator[](size_t index) const OPENVRML_NOTHROW; ! T x() const OPENVRML_NOTHROW; ! T y() const OPENVRML_NOTHROW; ! void x(T value) OPENVRML_NOTHROW; ! void y(T value) OPENVRML_NOTHROW; ! T dot(const vec2<T> & vec) const OPENVRML_NOTHROW; ! T length() const OPENVRML_NOTHROW; ! const vec2<T> normalize() const OPENVRML_NOTHROW; }; ! OPENVRML_API const vec2<float> operator*(float lhs, ! const vec2<float> & rhs) OPENVRML_NOTHROW; ! OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec2<float> & v); ! OPENVRML_API const vec2<double> operator*(double lhs, ! const vec2<double> & rhs) OPENVRML_NOTHROW; OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec2<double> & v); ! template<typename T> ! inline const T & vec2<T>::operator[](const size_t index) const OPENVRML_NOTHROW { assert(index < 2); --- 189,240 ---- ! class OPENVRML_API vec2f { ! float vec[2]; public: ! vec2f() OPENVRML_NOTHROW; ! explicit vec2f(const float (&vec)[2]) OPENVRML_NOTHROW; ! vec2f(float x, float y) OPENVRML_NOTHROW; ! vec2f & operator*=(float scalar) OPENVRML_NOTHROW; ! vec2f & operator/=(float scalar) OPENVRML_NOTHROW; ! vec2f & operator+=(const vec2f & vec) OPENVRML_NOTHROW; ! vec2f & operator-=(const vec2f & vec) OPENVRML_NOTHROW; ! const vec2f operator-() const OPENVRML_NOTHROW; ! const float & operator[](size_t index) const OPENVRML_NOTHROW; ! float x() const OPENVRML_NOTHROW; ! void x(float value) OPENVRML_NOTHROW; ! float y() const OPENVRML_NOTHROW; ! void y(float value) OPENVRML_NOTHROW; ! float dot(const vec2f & vec) const OPENVRML_NOTHROW; ! float length() const OPENVRML_NOTHROW; ! const vec2f normalize() const OPENVRML_NOTHROW; }; ! OPENVRML_API const vec2f operator*(const vec2f & lhs, float rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec2f operator*(float lhs, const vec2f & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2f operator/(const vec2f & lhs, float rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2f operator+(const vec2f & lhs, const vec2f & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2f operator-(const vec2f & lhs, const vec2f & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator==(const vec2f & lhs, const vec2f & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator!=(const vec2f & lhs, const vec2f & rhs) OPENVRML_NOTHROW; + OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec2f & v); ! inline const float & vec2f::operator[](const size_t index) const ! OPENVRML_NOTHROW { assert(index < 2); *************** *** 242,259 **** } ! template<typename T> ! inline T vec2<T>::x() const OPENVRML_NOTHROW { return this->vec[0]; } ! template<typename T> ! inline T vec2<T>::y() const OPENVRML_NOTHROW { return this->vec[1]; } ! template<typename T> ! inline void vec2<T>::x(const T value) OPENVRML_NOTHROW { // --- 242,256 ---- } ! inline float vec2f::x() const OPENVRML_NOTHROW { return this->vec[0]; } ! inline float vec2f::y() const OPENVRML_NOTHROW { return this->vec[1]; } ! inline void vec2f::x(const float value) OPENVRML_NOTHROW { // *************** *** 265,270 **** } ! template<typename T> ! inline void vec2<T>::y(const T value) OPENVRML_NOTHROW { // --- 262,266 ---- } ! inline void vec2f::y(const float value) OPENVRML_NOTHROW { // *************** *** 276,346 **** } ! typedef vec2<float> vec2f; ! typedef vec2<double> vec2d; class mat4f; ! template<typename T> ! class OPENVRML_API vec3 { ! T vec[3]; public: ! vec3() OPENVRML_NOTHROW; ! explicit vec3(const T (&vec)[3]) OPENVRML_NOTHROW; ! vec3(T x, T y, T z) OPENVRML_NOTHROW; ! vec3<T> & operator*=(const vec3<T> & vec) OPENVRML_NOTHROW; ! vec3<T> & operator*=(const mat4f & mat) OPENVRML_NOTHROW; ! vec3<T> & operator*=(T scalar) OPENVRML_NOTHROW; ! vec3<T> & operator/=(T scalar) OPENVRML_NOTHROW; ! vec3<T> & operator+=(const vec3<T> & vec) OPENVRML_NOTHROW; ! vec3<T> & operator-=(const vec3<T> & vec) OPENVRML_NOTHROW; ! const vec3<T> operator-() const OPENVRML_NOTHROW; ! const vec3<T> operator*(const vec3<T> & rhs) const OPENVRML_NOTHROW; ! const vec3<T> operator*(const T rhs) const OPENVRML_NOTHROW; ! const vec3<T> operator*(const mat4f & mat) const OPENVRML_NOTHROW; ! const vec3<T> operator/(const T rhs) const OPENVRML_NOTHROW; ! const vec3<T> operator+(const vec3<T> & rhs) const OPENVRML_NOTHROW; ! const vec3<T> operator-(const vec3<T> & rhs) const OPENVRML_NOTHROW; ! bool operator==(const vec3<T> & rhs) const OPENVRML_NOTHROW; ! bool operator!=(const vec3<T> & rhs) const OPENVRML_NOTHROW; ! const T & operator[](size_t index) const OPENVRML_NOTHROW; ! T x() const OPENVRML_NOTHROW; ! T y() const OPENVRML_NOTHROW; ! T z() const OPENVRML_NOTHROW; ! void x(T value) OPENVRML_NOTHROW; ! void y(T value) OPENVRML_NOTHROW; ! void z(T value) OPENVRML_NOTHROW; ! T dot(const vec3<T> & vec) const OPENVRML_NOTHROW; ! T length() const OPENVRML_NOTHROW; ! const vec3<T> normalize() const OPENVRML_NOTHROW; }; ! OPENVRML_API const vec3<float> operator*(const float lhs, ! const vec3<float> & rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec3<float> operator*(const mat4f & mat, ! const vec3<float> & vec) OPENVRML_NOTHROW; ! OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec3<float> & v); ! OPENVRML_API const vec3<double> operator*(const double lhs, ! const vec3<double> & rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec3<double> operator*(const mat4f & mat, ! const vec3<double> & vec) OPENVRML_NOTHROW; OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec3<double> & v); ! template<typename T> ! inline const T & vec3<T>::operator[](const size_t index) const OPENVRML_NOTHROW { --- 272,421 ---- } ! ! class OPENVRML_API vec2d { ! double vec[2]; ! ! public: ! vec2d() OPENVRML_NOTHROW; ! explicit vec2d(const double (&vec)[2]) OPENVRML_NOTHROW; ! vec2d(double x, double y) OPENVRML_NOTHROW; ! ! vec2d & operator*=(double scalar) OPENVRML_NOTHROW; ! vec2d & operator/=(double scalar) OPENVRML_NOTHROW; ! vec2d & operator+=(const vec2d & vec) OPENVRML_NOTHROW; ! vec2d & operator-=(const vec2d & vec) OPENVRML_NOTHROW; ! ! const vec2d operator-() const OPENVRML_NOTHROW; ! ! const double & operator[](size_t index) const OPENVRML_NOTHROW; ! ! double x() const OPENVRML_NOTHROW; ! void x(double value) OPENVRML_NOTHROW; ! ! double y() const OPENVRML_NOTHROW; ! void y(double value) OPENVRML_NOTHROW; ! ! double dot(const vec2d & vec) const OPENVRML_NOTHROW; ! double length() const OPENVRML_NOTHROW; ! const vec2d normalize() const OPENVRML_NOTHROW; ! }; ! ! OPENVRML_API const vec2d operator*(const vec2d & lhs, double rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2d operator*(double lhs, const vec2d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2d operator/(const vec2d & lhs, double rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2d operator+(const vec2d & lhs, const vec2d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec2d operator-(const vec2d & lhs, const vec2d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator==(const vec2d & lhs, const vec2d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator!=(const vec2d & lhs, const vec2d & rhs) ! OPENVRML_NOTHROW; ! ! OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec2d & v); ! ! inline const double & vec2d::operator[](const size_t index) const ! OPENVRML_NOTHROW ! { ! assert(index < 2); ! return this->vec[index]; ! } ! ! inline double vec2d::x() const OPENVRML_NOTHROW ! { ! return this->vec[0]; ! } ! ! inline double vec2d::y() const OPENVRML_NOTHROW ! { ! return this->vec[1]; ! } ! ! inline void vec2d::x(const double value) OPENVRML_NOTHROW ! { ! // ! // Ensure value is not NaN. ! // ! assert(value == value); ! ! this->vec[0] = value; ! } ! ! inline void vec2d::y(const double value) OPENVRML_NOTHROW ! { ! // ! // Ensure value is not NaN. ! // ! assert(value == value); ! ! this->vec[1] = value; ! } class mat4f; ! class vec3f { ! float vec[3]; public: ! vec3f() OPENVRML_NOTHROW; ! explicit vec3f(const float (&vec)[3]) OPENVRML_NOTHROW; ! vec3f(float x, float y, float z) OPENVRML_NOTHROW; ! vec3f & operator*=(const vec3f & vec) OPENVRML_NOTHROW; ! vec3f & operator*=(const mat4f & mat) OPENVRML_NOTHROW; ! vec3f & operator*=(float scalar) OPENVRML_NOTHROW; ! vec3f & operator/=(float scalar) OPENVRML_NOTHROW; ! vec3f & operator+=(const vec3f & vec) OPENVRML_NOTHROW; ! vec3f & operator-=(const vec3f & vec) OPENVRML_NOTHROW; ! const vec3f operator-() const OPENVRML_NOTHROW; ! const float & operator[](size_t index) const OPENVRML_NOTHROW; ! float x() const OPENVRML_NOTHROW; ! void x(float value) OPENVRML_NOTHROW; ! float y() const OPENVRML_NOTHROW; ! void y(float value) OPENVRML_NOTHROW; ! float z() const OPENVRML_NOTHROW; ! void z(float value) OPENVRML_NOTHROW; ! ! float dot(const vec3f & vec) const OPENVRML_NOTHROW; ! float length() const OPENVRML_NOTHROW; ! const vec3f normalize() const OPENVRML_NOTHROW; }; ! OPENVRML_API const vec3f operator*(const vec3f & lhs, const vec3f & rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator*(const vec3f & lhs, float rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator*(float lhs, const vec3f & rhs) OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator*(const vec3f & lhs, const mat4f & mat) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator*(const mat4f & mat, const vec3f & vec) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator/(const vec3f & lhs, float rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3f operator+(const vec3f & lhs, const vec3f & rhs) OPENVRML_NOTHROW; + OPENVRML_API const vec3f operator-(const vec3f & lhs, const vec3f & rhs) + OPENVRML_NOTHROW; + OPENVRML_API bool operator==(const vec3f & lhs, const vec3f & rhs) + OPENVRML_NOTHROW; + OPENVRML_API bool operator!=(const vec3f & lhs, const vec3f & rhs) + OPENVRML_NOTHROW; + OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec3f & v); ! inline const float & vec3f::operator[](const size_t index) const OPENVRML_NOTHROW { *************** *** 349,372 **** } ! template<typename T> ! inline T vec3<T>::x() const OPENVRML_NOTHROW { return this->vec[0]; } ! template<typename T> ! inline T vec3<T>::y() const OPENVRML_NOTHROW { return this->vec[1]; } ! template<typename T> ! inline T vec3<T>::z() const OPENVRML_NOTHROW { return this->vec[2]; } ! template<typename T> ! inline void vec3<T>::x(const T value) OPENVRML_NOTHROW { // --- 424,443 ---- } ! inline float vec3f::x() const OPENVRML_NOTHROW { return this->vec[0]; } ! inline float vec3f::y() const OPENVRML_NOTHROW { return this->vec[1]; } ! inline float vec3f::z() const OPENVRML_NOTHROW { return this->vec[2]; } ! inline void vec3f::x(const float value) OPENVRML_NOTHROW { // *************** *** 378,383 **** } ! template<typename T> ! inline void vec3<T>::y(const T value) OPENVRML_NOTHROW { // --- 449,453 ---- } ! inline void vec3f::y(const float value) OPENVRML_NOTHROW { // *************** *** 389,394 **** } ! template<typename T> ! inline void vec3<T>::z(const T value) OPENVRML_NOTHROW { // --- 459,463 ---- } ! inline void vec3f::z(const float value) OPENVRML_NOTHROW { // *************** *** 400,405 **** } ! typedef vec3<float> vec3f; ! typedef vec3<double> vec3d; --- 469,582 ---- } ! ! class vec3d { ! double vec[3]; ! ! public: ! vec3d() OPENVRML_NOTHROW; ! explicit vec3d(const double (&vec)[3]) OPENVRML_NOTHROW; ! vec3d(double x, double y, double z) OPENVRML_NOTHROW; ! ! vec3d & operator*=(const vec3d & vec) OPENVRML_NOTHROW; ! vec3d & operator*=(const mat4f & mat) OPENVRML_NOTHROW; ! vec3d & operator*=(double scalar) OPENVRML_NOTHROW; ! vec3d & operator/=(double scalar) OPENVRML_NOTHROW; ! vec3d & operator+=(const vec3d & vec) OPENVRML_NOTHROW; ! vec3d & operator-=(const vec3d & vec) OPENVRML_NOTHROW; ! ! const vec3d operator-() const OPENVRML_NOTHROW; ! ! const double & operator[](size_t index) const OPENVRML_NOTHROW; ! ! double x() const OPENVRML_NOTHROW; ! void x(double value) OPENVRML_NOTHROW; ! ! double y() const OPENVRML_NOTHROW; ! void y(double value) OPENVRML_NOTHROW; ! ! double z() const OPENVRML_NOTHROW; ! void z(double value) OPENVRML_NOTHROW; ! ! double dot(const vec3d & vec) const OPENVRML_NOTHROW; ! double length() const OPENVRML_NOTHROW; ! const vec3d normalize() const OPENVRML_NOTHROW; ! }; ! ! OPENVRML_API const vec3d operator*(const vec3d & lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator*(const vec3d & lhs, double rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator*(double lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator*(const vec3d & lhs, const mat4f & mat) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator*(const mat4f & mat, const vec3d & vec) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator/(const vec3d & lhs, double rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator+(const vec3d & lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API const vec3d operator-(const vec3d & lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator==(const vec3d & lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! OPENVRML_API bool operator!=(const vec3d & lhs, const vec3d & rhs) ! OPENVRML_NOTHROW; ! ! OPENVRML_API std::ostream & operator<<(std::ostream & out, ! const vec3d & v); ! ! ! inline const double & vec3d::operator[](const size_t index) const ! OPENVRML_NOTHROW ! { ! assert(index < 3); ! return this->vec[index]; ! } ! ! inline double vec3d::x() const OPENVRML_NOTHROW ! { ! return this->vec[0]; ! } ! ! inline double vec3d::y() const OPENVRML_NOTHROW ! { ! return this->vec[1]; ! } ! ! inline double vec3d::z() const OPENVRML_NOTHROW ! { ! return this->vec[2]; ! } ! ! inline void vec3d::x(const double value) OPENVRML_NOTHROW ! { ! // ! // Ensure value is not NaN. ! // ! assert(value == value); ! ! this->vec[0] = value; ! } ! ! inline void vec3d::y(const double value) OPENVRML_NOTHROW ! { ! // ! // Ensure value is not NaN. ! // ! assert(value == value); ! ! this->vec[1] = value; ! } ! ! inline void vec3d::z(const double value) OPENVRML_NOTHROW ! { ! // ! // Ensure value is not NaN. ! // ! assert(value == value); ! ! this->vec[2] = value; ! } |
From: Braden M. <br...@us...> - 2006-02-17 23:37:35
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30868 Modified Files: ChangeLog Log Message: Define openvrml::vec2f, openvrml::vec2d, openvrml::vec3f, and openvrml::vec3d as classes rather than class template instances. The approach of keeping the function template definitions in the implementations and providing explicit template instantiations plays poorly with gcc's symbol visibility (and culling) machinery. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1138 retrieving revision 1.1139 diff -C2 -d -r1.1138 -r1.1139 *** ChangeLog 17 Feb 2006 06:25:16 -0000 1.1138 --- ChangeLog 17 Feb 2006 23:37:30 -0000 1.1139 *************** *** 1,4 **** --- 1,15 ---- 2006-02-17 Braden McDaniel <br...@en...> + Define openvrml::vec2f, openvrml::vec2d, openvrml::vec3f, and + openvrml::vec3d as classes rather than class template instances. + The approach of keeping the function template definitions in the + implementations and providing explicit template instantiations + plays poorly with gcc's symbol visibility (and culling) machinery. + + * src/libopenvrml/openvrml/basetypes.cpp + * src/libopenvrml/openvrml/basetypes.h + + 2006-02-17 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/vrml97node.cpp (text_node::update_face()): Moved FontconfigError and |
From: Braden M. <br...@us...> - 2006-02-17 06:25:20
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5763/src/libopenvrml/openvrml Modified Files: vrml97node.cpp Log Message: Moved FontconfigError and FreeTypeError exception classes out of the function so that they can be template parameters; that is, so they can be used with boost::ignore_unused_variable_warning. Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** vrml97node.cpp 12 Feb 2006 09:40:17 -0000 1.96 --- vrml97node.cpp 17 Feb 2006 06:25:16 -0000 1.97 *************** *** 22358,22361 **** --- 22358,22400 ---- # endif // OPENVRML_ENABLE_RENDER_TEXT_NODE + # ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE + + const char * const fcResultMessage[] = { "match", + "no match", + "type mismatch", + "no id" }; + + // + // FontconfigError and FreeTypeError are never thrown out of the library. + // + + class OPENVRML_LOCAL FontconfigError : public std::runtime_error { + public: + explicit FontconfigError(const FcResult result): + std::runtime_error(fcResultMessage[result]) + {} + + virtual ~FontconfigError() OPENVRML_NOTHROW + {} + }; + + class OPENVRML_LOCAL FreeTypeError : public std::runtime_error { + public: + // + // The normal build of FreeType doesn't include a means of mapping + // error codes to human-readable strings. There's a means of + // letting client apps do this by defining some macros, but that's + // too much trouble for now. + // + explicit FreeTypeError(FT_Error): + std::runtime_error("FreeType error") + {} + + virtual ~FreeTypeError() OPENVRML_NOTHROW + {} + }; + + # endif // OPENVRML_ENABLE_RENDER_TEXT_NODE + /** * @brief Called when @a fontStyle changes to update the font face. *************** *** 22366,22400 **** { # ifdef OPENVRML_ENABLE_RENDER_TEXT_NODE - static const char * const fcResultMessage[] = { "match", - "no match", - "type mismatch", - "no id" }; - - class FontconfigError : public std::runtime_error { - public: - explicit FontconfigError(const FcResult result): - std::runtime_error(fcResultMessage[result]) - {} - - virtual ~FontconfigError() OPENVRML_NOTHROW - {} - }; - - class FreeTypeError : public std::runtime_error { - public: - // - // The normal build of FreeType doesn't include a means of mapping - // error codes to human-readable strings. There's a means of - // letting client apps do this by defining some macros, but that's - // too much trouble for now. - // - explicit FreeTypeError(FT_Error): - std::runtime_error("FreeType error") - {} - - virtual ~FreeTypeError() OPENVRML_NOTHROW - {} - }; - using std::string; typedef std::basic_string<FcChar8, FcChar8_traits> FcChar8_string; --- 22405,22408 ---- |
From: Braden M. <br...@us...> - 2006-02-17 06:25:20
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5763 Modified Files: ChangeLog Log Message: Moved FontconfigError and FreeTypeError exception classes out of the function so that they can be template parameters; that is, so they can be used with boost::ignore_unused_variable_warning. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1137 retrieving revision 1.1138 diff -C2 -d -r1.1137 -r1.1138 *** ChangeLog 17 Feb 2006 03:40:08 -0000 1.1137 --- ChangeLog 17 Feb 2006 06:25:16 -0000 1.1138 *************** *** 1,2 **** --- 1,10 ---- + 2006-02-17 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/vrml97node.cpp + (text_node::update_face()): Moved FontconfigError and + FreeTypeError exception classes out of the function so that they + can be template parameters; that is, so they can be used with + boost::ignore_unused_variable_warning. + 2006-02-16 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-02-17 03:40:17
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30081 Modified Files: ChangeLog configure.ac Log Message: Require automake 1.9 (for tar-pax option). Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** configure.ac 12 Feb 2006 09:40:16 -0000 1.83 --- configure.ac 17 Feb 2006 03:40:08 -0000 1.84 *************** *** 1,5 **** AC_INIT([OpenVRML], [0.15.99], [ope...@li...]) AC_PREREQ([2.53]) ! AC_COPYRIGHT([Portions copyright 2000, 2001, 2002, 2003, 2004, 2005 Braden McDaniel]) AC_CONFIG_FILES([Makefile] [doc/Makefile] --- 1,5 ---- AC_INIT([OpenVRML], [0.15.99], [ope...@li...]) AC_PREREQ([2.53]) ! AC_COPYRIGHT([Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 Braden McDaniel]) AC_CONFIG_FILES([Makefile] [doc/Makefile] *************** *** 27,31 **** AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE([1.7 foreign subdir-objects check-news tar-pax]) AM_CONFIG_HEADER([config.h]) --- 27,31 ---- AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE([1.9 foreign subdir-objects check-news tar-pax]) AM_CONFIG_HEADER([config.h]) Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1136 retrieving revision 1.1137 diff -C2 -d -r1.1136 -r1.1137 *** ChangeLog 16 Feb 2006 21:30:50 -0000 1.1136 --- ChangeLog 17 Feb 2006 03:40:08 -0000 1.1137 *************** *** 1,4 **** --- 1,8 ---- 2006-02-16 Braden McDaniel <br...@en...> + * configure.ac: Require automake 1.9 (for tar-pax option). + + 2006-02-16 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/script.cpp: Use boost::polymorphic_downcast where appropriate. |
From: Braden M. <br...@us...> - 2006-02-16 21:30:57
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5727 Modified Files: ChangeLog Log Message: Use boost::polymorphic_downcast where appropriate. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1135 retrieving revision 1.1136 diff -C2 -d -r1.1135 -r1.1136 *** ChangeLog 15 Feb 2006 08:32:31 -0000 1.1135 --- ChangeLog 16 Feb 2006 21:30:50 -0000 1.1136 *************** *** 1,2 **** --- 1,7 ---- + 2006-02-16 Braden McDaniel <br...@en...> + + * src/libopenvrml/openvrml/script.cpp: Use + boost::polymorphic_downcast where appropriate. + 2006-02-14 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-02-16 21:30:57
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5727/src/libopenvrml/openvrml Modified Files: script.cpp Log Message: Use boost::polymorphic_downcast where appropriate. Index: script.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/script.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** script.cpp 12 Feb 2006 09:40:17 -0000 1.63 --- script.cpp 16 Feb 2006 21:30:50 -0000 1.64 *************** *** 423,434 **** OPENVRML_THROW2(std::bad_alloc, std::bad_cast) { if (this->value_->type() == field_value::sfnode_id) { this->node_ ! .assign_with_self_ref_check(dynamic_cast<const sfnode &>(val), ! static_cast<sfnode &>(*this->value_)); } else if (this->value_->type() == field_value::mfnode_id) { this->node_ ! .assign_with_self_ref_check(dynamic_cast<const mfnode &>(val), ! static_cast<mfnode &>(*this->value_)); [...2731 lines suppressed...] ! &arg_sfdata.field_value()); assert(JS_GetPrivate(cx, obj)); *************** *** 10842,10848 **** sfield::sfdata & robj_sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, robj)); - assert(dynamic_cast<openvrml::sfvec3f *>(&robj_sfdata.field_value())); openvrml::sfvec3f & resultVec = ! static_cast<openvrml::sfvec3f &>(robj_sfdata.field_value()); resultVec.value(thisMat * argVec.value()); --- 10863,10869 ---- sfield::sfdata & robj_sfdata = *static_cast<sfield::sfdata *>(JS_GetPrivate(cx, robj)); openvrml::sfvec3f & resultVec = ! *boost::polymorphic_downcast<openvrml::sfvec3f *>( ! &robj_sfdata.field_value()); resultVec.value(thisMat * argVec.value()); |
From: Braden M. <br...@us...> - 2006-02-15 08:32:40
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5584/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Ensure that externproto_node_type and externproto_node references are cleared even if PROTO loading fails. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** browser.cpp 12 Feb 2006 09:40:17 -0000 1.127 --- browser.cpp 15 Feb 2006 08:32:32 -0000 1.128 *************** *** 36,39 **** --- 36,40 ---- # include <boost/algorithm/string/predicate.hpp> # include <boost/bind.hpp> + # include <boost/enable_shared_from_this.hpp> # include <boost/functional.hpp> # include <boost/mpl/for_each.hpp> *************** *** 2258,2271 **** * @brief <code>node_class</code> for <code>EXTERNPROTO</code>s. */ ! class OPENVRML_LOCAL externproto_node_class : public openvrml::node_class { struct load_proto; mutable boost::mutex mutex_; ! boost::shared_ptr<openvrml::node_class> proto_node_class_; ! typedef std::vector<boost::shared_ptr<externproto_node_type> > externproto_node_types; mutable externproto_node_types externproto_node_types_; boost::scoped_ptr<boost::thread> load_proto_thread_; --- 2259,2276 ---- * @brief <code>node_class</code> for <code>EXTERNPROTO</code>s. */ ! class OPENVRML_LOCAL externproto_node_class : ! public boost::enable_shared_from_this<externproto_node_class>, ! public openvrml::node_class { ! struct load_proto; mutable boost::mutex mutex_; ! boost::weak_ptr<openvrml::proto_node_class> proto_node_class_; ! typedef std::vector<boost::weak_ptr<externproto_node_type> > externproto_node_types; mutable externproto_node_types externproto_node_types_; + bool externproto_node_types_cleared_; boost::scoped_ptr<boost::thread> load_proto_thread_; *************** *** 2277,2280 **** --- 2282,2287 ---- virtual ~externproto_node_class() OPENVRML_NOTHROW; + bool externproto_node_types_cleared() const OPENVRML_NOTHROW; + private: virtual const boost::shared_ptr<openvrml::node_type> *************** *** 2284,2293 **** void set_proto_node_class( ! const boost::shared_ptr<openvrml::proto_node_class> & proto_node_class) OPENVRML_THROW1(std::bad_alloc); }; class OPENVRML_LOCAL externproto_node_type : public openvrml::node_type { mutable boost::mutex mutex_; openvrml::node_interface_set interfaces_; --- 2291,2304 ---- void set_proto_node_class( ! const boost::weak_ptr<openvrml::proto_node_class> & proto_node_class = boost::weak_ptr<openvrml::proto_node_class>()) OPENVRML_THROW1(std::bad_alloc); + + void clear_externproto_node_types() OPENVRML_NOTHROW; }; class OPENVRML_LOCAL externproto_node_type : public openvrml::node_type { + const boost::shared_ptr<const externproto_node_class> node_class_; + mutable boost::mutex mutex_; openvrml::node_interface_set interfaces_; *************** *** 2301,2307 **** public: ! externproto_node_type(const openvrml::node_class & c, ! const std::string & id, ! const openvrml::node_interface_set & interfaces) OPENVRML_THROW1(std::bad_alloc); --- 2312,2319 ---- public: ! externproto_node_type( ! const boost::shared_ptr<const externproto_node_class> & c, ! const std::string & id, ! const openvrml::node_interface_set & interfaces) OPENVRML_THROW1(std::bad_alloc); *************** *** 2311,2314 **** --- 2323,2328 ---- OPENVRML_THROW1(std::bad_alloc); + void clear_externproto_nodes() OPENVRML_NOTHROW; + private: virtual const openvrml::node_interface_set & do_interfaces() const *************** *** 5556,5559 **** --- 5570,5581 ---- using openvrml::resource_istream; using openvrml::node_class_id; + using openvrml_::scope_guard; + using openvrml_::make_obj_guard; + + scope_guard guard = + make_obj_guard( + *this->externproto_node_class_, + &externproto_node_class::clear_externproto_node_types); + boost::ignore_unused_variable_warning(guard); auto_ptr<resource_istream> in = *************** *** 5644,5647 **** --- 5666,5670 ---- OPENVRML_THROW1(boost::thread_resource_error): node_class(scene.browser()), + externproto_node_types_cleared_(false), load_proto_thread_( new boost::thread( *************** *** 5657,5660 **** --- 5680,5690 ---- } + bool externproto_node_class::externproto_node_types_cleared() const + OPENVRML_NOTHROW + { + boost::mutex::scoped_lock lock(this->mutex_); + return this->externproto_node_types_cleared_; + } + const boost::shared_ptr<openvrml::node_type> externproto_node_class:: *************** *** 5665,5675 **** boost::mutex::scoped_lock lock(this->mutex_); ! if (this->proto_node_class_) { ! return this->proto_node_class_->create_type(id, interfaces); } - using boost::shared_ptr; const shared_ptr<externproto_node_type> node_type( ! new externproto_node_type(*this, id, interfaces)); this->externproto_node_types_.push_back(node_type); --- 5695,5709 ---- boost::mutex::scoped_lock lock(this->mutex_); ! using boost::shared_ptr; ! ! shared_ptr<openvrml::proto_node_class> shared; ! if ((shared = this->proto_node_class_.lock())) { ! return shared->create_type(id, interfaces); } const shared_ptr<externproto_node_type> node_type( ! new externproto_node_type(this->shared_from_this(), ! id, ! interfaces)); this->externproto_node_types_.push_back(node_type); *************** *** 5679,5683 **** void externproto_node_class::set_proto_node_class( ! const boost::shared_ptr<openvrml::proto_node_class> & proto_node_class) OPENVRML_THROW1(std::bad_alloc) { --- 5713,5717 ---- void externproto_node_class::set_proto_node_class( ! const boost::weak_ptr<openvrml::proto_node_class> & proto_node_class) OPENVRML_THROW1(std::bad_alloc) { *************** *** 5686,5689 **** --- 5720,5724 ---- boost::mutex::scoped_lock lock(this->mutex_); + this->proto_node_class_ = proto_node_class; *************** *** 5693,5713 **** // tell the externproto_nodes they've created. // for (externproto_node_types::const_iterator node_type = this->externproto_node_types_.begin(); node_type != this->externproto_node_types_.end(); ++node_type) { ! assert(*node_type); ! (*node_type)->set_proto_node_type(*proto_node_class); } this->externproto_node_types_.clear(); } externproto_node_type::externproto_node_type( ! const openvrml::node_class & c, const std::string & id, const openvrml::node_interface_set & interfaces) OPENVRML_THROW1(std::bad_alloc): ! node_type(c, id), interfaces_(interfaces) {} --- 5728,5769 ---- // tell the externproto_nodes they've created. // + const shared_ptr<openvrml::proto_node_class> shared_proto_node_class = + proto_node_class.lock(); + assert(shared_proto_node_class); for (externproto_node_types::const_iterator node_type = this->externproto_node_types_.begin(); node_type != this->externproto_node_types_.end(); ++node_type) { ! assert(!node_type->expired()); ! node_type->lock()->set_proto_node_type(*shared_proto_node_class); ! } ! } ! ! void externproto_node_class::clear_externproto_node_types() ! OPENVRML_NOTHROW ! { ! boost::mutex::scoped_lock lock(this->mutex_); ! ! using boost::shared_ptr; ! ! for (externproto_node_types::const_iterator node_type = ! this->externproto_node_types_.begin(); ! node_type != this->externproto_node_types_.end(); ! ++node_type) { ! assert(!node_type->expired()); ! node_type->lock()->clear_externproto_nodes(); } this->externproto_node_types_.clear(); + this->externproto_node_types_cleared_ = true; } externproto_node_type::externproto_node_type( ! const boost::shared_ptr<const externproto_node_class> & c, const std::string & id, const openvrml::node_interface_set & interfaces) OPENVRML_THROW1(std::bad_alloc): ! node_type(*c, id), ! node_class_(c), interfaces_(interfaces) {} *************** *** 5729,5734 **** this->proto_node_type_ = static_pointer_cast<openvrml::proto_node_type>( ! proto_node_class.create_type(this->id(), ! this->interfaces_)); for (externproto_nodes::const_iterator node = --- 5785,5789 ---- this->proto_node_type_ = static_pointer_cast<openvrml::proto_node_type>( ! proto_node_class.create_type(this->id(), this->interfaces_)); for (externproto_nodes::const_iterator node = *************** *** 5738,5741 **** --- 5793,5801 ---- (*node)->set_proto_node(*this->proto_node_type_); } + } + + void externproto_node_type::clear_externproto_nodes() OPENVRML_NOTHROW + { + boost::mutex::scoped_lock lock(this->mutex_); this->externproto_nodes_.clear(); } *************** *** 5764,5768 **** new externproto_node(*this, scope, initial_values)); ! this->externproto_nodes_.push_back(result); return result; } --- 5824,5834 ---- new externproto_node(*this, scope, initial_values)); ! const externproto_node_class & node_class = ! static_cast<const externproto_node_class &>(this->node_class()); ! if (!node_class.externproto_node_types_cleared()) { ! this->externproto_nodes_.push_back(result); ! } else { ! assert(this->externproto_nodes_.empty()); ! } return result; } *************** *** 6974,6977 **** --- 7040,7065 ---- {} + # ifndef NDEBUG + namespace { + struct OPENVRML_LOCAL node_class_equals_ : + public std::unary_function<std::pair<std::string, + boost::shared_ptr<openvrml::node_class> >, + bool> { + explicit node_class_equals_( + const boost::shared_ptr<openvrml::node_class> & node_class): + node_class_(node_class) + {} + + bool operator()(const argument_type & arg) const + { + return arg.second == this->node_class_; + } + + private: + boost::shared_ptr<openvrml::node_class> node_class_; + }; + } + # endif + /** * @brief Destroy. *************** *** 6983,6988 **** entry != this->map_.end(); ++entry) { ! assert(entry->second.unique() ! && "shared_ptr<node_class> was not unique when destroying the browser's node_class_map"); } # endif --- 7071,7082 ---- entry != this->map_.end(); ++entry) { ! typedef std::iterator_traits<map_t::iterator>::difference_type ! difference_type; ! const difference_type count = ! std::count_if(this->map_.begin(), ! this->map_.end(), ! node_class_equals_(entry->second)); ! assert(entry->second.use_count() == count ! && "shared_ptr<node_class> use_count does not match the number of entries in the browser's node_class_map"); } # endif |
From: Braden M. <br...@us...> - 2006-02-15 08:32:40
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5584 Modified Files: ChangeLog Log Message: Ensure that externproto_node_type and externproto_node references are cleared even if PROTO loading fails. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1134 retrieving revision 1.1135 diff -C2 -d -r1.1134 -r1.1135 *** ChangeLog 12 Feb 2006 09:40:16 -0000 1.1134 --- ChangeLog 15 Feb 2006 08:32:31 -0000 1.1135 *************** *** 1,2 **** --- 1,57 ---- + 2006-02-14 Braden McDaniel <br...@en...> + + Ensure that externproto_node_type and externproto_node references + are cleared even if PROTO loading fails. + + * src/libopenvrml/openvrml/browser.cpp + (externproto_node_class): Inherit boost::enable_shared_from_this. + Changed proto_node_class_ from a shared_ptr to a weak_ptr. + Changed externproto_node_types_ from a vector of shared_ptrs to a + vector of weak_ptrs. Added member + externproto_node_types_cleared_. Added member functions + externproto_node_types_cleared and clear_externproto_node_types. + (externproto_node_type): Added member node_class_. Added member + function clear_externproto_nodes. + (externproto_node_class::load_proto::operator()() const): Use a + scope_guard to call + externproto_node_class::clear_externproto_node_types; this + function should be called regardless of whether a PROTO is + successfully loaded. + (externproto_node_class::externproto_node_class(openvrml::scene &, + const std::vector<std::string> &>)): Initialize + externproto_node_types_cleared_ to false. + (externproto_node_class::externproto_node_types_cleared() const): + Added function. Indicate whether the list of + externproto_node_types has been cleared. + (externproto_node_class::do_create_type(const std::string &, const + openvrml::node_interface_set &) const): Lock the proto_node_class_ + weak_ptr; pass a shared_ptr to this to the externproto_node_type + constructor. + (externproto_node_class::set_proto_node_class(const + boost::weak_ptr<openvrml::proto_node_class> &)): Changed to take a + weak_ptr argument. Lock the externproto_node_type weak_ptrs. + (externproto_node_class::clear_externproto_node_types()): Added + function. Call externproto_node_type::clear_externproto_nodes for + each node type in the list and clear the list. + (externproto_node_type::externproto_node_type(const + boost::Shared_ptr<const externproto_node_class> &, const + std::string &, const openvrml::node_interface_set &)): Changed to + take a shared_ptr to the externproto_node_class. + (externproto_node_type::set_proto_node_type(openvrml::proto_node_class&)): + Moved clearing the externproto_nodes_ to + externproto_node_type::clear_externproto_nodes. + (externproto_node_type::clear_externproto_nodes()): Clear the list + of externproto_nodes. + (externproto_node_type::do_create_node(const + boost::shared_ptr<openvrml::scope> &, const + openvrml::initial_value_map &) const): Only add the created node + to the externproto_node_type's list of nodes if + externproto_node_class::externproto_node_types_cleared returns + false. + (openvrml::browser::node_class_map::~node_class_map()): Added + debugging code to confirm that the node_class shared_ptrs in the + node_class_map are the only remaining owning references to the + node_classes. + 2006-02-12 Braden McDaniel <br...@en...> |
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28449/src/libopenvrml/openvrml Modified Files: basetypes.cpp basetypes.h bounding_volume.cpp bounding_volume.h browser.cpp browser.h event.cpp event.h exposedfield.cpp exposedfield.h field_value.cpp field_value.h node.cpp node.h node_impl_util.cpp node_impl_util.h scope.cpp scope.h script.cpp script.h viewer.cpp viewer.h vrml97node.cpp Log Message: Made use of exception specifications a configure option. Index: script.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/script.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** script.h 19 Dec 2005 07:33:39 -0000 1.26 --- script.h 12 Feb 2006 09:40:17 -0000 1.27 *************** *** 52,62 **** explicit script(script_node & node); ! bool direct_output() const throw (); ! bool must_evaluate() const throw (); void field(const std::string & id, const field_value & value) ! throw (unsupported_interface, std::bad_cast, std::bad_alloc); void direct_output(event_listener & listener, const boost::shared_ptr<field_value> & value) ! throw (field_value_type_mismatch, std::bad_alloc); private: --- 52,63 ---- explicit script(script_node & node); ! bool direct_output() const OPENVRML_NOTHROW; ! bool must_evaluate() const OPENVRML_NOTHROW; void field(const std::string & id, const field_value & value) ! OPENVRML_THROW3(unsupported_interface, std::bad_cast, ! std::bad_alloc); void direct_output(event_listener & listener, const boost::shared_ptr<field_value> & value) ! OPENVRML_THROW2(field_value_type_mismatch, std::bad_alloc); private: *************** *** 75,79 **** public: script_node_class(openvrml::browser & browser); ! virtual ~script_node_class() throw (); private: --- 76,80 ---- public: script_node_class(openvrml::browser & browser); ! virtual ~script_node_class() OPENVRML_NOTHROW; private: *************** *** 81,85 **** do_create_type(const std::string & id, const node_interface_set & interfaces) const ! throw (); }; --- 82,86 ---- do_create_type(const std::string & id, const node_interface_set & interfaces) const ! OPENVRML_NOTHROW; }; *************** *** 100,114 **** public: eventout(field_value::type_id type, script_node & node) ! throw (std::bad_alloc); ! const field_value & value() const throw (); void value(const field_value & val) ! throw (std::bad_alloc, std::bad_cast); ! bool modified() const throw (); ! openvrml::event_emitter & emitter() throw (); ! void emit_event(double timestamp) throw (std::bad_alloc); }; --- 101,115 ---- public: eventout(field_value::type_id type, script_node & node) ! OPENVRML_THROW1(std::bad_alloc); ! const field_value & value() const OPENVRML_NOTHROW; void value(const field_value & val) ! OPENVRML_THROW2(std::bad_alloc, std::bad_cast); ! bool modified() const OPENVRML_NOTHROW; ! openvrml::event_emitter & emitter() OPENVRML_NOTHROW; ! void emit_event(double timestamp) OPENVRML_THROW1(std::bad_alloc); }; *************** *** 122,136 **** public: explicit script_node_type(script_node_class & class_); ! virtual ~script_node_type() throw (); void add_interface(const node_interface & interface) ! throw (std::bad_alloc, std::invalid_argument); private: ! virtual const node_interface_set & do_interfaces() const throw (); virtual const boost::intrusive_ptr<node> do_create_node(const boost::shared_ptr<openvrml::scope> & scope, const initial_value_map & initial_values) const ! throw (unsupported_interface, std::bad_cast, std::bad_alloc); }; --- 123,139 ---- public: explicit script_node_type(script_node_class & class_); ! virtual ~script_node_type() OPENVRML_NOTHROW; void add_interface(const node_interface & interface) ! OPENVRML_THROW2(std::bad_alloc, std::invalid_argument); private: ! virtual const node_interface_set & do_interfaces() const ! OPENVRML_NOTHROW; virtual const boost::intrusive_ptr<node> do_create_node(const boost::shared_ptr<openvrml::scope> & scope, const initial_value_map & initial_values) const ! OPENVRML_THROW3(unsupported_interface, std::bad_cast, ! std::bad_alloc); }; *************** *** 143,153 **** public: script_event_listener(const std::string & id, script_node & node); ! virtual ~script_event_listener() throw (); private: ! virtual const std::string do_eventin_id() const throw (); virtual void do_process_event(const FieldValue & value, double timestamp) ! throw (std::bad_alloc); }; --- 146,156 ---- public: script_event_listener(const std::string & id, script_node & node); ! virtual ~script_event_listener() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventin_id() const OPENVRML_NOTHROW; virtual void do_process_event(const FieldValue & value, double timestamp) ! OPENVRML_THROW1(std::bad_alloc); }; *************** *** 215,219 **** create_listener(field_value::type_id type, const std::string & id, script_node & node) ! throw (std::bad_alloc); template <typename FieldValue> --- 218,222 ---- create_listener(field_value::type_id type, const std::string & id, script_node & node) ! OPENVRML_THROW1(std::bad_alloc); template <typename FieldValue> *************** *** 229,233 **** explicit event_emitter_equal_to( const script_event_emitter<FieldValue> & emitter) ! throw (): emitter_(&emitter) {} --- 232,236 ---- explicit event_emitter_equal_to( const script_event_emitter<FieldValue> & emitter) ! OPENVRML_NOTHROW: emitter_(&emitter) {} *************** *** 245,253 **** public: script_event_emitter(script_node & node, const FieldValue & value) ! throw (); ! virtual ~script_event_emitter() throw (); private: ! virtual const std::string do_eventout_id() const throw (); }; --- 248,256 ---- public: script_event_emitter(script_node & node, const FieldValue & value) ! OPENVRML_NOTHROW; ! virtual ~script_event_emitter() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventout_id() const OPENVRML_NOTHROW; }; *************** *** 282,306 **** static std::auto_ptr<openvrml::event_emitter> create_emitter(script_node & node, const field_value & value) ! throw (std::bad_alloc); class set_url_listener_t : public node_field_value_listener<mfstring> { public: explicit set_url_listener_t(script_node & node); ! virtual ~set_url_listener_t() throw (); private: ! virtual const std::string do_eventin_id() const throw (); virtual void do_process_event(const mfstring & value, double timestamp) ! throw (std::bad_alloc); }; class url_changed_emitter : public openvrml::mfstring_emitter { public: ! explicit url_changed_emitter(const mfstring & value) throw (); ! virtual ~url_changed_emitter() throw (); private: ! virtual const std::string do_eventout_id() const throw (); }; --- 285,309 ---- static std::auto_ptr<openvrml::event_emitter> create_emitter(script_node & node, const field_value & value) ! OPENVRML_THROW1(std::bad_alloc); class set_url_listener_t : public node_field_value_listener<mfstring> { public: explicit set_url_listener_t(script_node & node); ! virtual ~set_url_listener_t() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventin_id() const OPENVRML_NOTHROW; virtual void do_process_event(const mfstring & value, double timestamp) ! OPENVRML_THROW1(std::bad_alloc); }; class url_changed_emitter : public openvrml::mfstring_emitter { public: ! explicit url_changed_emitter(const mfstring & value) OPENVRML_NOTHROW; ! virtual ~url_changed_emitter() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventout_id() const OPENVRML_NOTHROW; }; *************** *** 309,328 **** public: explicit set_metadata_listener(script_node & node); ! virtual ~set_metadata_listener() throw (); private: ! virtual const std::string do_eventin_id() const throw (); virtual void do_process_event(const sfnode & value, double timestamp) ! throw (std::bad_alloc); }; class metadata_changed_emitter : public openvrml::sfnode_emitter { public: ! explicit metadata_changed_emitter(const sfnode & value) throw (); ! virtual ~metadata_changed_emitter() throw (); private: ! virtual const std::string do_eventout_id() const throw (); }; --- 312,331 ---- public: explicit set_metadata_listener(script_node & node); ! virtual ~set_metadata_listener() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventin_id() const OPENVRML_NOTHROW; virtual void do_process_event(const sfnode & value, double timestamp) ! OPENVRML_THROW1(std::bad_alloc); }; class metadata_changed_emitter : public openvrml::sfnode_emitter { public: ! explicit metadata_changed_emitter(const sfnode & value) OPENVRML_NOTHROW; ! virtual ~metadata_changed_emitter() OPENVRML_NOTHROW; private: ! virtual const std::string do_eventout_id() const OPENVRML_NOTHROW; }; *************** *** 349,360 **** const node_interface_set & interfaces, const initial_value_map & initial_values) ! throw (unsupported_interface, std::bad_cast, std::bad_alloc, ! std::invalid_argument); ! virtual ~script_node() throw (); void update(double current_time); ! const field_value_map_t & field_value_map() const throw (); ! const eventout_map_t & eventout_map() const throw (); private: --- 352,363 ---- const node_interface_set & interfaces, const initial_value_map & initial_values) ! OPENVRML_THROW4(unsupported_interface, std::bad_cast, ! std::bad_alloc, std::invalid_argument); ! virtual ~script_node() OPENVRML_NOTHROW; void update(double current_time); ! const field_value_map_t & field_value_map() const OPENVRML_NOTHROW; ! const eventout_map_t & eventout_map() const OPENVRML_NOTHROW; private: *************** *** 363,383 **** OPENVRML_LOCAL void assign_with_self_ref_check(const sfnode &, sfnode &) const ! throw (); OPENVRML_LOCAL void assign_with_self_ref_check(const mfnode &, mfnode &) const ! throw (); ! virtual script_node * to_script() throw (); ! virtual void do_initialize(double timestamp) throw (std::bad_alloc); virtual const field_value & do_field(const std::string & id) const ! throw (unsupported_interface); virtual openvrml::event_listener & do_event_listener(const std::string & id) ! throw (unsupported_interface); virtual openvrml::event_emitter & do_event_emitter(const std::string & id) ! throw (unsupported_interface); ! virtual void do_shutdown(double timestamp) throw (); virtual void do_render_child(viewer & v, rendering_context context); }; --- 366,387 ---- OPENVRML_LOCAL void assign_with_self_ref_check(const sfnode &, sfnode &) const ! OPENVRML_NOTHROW; OPENVRML_LOCAL void assign_with_self_ref_check(const mfnode &, mfnode &) const ! OPENVRML_NOTHROW; ! virtual script_node * to_script() OPENVRML_NOTHROW; ! virtual void do_initialize(double timestamp) ! OPENVRML_THROW1(std::bad_alloc); virtual const field_value & do_field(const std::string & id) const ! OPENVRML_THROW1(unsupported_interface); virtual openvrml::event_listener & do_event_listener(const std::string & id) ! OPENVRML_THROW1(unsupported_interface); virtual openvrml::event_emitter & do_event_emitter(const std::string & id) ! OPENVRML_THROW1(unsupported_interface); ! virtual void do_shutdown(double timestamp) OPENVRML_NOTHROW; virtual void do_render_child(viewer & v, rendering_context context); }; *************** *** 394,398 **** template <typename FieldValue> script_node::script_event_listener<FieldValue>::~script_event_listener() ! throw () {} --- 398,402 ---- template <typename FieldValue> script_node::script_event_listener<FieldValue>::~script_event_listener() ! OPENVRML_NOTHROW {} *************** *** 400,404 **** const std::string script_node::script_event_listener<FieldValue>::do_eventin_id() const ! throw () { return this->id; --- 404,408 ---- const std::string script_node::script_event_listener<FieldValue>::do_eventin_id() const ! OPENVRML_NOTHROW { return this->id; *************** *** 409,413 **** const FieldValue & value, const double timestamp) ! throw (std::bad_alloc) { assert(dynamic_cast<openvrml::script_node *>(&this->node())); --- 413,417 ---- const FieldValue & value, const double timestamp) ! OPENVRML_THROW1(std::bad_alloc) { assert(dynamic_cast<openvrml::script_node *>(&this->node())); *************** *** 424,428 **** script_event_emitter(script_node & node, const FieldValue & value) ! throw (): openvrml::event_emitter(value), openvrml::field_value_emitter<FieldValue>(value), --- 428,432 ---- script_event_emitter(script_node & node, const FieldValue & value) ! OPENVRML_NOTHROW: openvrml::event_emitter(value), openvrml::field_value_emitter<FieldValue>(value), *************** *** 432,436 **** template <typename FieldValue> script_node::script_event_emitter<FieldValue>::~script_event_emitter() ! throw () {} --- 436,440 ---- template <typename FieldValue> script_node::script_event_emitter<FieldValue>::~script_event_emitter() ! OPENVRML_NOTHROW {} *************** *** 438,442 **** const std::string script_node::script_event_emitter<FieldValue>::do_eventout_id() const ! throw () { const eventout_map_t::const_iterator pos = --- 442,446 ---- const std::string script_node::script_event_emitter<FieldValue>::do_eventout_id() const ! OPENVRML_NOTHROW { const eventout_map_t::const_iterator pos = *************** *** 450,454 **** inline const script_node::field_value_map_t & ! script_node::field_value_map() const throw () { return this->field_value_map_; --- 454,458 ---- inline const script_node::field_value_map_t & ! script_node::field_value_map() const OPENVRML_NOTHROW { return this->field_value_map_; *************** *** 456,460 **** inline const script_node::eventout_map_t & ! script_node::eventout_map() const throw () { return this->eventout_map_; --- 460,464 ---- inline const script_node::eventout_map_t & ! script_node::eventout_map() const OPENVRML_NOTHROW { return this->eventout_map_; Index: viewer.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/viewer.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** viewer.h 11 Aug 2005 22:50:14 -0000 1.11 --- viewer.h 12 Feb 2006 09:40:17 -0000 1.12 *************** *** 63,69 **** typedef long texture_object_t; ! virtual ~viewer() throw () = 0; ! openvrml::browser * browser() const throw (); virtual rendering_mode mode() = 0; --- 63,69 ---- typedef long texture_object_t; ! virtual ~viewer() OPENVRML_NOTHROW = 0; ! openvrml::browser * browser() const OPENVRML_NOTHROW; virtual rendering_mode mode() = 0; *************** *** 208,212 **** protected: ! viewer() throw (); }; } --- 208,212 ---- protected: ! viewer() OPENVRML_NOTHROW; }; } Index: field_value.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/field_value.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** field_value.cpp 12 Dec 2005 04:16:18 -0000 1.22 --- field_value.cpp 12 Feb 2006 09:40:17 -0000 1.23 *************** *** 71,75 **** * @brief Destroy. */ ! openvrml::field_value::counted_impl_base::~counted_impl_base() throw () {} --- 71,75 ---- * @brief Destroy. */ ! openvrml::field_value::counted_impl_base::~counted_impl_base() OPENVRML_NOTHROW {} [...4903 lines suppressed...] * otherwise. */ ! bool openvrml::operator==(const mfvec3d & lhs, const mfvec3d & rhs) ! OPENVRML_NOTHROW { return lhs.value() == rhs.value(); *************** *** 6522,6526 **** * otherwise. */ ! bool openvrml::operator!=(const mfvec3d & lhs, const mfvec3d & rhs) throw () { return !(lhs == rhs); --- 6680,6685 ---- * otherwise. */ ! bool openvrml::operator!=(const mfvec3d & lhs, const mfvec3d & rhs) ! OPENVRML_NOTHROW { return !(lhs == rhs); Index: field_value.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/field_value.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** field_value.h 8 Dec 2005 06:50:14 -0000 1.18 --- field_value.h 12 Feb 2006 09:40:17 -0000 1.19 *************** *** 49,59 **** class counted_impl_base { public: ! virtual ~counted_impl_base() throw (); std::auto_ptr<counted_impl_base> clone() const ! throw (std::bad_alloc); private: virtual std::auto_ptr<counted_impl_base> do_clone() const ! throw (std::bad_alloc) = 0; }; [...2071 lines suppressed...] ! const value_type & value() const OPENVRML_NOTHROW; ! void value(const value_type & val) OPENVRML_THROW1(std::bad_alloc); ! void swap(mfvec3d & mfv) OPENVRML_NOTHROW; private: virtual std::auto_ptr<field_value> do_clone() const ! OPENVRML_THROW1(std::bad_alloc); virtual mfvec3d & do_assign(const field_value & value) ! OPENVRML_THROW2(std::bad_cast, std::bad_alloc); ! virtual type_id do_type() const OPENVRML_NOTHROW; virtual void print(std::ostream &) const; }; OPENVRML_API bool operator==(const mfvec3d & lhs, const mfvec3d & rhs) ! OPENVRML_NOTHROW; OPENVRML_API bool operator!=(const mfvec3d & lhs, const mfvec3d & rhs) ! OPENVRML_NOTHROW; } Index: script.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/script.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** script.cpp 19 Dec 2005 07:33:39 -0000 1.62 --- script.cpp 12 Feb 2006 09:40:17 -0000 1.63 *************** *** 172,176 **** * otherwise. */ ! bool openvrml::script::direct_output() const throw () { return this->node.direct_output.value(); --- 172,176 ---- * otherwise. */ ! bool openvrml::script::direct_output() const OPENVRML_NOTHROW { [...4586 lines suppressed...] --- 10857,10861 ---- jsval *, jsval * const rval) ! OPENVRML_NOTHROW { assert(cx); *************** *** 10821,10825 **** } ! void VrmlMatrix::finalize(JSContext * const cx, JSObject * const obj) throw () { delete static_cast<openvrml::mat4f *>(JS_GetPrivate(cx, obj)); --- 10882,10887 ---- } ! void VrmlMatrix::finalize(JSContext * const cx, JSObject * const obj) ! OPENVRML_NOTHROW { delete static_cast<openvrml::mat4f *>(JS_GetPrivate(cx, obj)); Index: bounding_volume.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/bounding_volume.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** bounding_volume.h 11 Aug 2005 22:50:14 -0000 1.7 --- bounding_volume.h 12 Feb 2006 09:40:17 -0000 1.8 *************** *** 40,47 **** }; ! virtual ~bounding_volume() throw () = 0; void maximize(); ! bool maximized() const throw (); intersection intersect_frustum(const openvrml::frustum & frustum) const; --- 40,47 ---- }; ! virtual ~bounding_volume() OPENVRML_NOTHROW = 0; void maximize(); ! bool maximized() const OPENVRML_NOTHROW; intersection intersect_frustum(const openvrml::frustum & frustum) const; *************** *** 72,76 **** public: bounding_sphere(); ! virtual ~bounding_sphere() throw (); void center(const vec3f & c); --- 72,76 ---- public: bounding_sphere(); ! virtual ~bounding_sphere() OPENVRML_NOTHROW; void center(const vec3f & c); *************** *** 95,99 **** class OPENVRML_API axis_aligned_bounding_box : public bounding_volume { public: ! virtual ~axis_aligned_bounding_box() throw (); private: --- 95,99 ---- class OPENVRML_API axis_aligned_bounding_box : public bounding_volume { public: ! virtual ~axis_aligned_bounding_box() OPENVRML_NOTHROW; private: Index: scope.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** scope.cpp 4 Aug 2005 00:57:47 -0000 1.14 --- scope.cpp 12 Feb 2006 09:40:17 -0000 1.15 *************** *** 96,100 **** * @return the <code>scope</code> identifier. */ ! const std::string & openvrml::scope::id() const throw () { return this->id_; --- 96,100 ---- * @return the <code>scope</code> identifier. */ ! const std::string & openvrml::scope::id() const OPENVRML_NOTHROW { return this->id_; *************** *** 108,112 **** */ const boost::shared_ptr<openvrml::scope> & openvrml::scope::parent() const ! throw () { return this->parent_; --- 108,112 ---- */ const boost::shared_ptr<openvrml::scope> & openvrml::scope::parent() const ! OPENVRML_NOTHROW { return this->parent_; *************** *** 129,133 **** */ bool openvrml::scope::add_type(const boost::shared_ptr<node_type> & type) ! throw (std::bad_alloc) { assert(type); --- 129,133 ---- */ bool openvrml::scope::add_type(const boost::shared_ptr<node_type> & type) ! OPENVRML_THROW1(std::bad_alloc) { assert(type); Index: scope.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** scope.h 11 Aug 2005 22:50:14 -0000 1.11 --- scope.h 12 Feb 2006 09:40:17 -0000 1.12 *************** *** 49,58 **** boost::shared_ptr<scope>()); ! const std::string & id() const throw (); ! const boost::shared_ptr<scope> & parent() const throw (); bool add_type(const boost::shared_ptr<node_type> & type) ! throw (std::bad_alloc); const boost::shared_ptr<node_type> & --- 49,58 ---- boost::shared_ptr<scope>()); ! const std::string & id() const OPENVRML_NOTHROW; ! const boost::shared_ptr<scope> & parent() const OPENVRML_NOTHROW; bool add_type(const boost::shared_ptr<node_type> & type) ! OPENVRML_THROW1(std::bad_alloc); const boost::shared_ptr<node_type> & Index: node_impl_util.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node_impl_util.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** node_impl_util.h 12 Feb 2006 03:15:40 -0000 1.8 --- node_impl_util.h 12 Feb 2006 09:40:17 -0000 1.9 *************** *** 32,36 **** class ptr_to_polymorphic_mem { public: ! virtual ~ptr_to_polymorphic_mem() throw () = 0; virtual MemberBase & deref(Object & obj) = 0; virtual const MemberBase & deref(const Object & obj) = 0; --- 32,36 ---- class ptr_to_polymorphic_mem { public: ! virtual ~ptr_to_polymorphic_mem() OPENVRML_NOTHROW = 0; virtual MemberBase & deref(Object & obj) = 0; virtual const MemberBase & deref(const Object & obj) = 0; *************** *** 39,43 **** template <typename MemberBase, typename Object> ptr_to_polymorphic_mem<MemberBase, Object>::~ptr_to_polymorphic_mem() ! throw () {} --- 39,43 ---- template <typename MemberBase, typename Object> ptr_to_polymorphic_mem<MemberBase, Object>::~ptr_to_polymorphic_mem() ! OPENVRML_NOTHROW {} *************** *** 51,55 **** public: explicit ptr_to_polymorphic_mem_impl(Member Object::* ptr_to_mem); ! virtual ~ptr_to_polymorphic_mem_impl() throw (); virtual MemberBase & deref(Object & obj); --- 51,55 ---- public: explicit ptr_to_polymorphic_mem_impl(Member Object::* ptr_to_mem); ! virtual ~ptr_to_polymorphic_mem_impl() OPENVRML_NOTHROW; virtual MemberBase & deref(Object & obj); *************** *** 65,69 **** template <typename MemberBase, typename Member, typename Object> ptr_to_polymorphic_mem_impl<MemberBase, Member, Object>:: ! ~ptr_to_polymorphic_mem_impl() throw () {} --- 65,69 ---- template <typename MemberBase, typename Member, typename Object> ptr_to_polymorphic_mem_impl<MemberBase, Member, Object>:: ! ~ptr_to_polymorphic_mem_impl() OPENVRML_NOTHROW {} *************** *** 87,101 **** class OPENVRML_API abstract_node_type : public openvrml::node_type { public: ! virtual ~abstract_node_type() throw () = 0; virtual const openvrml::field_value & field_value(const openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) = 0; virtual openvrml::event_listener & event_listener(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) = 0; virtual openvrml::event_emitter & event_emitter(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) = 0; protected: --- 87,101 ---- class OPENVRML_API abstract_node_type : public openvrml::node_type { public: ! virtual ~abstract_node_type() OPENVRML_NOTHROW = 0; virtual const openvrml::field_value & field_value(const openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) = 0; virtual openvrml::event_listener & event_listener(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) = 0; virtual openvrml::event_emitter & event_emitter(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) = 0; protected: *************** *** 169,182 **** node_type_impl(const openvrml::node_class & node_class, const std::string & id); ! virtual ~node_type_impl() throw (); void add_eventin(openvrml::field_value::type_id type, const std::string & id, const event_listener_ptr_ptr & event_listener) ! throw (std::invalid_argument, std::bad_alloc); void add_eventout(openvrml::field_value::type_id type, const std::string & id, const event_emitter_ptr_ptr & event_emitter) ! throw (std::invalid_argument, std::bad_alloc); void add_exposedfield(openvrml::field_value::type_id type, const std::string & id, --- 169,182 ---- node_type_impl(const openvrml::node_class & node_class, const std::string & id); ! virtual ~node_type_impl() OPENVRML_NOTHROW; void add_eventin(openvrml::field_value::type_id type, const std::string & id, const event_listener_ptr_ptr & event_listener) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc); void add_eventout(openvrml::field_value::type_id type, const std::string & id, const event_emitter_ptr_ptr & event_emitter) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc); void add_exposedfield(openvrml::field_value::type_id type, const std::string & id, *************** *** 184,223 **** const field_ptr_ptr & field, const event_emitter_ptr_ptr & event_emitter) ! throw (std::invalid_argument, std::bad_alloc); void add_field(openvrml::field_value::type_id type, const std::string & id, const field_ptr_ptr & fieldPtrPtr) ! throw (std::invalid_argument, std::bad_alloc); virtual const openvrml::field_value & field_value(const openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); virtual openvrml::event_listener & event_listener(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); virtual openvrml::event_emitter & event_emitter(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); private: virtual const openvrml::node_interface_set & do_interfaces() const ! throw (); virtual const boost::intrusive_ptr<openvrml::node> do_create_node( const boost::shared_ptr<openvrml::scope> & scope, const openvrml::initial_value_map & initial_values) const ! throw (openvrml::unsupported_interface, std::bad_cast, ! std::bad_alloc); const openvrml::field_value & do_field_value(const Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); openvrml::event_listener & do_event_listener(Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); openvrml::event_emitter & do_event_emitter(Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface); }; --- 184,223 ---- const field_ptr_ptr & field, const event_emitter_ptr_ptr & event_emitter) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc); void add_field(openvrml::field_value::type_id type, const std::string & id, const field_ptr_ptr & fieldPtrPtr) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc); virtual const openvrml::field_value & field_value(const openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); virtual openvrml::event_listener & event_listener(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); virtual openvrml::event_emitter & event_emitter(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); private: virtual const openvrml::node_interface_set & do_interfaces() const ! OPENVRML_NOTHROW; virtual const boost::intrusive_ptr<openvrml::node> do_create_node( const boost::shared_ptr<openvrml::scope> & scope, const openvrml::initial_value_map & initial_values) const ! OPENVRML_THROW3(openvrml::unsupported_interface, std::bad_cast, ! std::bad_alloc); const openvrml::field_value & do_field_value(const Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); openvrml::event_listener & do_event_listener(Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); openvrml::event_emitter & do_event_emitter(Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface); }; *************** *** 226,233 **** class event_listener_base : public virtual node_event_listener { public: ! virtual ~event_listener_base() throw () = 0; protected: ! explicit event_listener_base(openvrml::node & n) throw (); private: --- 226,233 ---- class event_listener_base : public virtual node_event_listener { public: ! virtual ~event_listener_base() OPENVRML_NOTHROW = 0; protected: ! explicit event_listener_base(openvrml::node & n) OPENVRML_NOTHROW; private: *************** *** 262,281 **** }; ! virtual const std::string do_eventin_id() const throw (); }; template <typename Node> event_listener_base<Node>::event_listener_base(openvrml::node & n) ! throw (): node_event_listener(n) {} template <typename Node> ! event_listener_base<Node>::~event_listener_base() throw () {} template <typename Node> const std::string ! event_listener_base<Node>::do_eventin_id() const throw () { const node_type_t & node_type = --- 262,281 ---- }; ! virtual const std::string do_eventin_id() const OPENVRML_NOTHROW; }; template <typename Node> event_listener_base<Node>::event_listener_base(openvrml::node & n) ! OPENVRML_NOTHROW: node_event_listener(n) {} template <typename Node> ! event_listener_base<Node>::~event_listener_base() OPENVRML_NOTHROW {} template <typename Node> const std::string ! event_listener_base<Node>::do_eventin_id() const OPENVRML_NOTHROW { const node_type_t & node_type = *************** *** 297,307 **** public: ! virtual ~event_emitter_base() throw () = 0; ! openvrml::node & node() const throw (); protected: event_emitter_base(openvrml::node & n, const field_value & value) ! throw (); private: --- 297,307 ---- public: ! virtual ~event_emitter_base() OPENVRML_NOTHROW = 0; ! openvrml::node & node() const OPENVRML_NOTHROW; protected: event_emitter_base(openvrml::node & n, const field_value & value) ! OPENVRML_NOTHROW; private: *************** *** 332,336 **** }; ! virtual const std::string do_eventout_id() const throw (); }; --- 332,336 ---- }; ! virtual const std::string do_eventout_id() const OPENVRML_NOTHROW; }; *************** *** 338,342 **** event_emitter_base<Node>:: event_emitter_base(openvrml::node & n, const field_value & value) ! throw (): event_emitter(value), node_(&n) --- 338,342 ---- event_emitter_base<Node>:: event_emitter_base(openvrml::node & n, const field_value & value) ! OPENVRML_NOTHROW: event_emitter(value), node_(&n) *************** *** 344,353 **** template <typename Node> ! event_emitter_base<Node>::~event_emitter_base() throw () {} template <typename Node> openvrml::node & ! event_emitter_base<Node>::node() const throw () { return *this->node_; --- 344,353 ---- template <typename Node> ! event_emitter_base<Node>::~event_emitter_base() OPENVRML_NOTHROW {} template <typename Node> openvrml::node & ! event_emitter_base<Node>::node() const OPENVRML_NOTHROW { return *this->node_; *************** *** 356,360 **** template <typename Node> const std::string ! event_emitter_base<Node>::do_eventout_id() const throw () { const node_type_t & node_type = --- 356,360 ---- template <typename Node> const std::string ! event_emitter_base<Node>::do_eventout_id() const OPENVRML_NOTHROW { const node_type_t & node_type = *************** *** 374,378 **** class abstract_node : public virtual node { public: ! virtual ~abstract_node() throw () = 0; protected: --- 374,378 ---- class abstract_node : public virtual node { public: ! virtual ~abstract_node() OPENVRML_NOTHROW = 0; protected: *************** *** 412,416 **** public: event_emitter(openvrml::node & node, const FieldValue & value); ! virtual ~event_emitter() throw (); }; --- 412,416 ---- public: event_emitter(openvrml::node & node, const FieldValue & value); ! virtual ~event_emitter() OPENVRML_NOTHROW; }; *************** *** 454,463 **** typename FieldValue::value_type()); # endif ! exposedfield(const exposedfield<FieldValue> & obj) throw (); ! virtual ~exposedfield() throw (); private: virtual std::auto_ptr<field_value> do_clone() const ! throw (std::bad_alloc); }; --- 454,464 ---- typename FieldValue::value_type()); # endif ! exposedfield(const exposedfield<FieldValue> & obj) ! OPENVRML_NOTHROW; ! virtual ~exposedfield() OPENVRML_NOTHROW; private: virtual std::auto_ptr<field_value> do_clone() const ! OPENVRML_THROW1(std::bad_alloc); }; *************** *** 469,481 **** private: virtual const field_value & do_field(const std::string & id) const ! throw (unsupported_interface); virtual openvrml::event_listener & do_event_listener(const std::string & id) ! throw (unsupported_interface); virtual openvrml::event_emitter & do_event_emitter(const std::string & id) ! throw (unsupported_interface); }; --- 470,482 ---- private: virtual const field_value & do_field(const std::string & id) const ! OPENVRML_THROW1(unsupported_interface); virtual openvrml::event_listener & do_event_listener(const std::string & id) ! OPENVRML_THROW1(unsupported_interface); virtual openvrml::event_emitter & do_event_emitter(const std::string & id) ! OPENVRML_THROW1(unsupported_interface); }; *************** *** 492,496 **** template <typename FieldValue> abstract_node<Derived>::event_emitter<FieldValue>::~event_emitter() ! throw () {} --- 493,497 ---- template <typename FieldValue> abstract_node<Derived>::event_emitter<FieldValue>::~event_emitter() ! OPENVRML_NOTHROW {} *************** *** 513,517 **** template <typename FieldValue> abstract_node<Derived>::exposedfield<FieldValue>:: ! exposedfield(const exposedfield<FieldValue> & obj) throw (): openvrml::event_listener(), node_event_listener(obj.node_event_listener::node()), --- 514,518 ---- template <typename FieldValue> abstract_node<Derived>::exposedfield<FieldValue>:: ! exposedfield(const exposedfield<FieldValue> & obj) OPENVRML_NOTHROW: openvrml::event_listener(), node_event_listener(obj.node_event_listener::node()), *************** *** 530,534 **** template <typename FieldValue> abstract_node<Derived>::exposedfield<FieldValue>:: ! ~exposedfield() throw () {} --- 531,535 ---- template <typename FieldValue> abstract_node<Derived>::exposedfield<FieldValue>:: ! ~exposedfield() OPENVRML_NOTHROW {} *************** *** 537,541 **** std::auto_ptr<field_value> abstract_node<Derived>::exposedfield<FieldValue>::do_clone() const ! throw (std::bad_alloc) { return std::auto_ptr<field_value>( --- 538,542 ---- std::auto_ptr<field_value> abstract_node<Derived>::exposedfield<FieldValue>::do_clone() const ! OPENVRML_THROW1(std::bad_alloc) { return std::auto_ptr<field_value>( *************** *** 552,556 **** template <typename Derived> ! abstract_node<Derived>::~abstract_node() throw () {} --- 553,557 ---- template <typename Derived> ! abstract_node<Derived>::~abstract_node() OPENVRML_NOTHROW {} *************** *** 558,566 **** const field_value & abstract_node<Derived>::do_field(const std::string & id) const ! throw (unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>(&this->type()); return type.field_value(*this, id); } --- 559,568 ---- const field_value & abstract_node<Derived>::do_field(const std::string & id) const ! OPENVRML_THROW1(unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>( ! &this->type()); return type.field_value(*this, id); } *************** *** 569,577 **** event_listener & abstract_node<Derived>::do_event_listener(const std::string & id) ! throw (unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>(&this->type()); return type.event_listener(*this, id); } --- 571,580 ---- event_listener & abstract_node<Derived>::do_event_listener(const std::string & id) ! OPENVRML_THROW1(unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>( ! &this->type()); return type.event_listener(*this, id); } *************** *** 580,588 **** event_emitter & abstract_node<Derived>::do_event_emitter(const std::string & id) ! throw (unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>(&this->type()); return type.event_emitter(*this, id); } --- 583,592 ---- event_emitter & abstract_node<Derived>::do_event_emitter(const std::string & id) ! OPENVRML_THROW1(unsupported_interface) { using boost::polymorphic_downcast; const abstract_node_type & type = ! *polymorphic_downcast<const abstract_node_type *>( ! &this->type()); return type.event_emitter(*this, id); } *************** *** 642,652 **** class event_listener_ptr { public: ! virtual ~event_listener_ptr() throw () = 0; virtual openvrml::event_listener & ! dereference(Node & obj) throw () = 0; }; template <typename Node> ! inline event_listener_ptr<Node>::~event_listener_ptr() throw () {} --- 646,656 ---- class event_listener_ptr { public: ! virtual ~event_listener_ptr() OPENVRML_NOTHROW = 0; virtual openvrml::event_listener & ! dereference(Node & obj) OPENVRML_NOTHROW = 0; }; template <typename Node> ! inline event_listener_ptr<Node>::~event_listener_ptr() OPENVRML_NOTHROW {} *************** *** 659,674 **** public: event_listener_ptr_impl(ConcreteEventListener Node::* ptr) ! throw (): its_ptr(ptr) {} ! virtual ~event_listener_ptr_impl() throw (); ! virtual openvrml::event_listener & dereference(Node &) throw (); }; template <typename Node, typename ConcreteEventListener> inline event_listener_ptr_impl<Node, ConcreteEventListener>:: ! ~event_listener_ptr_impl() throw () {} --- 663,679 ---- public: event_listener_ptr_impl(ConcreteEventListener Node::* ptr) ! OPENVRML_NOTHROW: its_ptr(ptr) {} ! virtual ~event_listener_ptr_impl() OPENVRML_NOTHROW; ! virtual openvrml::event_listener & dereference(Node &) ! OPENVRML_NOTHROW; }; template <typename Node, typename ConcreteEventListener> inline event_listener_ptr_impl<Node, ConcreteEventListener>:: ! ~event_listener_ptr_impl() OPENVRML_NOTHROW {} *************** *** 676,680 **** inline openvrml::event_listener & event_listener_ptr_impl<Node, ConcreteEventListener>:: ! dereference(Node & obj) throw () { return obj.*its_ptr; --- 681,685 ---- inline openvrml::event_listener & event_listener_ptr_impl<Node, ConcreteEventListener>:: ! dereference(Node & obj) OPENVRML_NOTHROW { return obj.*its_ptr; *************** *** 685,695 **** class event_emitter_ptr { public: ! virtual ~event_emitter_ptr() throw () = 0; virtual openvrml::event_emitter & dereference(Node & obj) ! throw () = 0; }; template <typename Node> ! inline event_emitter_ptr<Node>::~event_emitter_ptr() throw () {} --- 690,700 ---- class event_emitter_ptr { public: ! virtual ~event_emitter_ptr() OPENVRML_NOTHROW = 0; virtual openvrml::event_emitter & dereference(Node & obj) ! OPENVRML_NOTHROW = 0; }; template <typename Node> ! inline event_emitter_ptr<Node>::~event_emitter_ptr() OPENVRML_NOTHROW {} *************** *** 700,712 **** public: ! event_emitter_ptr_impl(ConcreteEventEmitter Node::* ptr) throw (); ! virtual ~event_emitter_ptr_impl() throw (); ! virtual openvrml::event_emitter & dereference(Node &) throw (); }; template <typename Node, typename ConcreteEventEmitter> inline event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: ! event_emitter_ptr_impl(ConcreteEventEmitter Node::* ptr) throw (): its_ptr(ptr) {} --- 705,720 ---- public: ! event_emitter_ptr_impl(ConcreteEventEmitter Node::* ptr) ! OPENVRML_NOTHROW; ! virtual ~event_emitter_ptr_impl() OPENVRML_NOTHROW; ! virtual openvrml::event_emitter & dereference(Node &) ! OPENVRML_NOTHROW; }; template <typename Node, typename ConcreteEventEmitter> inline event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: ! event_emitter_ptr_impl(ConcreteEventEmitter Node::* ptr) ! OPENVRML_NOTHROW: its_ptr(ptr) {} *************** *** 715,719 **** inline event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: ~event_emitter_ptr_impl() ! throw () {} --- 723,727 ---- inline event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: ~event_emitter_ptr_impl() ! OPENVRML_NOTHROW {} *************** *** 722,726 **** event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: dereference(Node & obj) ! throw () { return obj.*its_ptr; --- 730,734 ---- event_emitter_ptr_impl<Node, ConcreteEventEmitter>:: dereference(Node & obj) ! OPENVRML_NOTHROW { return obj.*its_ptr; *************** *** 762,766 **** template <typename Node> ! node_type_impl<Node>::~node_type_impl() throw () {} --- 770,774 ---- template <typename Node> ! node_type_impl<Node>::~node_type_impl() OPENVRML_NOTHROW {} *************** *** 770,774 **** const std::string & id, const event_listener_ptr_ptr & event_listener) ! throw (std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; --- 778,782 ---- const std::string & id, const event_listener_ptr_ptr & event_listener) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; *************** *** 794,798 **** const std::string & id, const event_emitter_ptr_ptr & event_emitter) ! throw (std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; --- 802,806 ---- const std::string & id, const event_emitter_ptr_ptr & event_emitter) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; *************** *** 820,824 **** const field_ptr_ptr & field, const event_emitter_ptr_ptr & event_emitter) ! throw (std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; --- 828,832 ---- const field_ptr_ptr & field, const event_emitter_ptr_ptr & event_emitter) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; *************** *** 857,861 **** const std::string & id, const field_ptr_ptr & nodeFieldPtrPtr) ! throw (std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; --- 865,869 ---- const std::string & id, const field_ptr_ptr & nodeFieldPtrPtr) ! OPENVRML_THROW2(std::invalid_argument, std::bad_alloc) { using openvrml::node_interface; *************** *** 878,882 **** node_type_impl<Node>::field_value(const openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { assert(dynamic_cast<const Node *>(&node)); --- 886,890 ---- node_type_impl<Node>::field_value(const openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { assert(dynamic_cast<const Node *>(&node)); *************** *** 888,892 **** node_type_impl<Node>:: do_field_value(const Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { using namespace openvrml; --- 896,900 ---- node_type_impl<Node>:: do_field_value(const Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { using namespace openvrml; *************** *** 906,910 **** node_type_impl<Node>:: event_listener(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { assert(dynamic_cast<Node *>(&node)); --- 914,918 ---- node_type_impl<Node>:: event_listener(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { assert(dynamic_cast<Node *>(&node)); *************** *** 916,920 **** node_type_impl<Node>:: do_event_listener(Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { using namespace openvrml; --- 924,928 ---- node_type_impl<Node>:: do_event_listener(Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { using namespace openvrml; *************** *** 939,943 **** node_type_impl<Node>:: event_emitter(openvrml::node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { assert(dynamic_cast<Node *>(&node)); --- 947,951 ---- node_type_impl<Node>:: event_emitter(openvrml::node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { assert(dynamic_cast<Node *>(&node)); *************** *** 949,953 **** node_type_impl<Node>:: do_event_emitter(Node & node, const std::string & id) const ! throw (openvrml::unsupported_interface) { using namespace openvrml; --- 957,961 ---- node_type_impl<Node>:: do_event_emitter(Node & node, const std::string & id) const ! OPENVRML_THROW1(openvrml::unsupported_interface) { using namespace openvrml; *************** *** 971,975 **** const openvrml::node_interface_set & node_type_impl<Node>::do_interfaces() const ! throw () { return this->interfaces_; --- 979,983 ---- const openvrml::node_interface_set & node_type_impl<Node>::do_interfaces() const ! OPENVRML_NOTHROW { return this->interfaces_; *************** *** 982,987 **** const openvrml::initial_value_map & initial_values) const ! throw (openvrml::unsupported_interface, std::bad_cast, ! std::bad_alloc) { using namespace openvrml; --- 990,995 ---- const openvrml::initial_value_map & initial_values) const ! OPENVRML_THROW3(openvrml::unsupported_interface, std::bad_cast, ! std::bad_alloc) { using namespace openvrml; Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** browser.h 12 Feb 2006 04:20:51 -0000 1.42 --- browser.h 12 Feb 2006 09:40:17 -0000 1.43 *************** *** 32,38 **** virtual ~resource_istream() = 0; ! const std::string url() const throw (std::bad_alloc); ! const std::string type() const throw (std::bad_alloc); ! bool data_available()... [truncated message content] |
From: Braden M. <br...@us...> - 2006-02-12 09:40:30
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28449/src/libopenvrml Modified Files: openvrml-common.h openvrml-config.h.in Log Message: Made use of exception specifications a configure option. Index: openvrml-common.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml-common.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** openvrml-common.h 17 Aug 2005 20:57:38 -0000 1.3 --- openvrml-common.h 12 Feb 2006 09:40:17 -0000 1.4 *************** *** 25,27 **** --- 25,43 ---- # include <openvrml-config.h> + # if OPENVRML_ENABLE_EXCEPTION_SPECS + # define OPENVRML_NOTHROW throw () + # define OPENVRML_THROW1(ex_) throw (ex_) + # define OPENVRML_THROW2(ex1_, ex2_) throw (ex1_, ex2_) + # define OPENVRML_THROW3(ex1_, ex2_, ex3_) throw (ex1_, ex2_, ex3_) + # define OPENVRML_THROW4(ex1_, ex2_, ex3_, ex4_) throw (ex1_, ex2_, ex3_, ex4_) + # define OPENVRML_THROW5(ex1_, ex2_, ex3_, ex4_, ex5_) throw (ex1_, ex2_, ex3_, ex4_, ex5_) + # else + # define OPENVRML_NOTHROW + # define OPENVRML_THROW1(ex_) + # define OPENVRML_THROW2(ex1_, ex2_) + # define OPENVRML_THROW3(ex1_, ex2_, ex3_) + # define OPENVRML_THROW4(ex1_, ex2_, ex3_, ex4_) + # define OPENVRML_THROW5(ex1_, ex2_, ex3_, ex4_, ex5_) + # endif + # endif // ifndef OPENVRML_COMMON_H Index: openvrml-config.h.in =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml-config.h.in,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** openvrml-config.h.in 11 Aug 2005 22:50:13 -0000 1.1 --- openvrml-config.h.in 12 Feb 2006 09:40:17 -0000 1.2 *************** *** 25,28 **** --- 25,29 ---- # define OPENVRML_API @OPENVRML_API@ # define OPENVRML_LOCAL @OPENVRML_LOCAL@ + # define OPENVRML_ENABLE_EXCEPTION_SPECS @OPENVRML_ENABLE_EXCEPTION_SPECS@ # endif // ifndef OPENVRML_CONFIG_H |
From: Braden M. <br...@us...> - 2006-02-12 09:40:30
|
Update of /cvsroot/openvrml/openvrml/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28449/doc Modified Files: Doxyfile Log Message: Made use of exception specifications a configure option. Index: Doxyfile =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/Doxyfile,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Doxyfile 23 Oct 2005 18:37:51 -0000 1.20 --- Doxyfile 12 Feb 2006 09:40:17 -0000 1.21 *************** *** 185,189 **** ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES ! EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES INCLUDE_PATH = --- 185,189 ---- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES ! EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = *************** *** 192,196 **** OPENVRML_API= \ OPENVRML_LOCAL= \ ! OPENVRML_GL_CALLBACK_= EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES --- 192,202 ---- OPENVRML_API= \ OPENVRML_LOCAL= \ ! OPENVRML_GL_CALLBACK_= \ ! OPENVRML_NOTHROW="throw ()" \ ! OPENVRML_THROW1(a)="throw (a)" \ ! OPENVRML_THROW2(a,b)="throw (a, b)" \ ! OPENVRML_THROW3(a,b,c)="throw (a, b, c)" \ ! OPENVRML_THROW4(a,b,c,d)="throw (a, b, c, d)" \ ! OPENVRML_THROW5(a,b,c,d,e)="throw (a, b, c, d, e)" EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES |
From: Braden M. <br...@us...> - 2006-02-12 09:40:30
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28449 Modified Files: ChangeLog README configure.ac openvrml.spec.in Log Message: Made use of exception specifications a configure option. Index: README =================================================================== RCS file: /cvsroot/openvrml/openvrml/README,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** README 7 Jul 2005 03:47:42 -0000 1.61 --- README 12 Feb 2006 09:40:16 -0000 1.62 *************** *** 137,140 **** --- 137,144 ---- depends on. + --disable-exception-specs + Disable use of C++ exception specifications. This is likely to + improve performance. Note that this changes the library ABI. + --disable-png-textures Disable support for rendering PNG images as textures. OpenVRML Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** configure.ac 4 Nov 2005 07:47:29 -0000 1.82 --- configure.ac 12 Feb 2006 09:40:16 -0000 1.83 *************** *** 102,105 **** --- 102,118 ---- # + # Use exception specifications? + # + AC_ARG_ENABLE([exception-specs], + [AC_HELP_STRING([--disable-exception-specs], + [disable use of C++ exception specifications])]) + if test X$enable_exceptions_specs = Xno; then + OPENVRML_ENABLE_EXCEPTION_SPECS=0 + else + OPENVRML_ENABLE_EXCEPTION_SPECS=1 + fi + AC_SUBST([OPENVRML_ENABLE_EXCEPTION_SPECS]) + + # # PNG texture support # Index: openvrml.spec.in =================================================================== RCS file: /cvsroot/openvrml/openvrml/openvrml.spec.in,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** openvrml.spec.in 20 Apr 2005 20:23:28 -0000 1.49 --- openvrml.spec.in 12 Feb 2006 09:40:16 -0000 1.50 *************** *** 71,75 **** %build ! %configure --disable-examples --disable-script-node-java CPPFLAGS="-DNDEBUG" make %{?_smp_mflags} --- 71,75 ---- %build ! %configure --disable-exception-specs --disable-examples --disable-script-node-java CPPFLAGS="-DNDEBUG" make %{?_smp_mflags} *************** *** 115,118 **** --- 115,121 ---- %changelog + * Sun Feb 12 2006 Braden McDaniel <br...@en...> + - configure with --disable-exception-specs. + * Tue Apr 20 2005 Braden McDaniel <br...@en...> - Removed dejagnu build prerequisite. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1133 retrieving revision 1.1134 diff -C2 -d -r1.1133 -r1.1134 *** ChangeLog 12 Feb 2006 04:20:50 -0000 1.1133 --- ChangeLog 12 Feb 2006 09:40:16 -0000 1.1134 *************** *** 1,2 **** --- 1,68 ---- + 2006-02-12 Braden McDaniel <br...@en...> + + Made use of exception specifications a configure option. + + * README: Added documentation for option + --disable-exception-specs. + * configure.ac: Added option --disable-exception-specs. + * openvrml.spec.in: Disable exception specifications when building + the RPM. + * doc/Doxyfile (PREDEFINED): Defined exception specification + macros. + * src/libopenvrml/openvrml-common.h: Defined exception + specification macros. + * src/libopenvrml/openvrml-config.h.in: Defined + OPENVRML_ENABLE_EXCEPTION_SPECS. + * src/libopenvrml/openvrml/basetypes.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/basetypes.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/bounding_volume.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/bounding_volume.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/browser.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/browser.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/event.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/event.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/exposedfield.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/exposedfield.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/field_value.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/field_value.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/node.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/node.h: Applied exception specification + macros. + * src/libopenvrml/openvrml/node_impl_util.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/node_impl_util.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/scope.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/scope.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/script.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/script.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/viewer.cpp: Applied exception + specification macros. + * src/libopenvrml/openvrml/viewer.h: Applied exception + specification macros. + * src/libopenvrml/openvrml/vrml97node.cpp: Applied exception + specification macros. + * src/libopenvrml-gl/openvrml/gl/viewer.cpp: Applied exception + specification macros. + * src/libopenvrml-gl/openvrml/gl/viewer.h: Applied exception + specification macros. + 2006-02-11 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-02-12 09:40:29
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28449/src/libopenvrml-gl/openvrml/gl Modified Files: viewer.cpp viewer.h Log Message: Made use of exception specifications a configure option. Index: viewer.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** viewer.h 11 Aug 2005 22:50:14 -0000 1.12 --- viewer.h 12 Feb 2006 09:40:17 -0000 1.13 *************** *** 148,152 **** void step(float, float, float); void zoom(float); ! void rotate(const openvrml::rotation & rot) throw (); void handleKey(int); --- 148,152 ---- void step(float, float, float); void zoom(float); ! void rotate(const openvrml::rotation & rot) OPENVRML_NOTHROW; void handleKey(int); *************** *** 159,163 **** public: viewer(); ! virtual ~viewer() throw (); virtual rendering_mode mode(); --- 159,163 ---- public: viewer(); ! virtual ~viewer() OPENVRML_NOTHROW; virtual rendering_mode mode(); Index: viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** viewer.cpp 6 Feb 2006 02:53:18 -0000 1.41 --- viewer.cpp 12 Feb 2006 09:40:17 -0000 1.42 *************** *** 111,115 **** GLint max_texture_size; ! static const gl_capabilities & instance() throw (std::bad_alloc); private: --- 111,116 ---- GLint max_texture_size; ! static const gl_capabilities & instance() ! OPENVRML_THROW1(std::bad_alloc); private: *************** *** 121,125 **** boost::scoped_ptr<const gl_capabilities> gl_capabilities::instance_; ! const gl_capabilities & gl_capabilities::instance() throw (std::bad_alloc) { if (!gl_capabilities::instance_) { --- 122,127 ---- boost::scoped_ptr<const gl_capabilities> gl_capabilities::instance_; ! const gl_capabilities & gl_capabilities::instance() ! OPENVRML_THROW1(std::bad_alloc) { if (!gl_capabilities::instance_) { *************** *** 932,936 **** * @brief Destroy. */ ! viewer::~viewer() throw () { gluDeleteTess(this->tesselator); --- 934,938 ---- * @brief Destroy. */ ! viewer::~viewer() OPENVRML_NOTHROW { gluDeleteTess(this->tesselator); *************** *** 3810,3814 **** * @param rot rotation. */ ! void viewer::rotate(const openvrml::rotation & rot) throw () { assert(this->browser()); --- 3812,3816 ---- * @param rot rotation. */ ! void viewer::rotate(const openvrml::rotation & rot) OPENVRML_NOTHROW { assert(this->browser()); |
From: Braden M. <br...@us...> - 2006-02-12 04:21:01
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4821/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g browser.cpp browser.h Log Message: Removed externproto_node_type::owning_ptr_to_class, as this created a reference cycle. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** browser.cpp 12 Feb 2006 03:15:40 -0000 1.125 --- browser.cpp 12 Feb 2006 04:20:51 -0000 1.126 *************** *** 2256,2259 **** --- 2256,2261 ---- mutable externproto_node_types externproto_node_types_; + boost::scoped_ptr<boost::thread> load_proto_thread_; + public: externproto_node_class(openvrml::scene & scene, *************** *** 2277,2281 **** mutable boost::mutex mutex_; openvrml::node_interface_set interfaces_; - boost::shared_ptr<openvrml::node_class> owning_ptr_to_class_; typedef std::vector<boost::intrusive_ptr<openvrml::externproto_node> > --- 2279,2282 ---- *************** *** 2294,2301 **** virtual ~externproto_node_type() throw (); - void set_owning_ptr_to_class( - const boost::shared_ptr<openvrml::node_class> & node_class) - throw (); - void set_proto_node_type(openvrml::proto_node_class & proto_node_class) throw (std::bad_alloc); --- 2295,2298 ---- *************** *** 5622,5630 **** const std::vector<std::string> & uris) throw (boost::thread_resource_error): ! node_class(scene.browser()) ! { ! boost::function0<void> f = load_proto(*this, scene, uris); ! boost::thread t(f); ! } /** --- 5619,5627 ---- const std::vector<std::string> & uris) throw (boost::thread_resource_error): ! node_class(scene.browser()), ! load_proto_thread_( ! new boost::thread( ! boost::function0<void>(load_proto(*this, scene, uris)))) ! {} /** *************** *** 5632,5636 **** */ externproto_node_class::~externproto_node_class() throw () ! {} const boost::shared_ptr<openvrml::node_type> --- 5629,5635 ---- */ externproto_node_class::~externproto_node_class() throw () ! { ! this->load_proto_thread_->join(); ! } const boost::shared_ptr<openvrml::node_type> *************** *** 5693,5713 **** {} - /** - * @brief Set the owning pointer to the <code>openvrml::node_class</code>. - * - * The base <code>openvrml::node_type</code> simply holds a reference to - * the <code>openvrml::node_class</code>. If we get an EXTERNPROTO with no - * implementation, we need to store an owning pointer to the - * <code>node_class</code> here. See the comment in - * <code>Vrml97Parser::externproto</code> for details. - */ - void externproto_node_type::set_owning_ptr_to_class( - const boost::shared_ptr<openvrml::node_class> & node_class) throw () - { - assert(node_class); - assert(!this->owning_ptr_to_class_); - this->owning_ptr_to_class_ = node_class; - } - void externproto_node_type:: --- 5692,5695 ---- *************** *** 6957,6960 **** --- 6939,6957 ---- /** + * @brief Destroy. + */ + openvrml::browser::node_class_map::~node_class_map() throw () + { + # ifndef NDEBUG + for (map_t::const_iterator entry = this->map_.begin(); + entry != this->map_.end(); + ++entry) { + assert(entry->second.unique() + && "shared_ptr<node_class> was not unique when destroying the browser's node_class_map"); + } + # endif + } + + /** * @fn openvrml::browser::node_class_map::node_class_map(const node_class_map &) * Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** browser.h 14 Jan 2006 06:42:28 -0000 1.41 --- browser.h 12 Feb 2006 04:20:51 -0000 1.42 *************** *** 208,211 **** --- 208,212 ---- public: node_class_map(); + ~node_class_map() throw (); node_class_map & operator=(const node_class_map & ncm); Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Vrml97Parser.g 12 Dec 2005 19:23:08 -0000 1.45 --- Vrml97Parser.g 12 Feb 2006 04:20:51 -0000 1.46 *************** *** 977,1004 **** new externproto_node_class(scene, alt_uris)); ! for (vector<string>::const_iterator resource_id = ! alt_uris.begin(); ! resource_id != alt_uris.end(); ! ++resource_id) { ! const ::uri absolute_uri = !relative(::uri(*resource_id)) ! ? ::uri(*resource_id) ! : ::uri(*resource_id) ! .resolve_against(::uri(this->uri)); ! scene.browser().add_node_class(node_class_id(absolute_uri), externproto_class); } node_type = externproto_class->create_type(id->getText(), interfaces); - // - // Hack alert. If we get an empty list of URIs for the - // EXTERNPROTO implementation, we have nothing to put in - // browser::node_class_map_. That means that we'd wind up - // with no owning pointer to the node class except for the - // one in this scope (which is about to go away). So, we - // store an owning pointer in the externproto_node_type. - // - boost::dynamic_pointer_cast<externproto_node_type>(node_type) - ->set_owning_ptr_to_class(externproto_class); } --- 977,1008 ---- new externproto_node_class(scene, alt_uris)); ! if (alt_uris.empty()) { ! // ! // If the list of alternative URIs (i.e., implementation ! // identifiers) is empty, we need to generate one to put in ! // the browser's node_class map. (The node_class map is ! // where the owning pointer to the node_class is kept. ! // ! node_class_id class_id = this->uri + '#' + id->getText(); ! scene.browser().add_node_class(class_id, externproto_class); + } else { + for (vector<string>::const_iterator resource_id = + alt_uris.begin(); + resource_id != alt_uris.end(); + ++resource_id) { + const ::uri absolute_uri = + !relative(::uri(*resource_id)) + ? ::uri(*resource_id) + : ::uri(*resource_id).resolve_against( + ::uri(this->uri)); + scene.browser().add_node_class( + node_class_id(absolute_uri), + externproto_class); + } } node_type = externproto_class->create_type(id->getText(), interfaces); } |
From: Braden M. <br...@us...> - 2006-02-12 04:20:59
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4821 Modified Files: ChangeLog Log Message: Removed externproto_node_type::owning_ptr_to_class, as this created a reference cycle. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1132 retrieving revision 1.1133 diff -C2 -d -r1.1132 -r1.1133 *** ChangeLog 12 Feb 2006 03:15:38 -0000 1.1132 --- ChangeLog 12 Feb 2006 04:20:50 -0000 1.1133 *************** *** 1,4 **** --- 1,31 ---- 2006-02-11 Braden McDaniel <br...@en...> + Removed externproto_node_type::owning_ptr_to_class, as this + created a reference cycle. + + * src/libopenvrml/openvrml/Vrml97Parser.g (externproto): If the + list of alternative URIs for the EXTERNPROTO implementation is + empty, generate a node_class_id from the world URI and the + EXTERNPROTO id so that the node_type can be added to the browser. + * src/libopenvrml/openvrml/browser.cpp + (externproto_node_class): Added boost::scoped_ptr to the + load_proto thread. + (externproto_node_type): Removed owning_ptr_to_class_ and + set_owning_ptr_to_class. + (externproto_node_class(openvrml::scene &, const + std::vector<std::string> &): Initialize load_proto_thread_ with + the new thread. + (externproto_node_class::~externproto_node_class()): Join the + load_proto thread. + (openvrml::browser::node_class_map::~node_class_map()): Added + debug code to ensure that the node_class pointers in the map are + the last owning references at the point the node_class_map is + destroyed. + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::node_class_map): Added nothrow exception + specification to the node_class_map destructor. + + 2006-02-11 Braden McDaniel <br...@en...> + Build with Microsoft Visual C++ 8.0. |