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-04-21 14:33:25
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24242/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for creating scene graphs with the level 3 nodes of the Interpolation component. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile.am 20 Apr 2006 05:24:11 -0000 1.31 --- Makefile.am 21 Apr 2006 14:33:12 -0000 1.32 *************** *** 27,30 **** --- 27,31 ---- openvrml/x3d_geometry2d.h \ openvrml/x3d_texturing.h \ + openvrml/x3d_interpolation.h \ openvrml/x3d_key_device_sensor.h \ openvrml/x3d_event_utilities.h \ *************** *** 111,114 **** --- 112,116 ---- openvrml/x3d_geometry2d.cpp \ openvrml/x3d_texturing.cpp \ + openvrml/x3d_interpolation.cpp \ openvrml/x3d_key_device_sensor.cpp \ openvrml/x3d_event_utilities.cpp \ |
From: Braden M. <br...@us...> - 2006-04-21 14:33:16
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24242/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_interpolation.cpp x3d_interpolation.h Log Message: Added support for creating scene graphs with the level 3 nodes of the Interpolation component. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** browser.cpp 21 Apr 2006 03:41:15 -0000 1.169 --- browser.cpp 21 Apr 2006 14:33:12 -0000 1.170 *************** *** 1,3 **** ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 79 -*- // // OpenVRML --- 1,3 ---- ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML *************** *** 54,57 **** --- 54,58 ---- # include "x3d_geometry2d.h" # include "x3d_texturing.h" + # include "x3d_interpolation.h" # include "x3d_key_device_sensor.h" # include "x3d_event_utilities.h" *************** *** 6007,6010 **** --- 6008,6012 ---- register_geometry2d_node_classes(b); register_texturing_node_classes(b); + register_interpolation_node_classes(b); register_key_device_sensor_node_classes(b); register_event_utilities_node_classes(b); *************** *** 12340,12344 **** size_t x3d_interpolation_component::support_level() const OPENVRML_NOTHROW { ! return 2; } --- 12342,12346 ---- size_t x3d_interpolation_component::support_level() const OPENVRML_NOTHROW { ! return 3; } *************** *** 12541,12544 **** --- 12543,12610 ---- } } + + if (level >= 3) { + // + // CoordinateInterpolator2D + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sffloat_id, + "set_fraction"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "key"), + node_interface(node_interface::exposedfield_id, + field_value::mfvec2f_id, + "keyValue"), + node_interface(node_interface::eventout_id, + field_value::mfvec2f_id, + "value_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 5); + add_scope_entry(b, + "CoordinateInterpolator2D", + interface_set, + "urn:X-openvrml:node:CoordinateInterpolator2D", + scope); + } + + // + // PositionInterpolator2D node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::eventin_id, + field_value::sffloat_id, + "set_fraction"), + node_interface(node_interface::exposedfield_id, + field_value::mffloat_id, + "key"), + node_interface(node_interface::exposedfield_id, + field_value::mfvec2f_id, + "keyValue"), + node_interface(node_interface::eventout_id, + field_value::sfvec2f_id, + "value_changed") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 5); + add_scope_entry(b, + "PositionInterpolator2D", + interface_set, + "urn:X-openvrml:node:PositionInterpolator2D", + scope); + } + } } --- NEW FILE: x3d_interpolation.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // OpenVRML // // Copyright 1998 Chris Morley // Copyright 2001, 2002, 2003, 2004, 2005 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_INTERPOLATION_H # define OPENVRML_X3D_INTERPOLATION_H namespace openvrml { class browser; } extern "C" void register_interpolation_node_classes(openvrml::browser & b); # endif --- NEW FILE: x3d_interpolation.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifdef HAVE_CONFIG_H # include <config.h> # endif # include <boost/array.hpp> # include <private.h> # include "browser.h" # include "node_impl_util.h" # include "x3d_interpolation.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for CoordinateInterpolator2D nodes. */ class OPENVRML_LOCAL coordinate_interpolator2d_class : public node_class { public: static const char * const id; explicit coordinate_interpolator2d_class(openvrml::browser & browser); virtual ~coordinate_interpolator2d_class() OPENVRML_NOTHROW; private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; /** * @brief Class object for PositionInterpolator2D nodes. */ class OPENVRML_LOCAL position_interpolator2d_class : public node_class { public: static const char * const id; explicit position_interpolator2d_class(openvrml::browser & browser); virtual ~position_interpolator2d_class() OPENVRML_NOTHROW; private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; } void register_interpolation_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class(coordinate_interpolator2d_class::id, shared_ptr<node_class>( new coordinate_interpolator2d_class(b))); b.add_node_class(position_interpolator2d_class::id, shared_ptr<node_class>( new position_interpolator2d_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL coordinate_interpolator2d_node : public abstract_node<coordinate_interpolator2d_node>, public child_node { friend class coordinate_interpolator2d_class; class set_fraction_listener : public event_listener_base<self_t>, public sffloat_listener { public: explicit set_fraction_listener(self_t & node); virtual ~set_fraction_listener() OPENVRML_NOTHROW; private: virtual void do_process_event(const sffloat & fraction, double timestamp) OPENVRML_THROW1(std::bad_alloc); }; set_fraction_listener set_fraction_listener_; exposedfield<mffloat> key_; exposedfield<mfvec2f> key_value_; mfvec2f value_changed_; mfvec2f_emitter value_changed_emitter_; public: coordinate_interpolator2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~coordinate_interpolator2d_node() OPENVRML_NOTHROW; }; class OPENVRML_LOCAL position_interpolator2d_node : public abstract_node<position_interpolator2d_node>, public child_node { friend class position_interpolator2d_class; class set_fraction_listener : public event_listener_base<self_t>, public sffloat_listener { public: explicit set_fraction_listener(self_t & node); virtual ~set_fraction_listener() OPENVRML_NOTHROW; private: virtual void do_process_event(const sffloat & fraction, double timestamp) OPENVRML_THROW1(std::bad_alloc); }; set_fraction_listener set_fraction_listener_; exposedfield<mffloat> key_; exposedfield<mfvec2f> key_value_; sfvec2f value_changed_; sfvec2f_emitter value_changed_emitter_; public: position_interpolator2d_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~position_interpolator2d_node() OPENVRML_NOTHROW; }; /** * @brief @c node_class identifier. */ const char * const coordinate_interpolator2d_class::id = "urn:X-openvrml:node:CoordinateInterpolator2D"; /** * @brief Construct. * * @param browser the @c browser associated with this * @c coordinate_interpolator2d_class. */ coordinate_interpolator2d_class:: coordinate_interpolator2d_class(openvrml::browser & browser): node_class(coordinate_interpolator2d_class::id, browser) {} /** * @brief Destroy. */ coordinate_interpolator2d_class::~coordinate_interpolator2d_class() OPENVRML_NOTHROW {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating CoordinateInterpolator2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by coordinate_interpolator2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> coordinate_interpolator2d_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 5> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::eventin_id, field_value::sffloat_id, "set_fraction"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "key"), node_interface(node_interface::exposedfield_id, field_value::mfvec2f_id, "keyValue"), node_interface(node_interface::eventout_id, field_value::mfvec2f_id, "value_changed") }; typedef node_type_impl<coordinate_interpolator2d_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<sfnode> >( &coordinate_interpolator2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<sfnode> >( &coordinate_interpolator2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<sfnode> >( &coordinate_interpolator2d_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_eventin( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< coordinate_interpolator2d_node::set_fraction_listener>( &coordinate_interpolator2d_node::set_fraction_listener_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mffloat> >( &coordinate_interpolator2d_node::key_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mffloat> >( &coordinate_interpolator2d_node::key_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mffloat> >( &coordinate_interpolator2d_node::key_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mfvec2f> >( &coordinate_interpolator2d_node::key_value_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mfvec2f> >( &coordinate_interpolator2d_node::key_value_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<coordinate_interpolator2d_node>::exposedfield<mfvec2f> >( &coordinate_interpolator2d_node::key_value_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< coordinate_interpolator2d_node::mfvec2f_emitter>( &coordinate_interpolator2d_node::value_changed_emitter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @brief @c node_class identifier. */ const char * const position_interpolator2d_class::id = "urn:X-openvrml:node:PositionInterpolator2D"; /** * @brief Construct. * * @param browser the @c browser associated with this * @c position_interpolator2d_class. */ position_interpolator2d_class:: position_interpolator2d_class(openvrml::browser & browser): node_class(position_interpolator2d_class::id, browser) {} /** * @brief Destroy. */ position_interpolator2d_class::~position_interpolator2d_class() OPENVRML_NOTHROW {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating PositionInterpolator2D nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by position_interpolator2d_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> position_interpolator2d_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 5> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::eventin_id, field_value::sffloat_id, "set_fraction"), node_interface(node_interface::exposedfield_id, field_value::mffloat_id, "key"), node_interface(node_interface::exposedfield_id, field_value::mfvec2f_id, "keyValue"), node_interface(node_interface::eventout_id, field_value::sfvec2f_id, "value_changed") }; typedef node_type_impl<position_interpolator2d_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<position_interpolator2d_node>::exposedfield<sfnode> >( &position_interpolator2d_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<position_interpolator2d_node>::exposedfield<sfnode> >( &position_interpolator2d_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<position_interpolator2d_node>::exposedfield<sfnode> >( &position_interpolator2d_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_eventin( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< position_interpolator2d_node::set_fraction_listener>( &position_interpolator2d_node::set_fraction_listener_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mffloat> >( &position_interpolator2d_node::key_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mffloat> >( &position_interpolator2d_node::key_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mffloat> >( &position_interpolator2d_node::key_))); } else if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mfvec2f> >( &position_interpolator2d_node::key_value_)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mfvec2f> >( &position_interpolator2d_node::key_value_)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<position_interpolator2d_node>::exposedfield<mfvec2f> >( &position_interpolator2d_node::key_value_))); } else if (*interface == *++supported_interface) { the_node_type.add_eventout( supported_interface->field_type, supported_interface->id, node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< position_interpolator2d_node::sfvec2f_emitter>( &position_interpolator2d_node::value_changed_emitter_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class coordinate_interpolator2d_node * * @brief Represents CoordinateInterpolator2D node instances. */ /** * @var coordinate_interpolator2d_node::CoordinateInterpolator2D_class * * @brief Class object for CoordinateInterpolator2D nodes. */ /** * @var coordinate_interpolator2d_node::set_fraction_ * * @brief set_fraction eventIn */ /** * @var coordinate_interpolator2d_node::key_ * * @brief key exposedField */ /** * @var coordinate_interpolator2d_node::key_value_ * * @brief key_value exposedField */ /** * @var coordinate_interpolator2d_node::value_changed_ * * @brief value_changed eventOut */ coordinate_interpolator2d_node::set_fraction_listener:: set_fraction_listener(self_t & node): node_event_listener(node), event_listener_base<self_t>(node), sffloat_listener(node) {} coordinate_interpolator2d_node::set_fraction_listener:: ~set_fraction_listener() OPENVRML_NOTHROW {} void coordinate_interpolator2d_node::set_fraction_listener:: do_process_event(const sffloat & /* fraction */, const double /* timestamp */) OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ coordinate_interpolator2d_node:: coordinate_interpolator2d_node( const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), abstract_node<self_t>(type, scope), child_node(type, scope), set_fraction_listener_(*this), key_(*this), key_value_(*this), value_changed_emitter_(*this, this->value_changed_) {} /** * @brief Destroy. */ coordinate_interpolator2d_node::~coordinate_interpolator2d_node() OPENVRML_NOTHROW {} /** * @class position_interpolator2d_node * * @brief Represents PositionInterpolator2D node instances. */ /** * @var position_interpolator2d_node::PositionInterpolator2D_class * * @brief Class object for PositionInterpolator2D nodes. */ /** * @var position_interpolator2d_node::set_fraction_ * * @brief set_fraction eventIn */ /** * @var position_interpolator2d_node::key_ * * @brief key exposedField */ /** * @var position_interpolator2d_node::key_value_ * * @brief key_value exposedField */ /** * @var position_interpolator2d_node::value_changed_ * * @brief value_changed eventOut */ position_interpolator2d_node::set_fraction_listener:: set_fraction_listener(self_t & node): node_event_listener(node), event_listener_base<self_t>(node), sffloat_listener(node) {} position_interpolator2d_node::set_fraction_listener:: ~set_fraction_listener() OPENVRML_NOTHROW {} void position_interpolator2d_node::set_fraction_listener:: do_process_event(const sffloat & /* fraction */, const double /* timestamp */) OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ position_interpolator2d_node:: position_interpolator2d_node( const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), abstract_node<self_t>(type, scope), child_node(type, scope), set_fraction_listener_(*this), key_(*this), key_value_(*this), value_changed_emitter_(*this, this->value_changed_) {} /** * @brief Destroy. */ position_interpolator2d_node::~position_interpolator2d_node() OPENVRML_NOTHROW {} } |
From: Braden M. <br...@us...> - 2006-04-21 03:41:18
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32350/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Register Grouping node_classes. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** browser.cpp 20 Apr 2006 05:24:11 -0000 1.168 --- browser.cpp 21 Apr 2006 03:41:15 -0000 1.169 *************** *** 49,52 **** --- 49,53 ---- # include "x3d_core.h" # include "x3d_networking.h" + # include "x3d_grouping.h" # include "x3d_rendering.h" # include "x3d_shape.h" *************** *** 6001,6004 **** --- 6002,6006 ---- register_vrml97_node_classes(b); register_networking_node_classes(b); + register_grouping_node_classes(b); register_rendering_node_classes(b); register_shape_node_classes(b); |
From: Braden M. <br...@us...> - 2006-04-21 03:41:17
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32350 Modified Files: ChangeLog Log Message: Register Grouping node_classes. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1225 retrieving revision 1.1226 diff -C2 -d -r1.1225 -r1.1226 *** ChangeLog 20 Apr 2006 05:24:10 -0000 1.1225 --- ChangeLog 21 Apr 2006 03:41:14 -0000 1.1226 *************** *** 1,4 **** --- 1,10 ---- 2006-04-20 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp + (register_node_classes(openvrml::browser &)): Register Grouping + node_classes. + + 2006-04-20 Braden McDaniel <br...@en...> + Added support for creating scene graphs with the level 3 nodes of the Grouping component. |
From: Braden M. <br...@us...> - 2006-04-20 05:24:14
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2548/src/libopenvrml Modified Files: Makefile.am Log Message: Added support for creating scene graphs with the level 3 nodes of the Grouping component. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/Makefile.am,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Makefile.am 11 Apr 2006 07:34:51 -0000 1.30 --- Makefile.am 20 Apr 2006 05:24:11 -0000 1.31 *************** *** 22,25 **** --- 22,26 ---- openvrml/x3d_core.h \ openvrml/x3d_networking.h \ + openvrml/x3d_grouping.h \ openvrml/x3d_rendering.h \ openvrml/x3d_shape.h \ *************** *** 105,108 **** --- 106,110 ---- openvrml/x3d_core.cpp \ openvrml/x3d_networking.cpp \ + openvrml/x3d_grouping.cpp \ openvrml/x3d_rendering.cpp \ openvrml/x3d_shape.cpp \ |
From: Braden M. <br...@us...> - 2006-04-20 05:24:14
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2548/src/libopenvrml/openvrml Modified Files: browser.cpp Added Files: x3d_grouping.cpp x3d_grouping.h Log Message: Added support for creating scene graphs with the level 3 nodes of the Grouping component. --- NEW FILE: x3d_grouping.cpp --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifdef HAVE_CONFIG_H # include <config.h> # endif # include <boost/array.hpp> # include <private.h> # include "browser.h" # include "node_impl_util.h" # include "x3d_grouping.h" using namespace openvrml; using namespace openvrml::node_impl_util; using namespace std; namespace { /** * @brief Class object for StaticGroup nodes. */ class OPENVRML_LOCAL static_group_class : public node_class { public: static const char * const id; explicit static_group_class(openvrml::browser & browser); virtual ~static_group_class() OPENVRML_NOTHROW; private: virtual const boost::shared_ptr<node_type> do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc); }; } void register_grouping_node_classes(openvrml::browser & b) { using boost::shared_ptr; using openvrml::node_class; b.add_node_class(static_group_class::id, shared_ptr<node_class>(new static_group_class(b))); } namespace { using namespace openvrml_; class OPENVRML_LOCAL static_group_node : public abstract_node<static_group_node>, public grouping_node { friend class static_group_class; mfnode children_; sfvec3f bbox_center_; sfvec3f bbox_size_; viewer::object_t viewerObject; bounding_sphere bsphere; public: static_group_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope); virtual ~static_group_node() OPENVRML_NOTHROW; virtual bool modified() const; protected: virtual void do_render_child(openvrml::viewer & viewer, rendering_context context); virtual const openvrml::bounding_volume & do_bounding_volume() const; virtual const std::vector<boost::intrusive_ptr<node> > & do_children() const OPENVRML_NOTHROW; virtual void recalc_bsphere(); void render_nocull(openvrml::viewer & viewer, rendering_context context); }; /** * @brief @c node_class identifier. */ const char * const static_group_class::id = "urn:X-openvrml:node:StaticGroup"; /** * @brief Construct. * * @param browser the browser associated with this static_group_class. */ static_group_class::static_group_class(openvrml::browser & browser): node_class(static_group_class::id, browser) {} /** * @brief Destroy. */ static_group_class::~static_group_class() OPENVRML_NOTHROW {} /** * @brief Create a node_type. * * @param id the name for the new node_type. * @param interfaces the interfaces for the new node_type. * * @return a node_type_ptr to a node_type capable of creating StaticGroup nodes. * * @exception unsupported_interface if @p interfaces includes an interface * not supported by static_group_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> static_group_class::do_create_type(const std::string & id, const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { typedef boost::array<node_interface, 4> supported_interfaces_t; static const supported_interfaces_t supported_interfaces = { node_interface(node_interface::exposedfield_id, field_value::sfnode_id, "metadata"), node_interface(node_interface::field_id, field_value::mfnode_id, "children"), node_interface(node_interface::field_id, field_value::sfvec3f_id, "bboxCenter"), node_interface(node_interface::field_id, field_value::sfvec3f_id, "bboxSize") }; typedef node_type_impl<static_group_node> node_type_t; const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); node_type_t & the_node_type = static_cast<node_type_t &>(*type); for (node_interface_set::const_iterator interface(interfaces.begin()); interface != interfaces.end(); ++interface) { supported_interfaces_t::const_iterator supported_interface = supported_interfaces.begin() - 1; if (*interface == *++supported_interface) { the_node_type.add_exposedfield( supported_interface->field_type, supported_interface->id, node_type_t::event_listener_ptr_ptr( new node_type_t::event_listener_ptr< abstract_node<static_group_node>::exposedfield<sfnode> >( &static_group_node::metadata)), node_type_t::field_ptr_ptr( new node_type_t::field_ptr< abstract_node<static_group_node>::exposedfield<sfnode> >( &static_group_node::metadata)), node_type_t::event_emitter_ptr_ptr( new node_type_t::event_emitter_ptr< abstract_node<static_group_node>::exposedfield<sfnode> >( &static_group_node::metadata))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<mfnode>( &static_group_node::children_))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<sfvec3f>( &static_group_node::bbox_center_))); } else if (*interface == *++supported_interface) { the_node_type.add_field( supported_interface->field_type, supported_interface->id, node_type_t::field_ptr_ptr( new node_type_t::field_ptr<sfvec3f>( &static_group_node::bbox_size_))); } else { throw unsupported_interface(*interface); } } return type; } /** * @class static_group_node * * @brief Represents StaticGroup node instances. */ /** * @var static_group_node::StaticGroup_class * * @brief Class object for StaticGroup nodes. */ /** * @var static_group_node::children_ * * @brief children field */ /** * @var static_group_node::bbox_center_ * * @brief bbox_center field */ /** * @var static_group_node::bbox_size_ * * @brief bbox_size field */ /** * @brief Get the children in the scene graph. * * @return the child nodes in the scene graph. */ const std::vector<boost::intrusive_ptr<node> > & static_group_node::do_children() const OPENVRML_NOTHROW { return this->children_.value(); } /** * @brief Determine whether the node has been modified. * * @return @c true if the node or one of its children has been modified, * @c false otherwise. */ bool static_group_node::modified() const { if (this->node::modified()) { return true; } for (size_t i = 0; i < this->children_.mfnode::value().size(); ++i) { if (this->children_.mfnode::value()[i]->modified()) { return true; } } return false; } /** * @brief Render the node. * * Render each of the children. * * @param viewer a Viewer. * @param context a rendering context. */ void static_group_node:: do_render_child(openvrml::viewer & viewer, rendering_context context) { if (context.cull_flag != bounding_volume::inside) { assert(dynamic_cast<const bounding_sphere *> (&this->bounding_volume())); const bounding_sphere & bs = static_cast<const bounding_sphere &>( this->bounding_volume()); bounding_sphere bv_copy(bs); bv_copy.transform(context.matrix()); bounding_volume::intersection r = viewer.intersect_view_volume(bv_copy); if (context.draw_bounding_spheres) { viewer.draw_bounding_sphere(bs, r); } if (r == bounding_volume::outside) { return; } if (r == bounding_volume::inside) { context.cull_flag = bounding_volume::inside; } } this->render_nocull(viewer, context); } /** * because children will already have done the culling, we don't need * to repeat it here. */ void static_group_node::render_nocull(openvrml::viewer & viewer, rendering_context context) { using std::vector; if (this->viewerObject && this->modified()) { viewer.remove_object(this->viewerObject); this->viewerObject = 0; } if (this->viewerObject) { viewer.insert_reference(this->viewerObject); } else if (!this->children_.mfnode::value().empty()) { vector<boost::intrusive_ptr<node> >::size_type i; vector<boost::intrusive_ptr<node> >::size_type n = this->children_.mfnode::value().size(); size_t nSensors = 0; this->viewerObject = viewer.begin_object(this->id().c_str()); // Draw nodes that impact their siblings (DirectionalLights, // TouchSensors, any others? ...) for (i = 0; i < n; ++i) { child_node * const child = node_cast<child_node *>( this->children_.mfnode::value()[i].get()); if (child) { if (node_cast<light_node *>(child) && !(node_cast<scoped_light_node *>(child))) { child->render_child(viewer, context); } else if ( node_cast<pointing_device_sensor_node *>(child)) { if (++nSensors == 1) { viewer.set_sensitive(this); } } } } // Do the rest of the children (except the scene-level lights) for (i = 0; i<n; ++i) { child_node * const child = node_cast<child_node *>( this->children_.mfnode::value()[i].get()); if (child && !(node_cast<light_node *>(child))) { child->render_child(viewer, context); } } // Turn off sensitivity if (nSensors > 0) { viewer.set_sensitive(0); } viewer.end_object(); } this->node::modified(false); } /** * @brief Get the bounding volume. * * @return the bounding volume associated with the node. */ const openvrml::bounding_volume & static_group_node::do_bounding_volume() const { if (this->bounding_volume_dirty()) { const_cast<static_group_node *>(this) ->recalc_bsphere(); } return this->bsphere; } /** * @fn void grouping_node_base<Derived>::recalc_bsphere() * * @brief Recalculate the bounding volume. */ void static_group_node::recalc_bsphere() { this->bsphere = bounding_sphere(); for (size_t i = 0; i < this->children_.value().size(); ++i) { const boost::intrusive_ptr<node> & node = this->children_.value()[i]; bounded_volume_node * bounded_volume = node_cast<bounded_volume_node *>(node.get()); if (bounded_volume) { const openvrml::bounding_volume & ci_bv = bounded_volume->bounding_volume(); this->bsphere.extend(ci_bv); } } this->bounding_volume_dirty(false); } /** * @brief Construct. * * @param type the node_type associated with this node. * @param scope the scope to which the node belongs. */ static_group_node:: static_group_node(const node_type & type, const boost::shared_ptr<openvrml::scope> & scope): node(type, scope), bounded_volume_node(type, scope), child_node(type, scope), abstract_node<self_t>(type, scope), grouping_node(type, scope), bbox_size_(vec3f(-1.0f, -1.0f, -1.0f)), viewerObject(0) {} /** * @brief Destroy. */ static_group_node::~static_group_node() OPENVRML_NOTHROW {} } Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** browser.cpp 19 Apr 2006 06:06:51 -0000 1.167 --- browser.cpp 20 Apr 2006 05:24:11 -0000 1.168 *************** *** 10125,10129 **** size_t x3d_grouping_component::support_level() const OPENVRML_NOTHROW { ! return 2; } --- 10125,10129 ---- size_t x3d_grouping_component::support_level() const OPENVRML_NOTHROW { ! return 3; } *************** *** 10284,10287 **** --- 10284,10317 ---- } } + + if (level >= 3) { + // + // StaticGroup node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::mfnode_id, + "children"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxCenter"), + node_interface(node_interface::field_id, + field_value::sfvec3f_id, + "bboxSize") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 4); + add_scope_entry(b, + "StaticGroup", + interface_set, + "urn:X-openvrml:node:StaticGroup", + scope); + } + } } --- NEW FILE: x3d_grouping.h --- // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML // // Copyright 2006 Braden McDaniel // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // # ifndef OPENVRML_X3D_GROUPING_H # define OPENVRML_X3D_GROUPING_H namespace openvrml { class browser; } extern "C" void register_grouping_node_classes(openvrml::browser & b); # endif |
From: Braden M. <br...@us...> - 2006-04-20 05:24:13
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2548 Modified Files: ChangeLog Log Message: Added support for creating scene graphs with the level 3 nodes of the Grouping component. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1224 retrieving revision 1.1225 diff -C2 -d -r1.1224 -r1.1225 *** ChangeLog 19 Apr 2006 06:06:51 -0000 1.1224 --- ChangeLog 20 Apr 2006 05:24:10 -0000 1.1225 *************** *** 1,2 **** --- 1,21 ---- + 2006-04-20 Braden McDaniel <br...@en...> + + Added support for creating scene graphs with the level 3 nodes of + the Grouping component. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/Makefile.am + (openvrml_include_HEADERS): Added openvrml/x3d_grouping.h. + (libopenvrml_la_SOURCES): Added openvrml/x3d_grouping.cpp. + * src/libopenvrml/openvrml/browser.cpp + (x3d_grouping_component::support_level() const): Return 3. + (x3d_grouping_component::do_add_to_scope(const openvrml::browser&, + openvrml::scope &, size_t) const): Add the level 3 node types to + the scope. + * src/libopenvrml/openvrml/x3d_grouping.cpp: Added file; Grouping + component node implementations that aren't VRML97 nodes. + * src/libopenvrml/openvrml/x3d_grouping.h: Added file; expose + node_class registration function. + 2006-04-19 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-19 06:06:56
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1858/src/libopenvrml/openvrml Modified Files: browser.cpp x3d_shape.cpp Log Message: Added support for creating scene graphs with the level 3 nodes of the Shape component. From Andrew Grieve <sg...@us...> Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** browser.cpp 18 Apr 2006 07:03:30 -0000 1.166 --- browser.cpp 19 Apr 2006 06:06:51 -0000 1.167 *************** *** 10806,10810 **** size_t x3d_shape_component::support_level() const OPENVRML_NOTHROW { ! return 2; } --- 10806,10810 ---- size_t x3d_shape_component::support_level() const OPENVRML_NOTHROW { ! return 3; } *************** *** 10949,10952 **** --- 10949,10985 ---- } } + + if (level >= 3) { + // + // FillProperties node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "filled"), + node_interface(node_interface::exposedfield_id, + field_value::sfcolor_id, + "hatchColor"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "hatched"), + node_interface(node_interface::exposedfield_id, + field_value::sfint32_id, + "hatchStyle") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 5); + add_scope_entry(b, + "FillProperties", + interface_set, + "urn:X-openvrml:node:FillProperties", + scope); + } + } } Index: x3d_shape.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_shape.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x3d_shape.cpp 16 Apr 2006 08:22:19 -0000 1.2 --- x3d_shape.cpp 19 Apr 2006 06:06:51 -0000 1.3 *************** *** 37,40 **** --- 37,58 ---- /** + * @brief Class object for FillProperties nodes. + */ + class OPENVRML_LOCAL fill_properties_class : public node_class { + public: + static const char * const id; + + explicit fill_properties_class(openvrml::browser & browser); + virtual ~fill_properties_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; + + + /** * @brief Class object for LineProperties nodes. */ *************** *** 58,61 **** --- 76,81 ---- using boost::shared_ptr; using openvrml::node_class; + b.add_node_class(fill_properties_class::id, + shared_ptr<node_class>(new fill_properties_class(b))); b.add_node_class(line_properties_class::id, shared_ptr<node_class>(new line_properties_class(b))); *************** *** 66,69 **** --- 86,106 ---- using namespace openvrml_; + class OPENVRML_LOCAL fill_properties_node : + public abstract_node<fill_properties_node> { + + friend class fill_properties_class; + + exposedfield<sfbool> filled_; + exposedfield<sfcolor> hatch_color_; + exposedfield<sfbool> hatched_; + exposedfield<sfint32> hatch_style_; + + public: + fill_properties_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~fill_properties_node() OPENVRML_NOTHROW; + }; + + class OPENVRML_LOCAL line_properties_node : public abstract_node<line_properties_node> { *************** *** 85,88 **** --- 122,340 ---- * @brief @c node_class identifier. */ + const char * const fill_properties_class::id = + "urn:X-openvrml:node:FillProperties"; + + /** + * @brief Construct. + * + * @param browser the browser associated with this fill_properties_class. + */ + fill_properties_class::fill_properties_class(openvrml::browser & browser): + node_class(fill_properties_class::id, browser) + {} + + /** + * @brief Destroy. + */ + fill_properties_class::~fill_properties_class() OPENVRML_NOTHROW + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating FillProperties nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by fill_properties_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + fill_properties_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 5> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "filled"), + node_interface(node_interface::exposedfield_id, + field_value::sfcolor_id, + "hatchColor"), + node_interface(node_interface::exposedfield_id, + field_value::sfbool_id, + "hatched"), + node_interface(node_interface::exposedfield_id, + field_value::sfint32_id, + "hatchStyle") + }; + typedef node_type_impl<fill_properties_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<fill_properties_node>::exposedfield<sfnode> >( + &fill_properties_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<fill_properties_node>::exposedfield<sfnode> >( + &fill_properties_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<fill_properties_node>::exposedfield<sfnode> >( + &fill_properties_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::filled_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::filled_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::filled_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<fill_properties_node>::exposedfield<sfcolor> >( + &fill_properties_node::hatch_color_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<fill_properties_node>::exposedfield<sfcolor> >( + &fill_properties_node::hatch_color_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<fill_properties_node>::exposedfield<sfcolor> >( + &fill_properties_node::hatch_color_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::hatched_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::hatched_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<fill_properties_node>::exposedfield<sfbool> >( + &fill_properties_node::hatched_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<fill_properties_node>::exposedfield<sfint32> >( + &fill_properties_node::hatch_style_)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<fill_properties_node>::exposedfield<sfint32> >( + &fill_properties_node::hatch_style_)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<fill_properties_node>::exposedfield<sfint32> >( + &fill_properties_node::hatch_style_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + + /** + * @class fill_properties_node + * + * @brief Represents FillProperties node instances. + */ + + /** + * @var fill_properties_node::FillProperties_class + * + * @brief Class object for FillProperties nodes. + */ + + /** + * @var fill_properties_node::filled_ + * + * @brief filled exposedField + */ + + /** + * @var fill_properties_node::hatch_color_ + * + * @brief hatch_color exposedField + */ + + /** + * @var fill_properties_node::hatched_ + * + * @brief hatched exposedField + */ + + /** + * @var fill_properties_node::hatch_style_ + * + * @brief hatch_style exposedField + */ + + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + fill_properties_node:: + fill_properties_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope): + node(type, scope), + abstract_node<self_t>(type, scope), + filled_(*this, true), + hatch_color_(*this, color(1,1,1)), + hatched_(*this, true), + hatch_style_(*this, 1) + {} + + /** + * @brief Destroy. + */ + fill_properties_node::~fill_properties_node() OPENVRML_NOTHROW + {} + + + /** + * @brief @c node_class identifier. + */ const char * const line_properties_class::id = "urn:X-openvrml:node:LineProperties"; |
From: Braden M. <br...@us...> - 2006-04-19 06:06:56
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1858 Modified Files: ChangeLog Log Message: Added support for creating scene graphs with the level 3 nodes of the Shape component. From Andrew Grieve <sg...@us...> Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1223 retrieving revision 1.1224 diff -C2 -d -r1.1223 -r1.1224 *** ChangeLog 18 Apr 2006 07:03:29 -0000 1.1223 --- ChangeLog 19 Apr 2006 06:06:51 -0000 1.1224 *************** *** 1,6 **** --- 1,21 ---- + 2006-04-19 Braden McDaniel <br...@en...> + + Added support for creating scene graphs with the level 3 nodes of + the Shape component. + From Andrew Grieve <sg...@us...> + + * src/libopenvrml/openvrml/browser.cpp + (x3d_shape_component::support_level() const): Return 3. + (x3d_shape_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Add the level 3 node types to + the scope. + * src/libopenvrml/openvrml/x3d_shape.cpp: Added level 2 node + implementations. + 2006-04-18 Braden McDaniel <br...@en...> Added support for creating scene graphs with the level 2 nodes of the Geometry2D component. + From Andrew Grieve <sg...@us...> * src/libopenvrml/openvrml/browser.cpp |
From: Braden M. <br...@us...> - 2006-04-18 07:03:34
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11318/src/libopenvrml/openvrml Modified Files: browser.cpp x3d_geometry2d.cpp Log Message: Added support for creating scene graphs with the level 2 nodes of the Geometry2D component. Index: x3d_geometry2d.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_geometry2d.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** x3d_geometry2d.cpp 16 Apr 2006 08:22:19 -0000 1.3 --- x3d_geometry2d.cpp 18 Apr 2006 07:03:30 -0000 1.4 *************** *** 37,40 **** --- 37,112 ---- /** + * @brief Class object for Arc2D nodes. + */ + class OPENVRML_LOCAL arc2d_class : public node_class { + public: + static const char * const id; + + explicit arc2d_class(openvrml::browser & browser); + virtual ~arc2d_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; + + + /** + * @brief Class object for ArcClose2D nodes. + */ + class OPENVRML_LOCAL arc_close2d_class : public node_class { + public: + static const char * const id; + + explicit arc_close2d_class(openvrml::browser & browser); + virtual ~arc_close2d_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; + + + /** + * @brief Class object for Circle2D nodes. + */ + class OPENVRML_LOCAL circle2d_class : public node_class { + public: + static const char * const id; + + explicit circle2d_class(openvrml::browser & browser); + virtual ~circle2d_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; + + + /** + * @brief Class object for Disk2D nodes. + */ + class OPENVRML_LOCAL disk2d_class : public node_class { + public: + static const char * const id; + + explicit disk2d_class(openvrml::browser & browser); + virtual ~disk2d_class() OPENVRML_NOTHROW; + + private: + virtual const boost::shared_ptr<node_type> + do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc); + }; + + + /** * @brief Class object for Polyline2D nodes. */ *************** *** 112,115 **** --- 184,195 ---- using boost::shared_ptr; using openvrml::node_class; + b.add_node_class(arc2d_class::id, + shared_ptr<node_class>(new arc2d_class(b))); + b.add_node_class(arc_close2d_class::id, + shared_ptr<node_class>(new arc_close2d_class(b))); + b.add_node_class(circle2d_class::id, + shared_ptr<node_class>(new circle2d_class(b))); + b.add_node_class(disk2d_class::id, + shared_ptr<node_class>(new disk2d_class(b))); b.add_node_class(polyline2d_class::id, shared_ptr<node_class>(new polyline2d_class(b))); *************** *** 126,129 **** --- 206,295 ---- using namespace openvrml_; + class OPENVRML_LOCAL arc2d_node : public abstract_node<arc2d_node>, + public geometry_node, + public child_node { + friend class arc2d_class; + + sffloat end_angle_; + sffloat radius_; + sffloat start_angle_; + + public: + arc2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~arc2d_node() OPENVRML_NOTHROW; + + virtual bool modified() const; + private: + virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, + rendering_context context); + }; + + + class OPENVRML_LOCAL arc_close2d_node : + public abstract_node<arc_close2d_node>, + public geometry_node, + public child_node { + + friend class arc_close2d_class; + + sfstring closure_type_; + sffloat end_angle_; + sffloat radius_; + sfbool solid_; + sffloat start_angle_; + + public: + arc_close2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~arc_close2d_node() OPENVRML_NOTHROW; + + virtual bool modified() const; + private: + virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, + rendering_context context); + }; + + + class OPENVRML_LOCAL circle2d_node : public abstract_node<circle2d_node>, + public geometry_node, + public child_node { + friend class circle2d_class; + + sffloat radius_; + + public: + circle2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~circle2d_node() OPENVRML_NOTHROW; + + virtual bool modified() const; + private: + virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, + rendering_context context); + }; + + + class OPENVRML_LOCAL disk2d_node : public abstract_node<disk2d_node>, + public geometry_node, + public child_node { + friend class disk2d_class; + + sffloat inner_radius_; + sffloat outer_radius_; + sfbool solid_; + + public: + disk2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope); + virtual ~disk2d_node() OPENVRML_NOTHROW; + + virtual bool modified() const; + private: + virtual viewer::object_t do_render_geometry(openvrml::viewer & viewer, + rendering_context context); + }; + + class OPENVRML_LOCAL polyline2d_node : public abstract_node<polyline2d_node>, *************** *** 212,215 **** --- 378,1143 ---- * @brief @c node_class identifier. */ + const char * const arc2d_class::id = "urn:X-openvrml:node:Arc2D"; + + /** + * @brief Construct. + * + * @param browser the @c browser associated with this @c arc2d_class. + */ + arc2d_class::arc2d_class(openvrml::browser & browser): + node_class(arc2d_class::id, browser) + {} + + /** + * @brief Destroy. + */ + arc2d_class::~arc2d_class() OPENVRML_NOTHROW + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating Arc2D nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by arc2d_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + arc2d_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 4> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "endAngle"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "startAngle") + }; + typedef node_type_impl<arc2d_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<arc2d_node>::exposedfield<sfnode> >( + &arc2d_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<arc2d_node>::exposedfield<sfnode> >( + &arc2d_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<arc2d_node>::exposedfield<sfnode> >( + &arc2d_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc2d_node::end_angle_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc2d_node::radius_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc2d_node::start_angle_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** + * @class arc2d_node + * + * @brief Represents Arc2D node instances. + */ + + /** + * @var arc2d_node::Arc2D_class + * + * @brief Class object for Arc2D nodes. + */ + + /** + * @var arc2d_node::end_angle_ + * + * @brief end_angle field + */ + + /** + * @var arc2d_node::radius_ + * + * @brief radius field + */ + + /** + * @var arc2d_node::start_angle_ + * + * @brief start_angle field + */ + + + /** + * @brief Insert this geometry into @p viewer's display list. + * + * @param viewer a Viewer. + * @param context the rendering context. + * + * @todo Implement this! + */ + openvrml::viewer::object_t + arc2d_node:: + do_render_geometry(openvrml::viewer & /* viewer */, + const rendering_context /* context */) + { + //TODO: Implement this! + return 0; + } + + + /** + * @brief Determine whether the node has been modified. + * + * @return @c true if the node or one of its children has been modified, + * @c false otherwise. + */ + bool arc2d_node::modified() const + { + return this->node::modified(); + } + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + arc2d_node:: + arc2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope): + node(type, scope), + bounded_volume_node(type, scope), + abstract_node<self_t>(type, scope), + geometry_node(type, scope), + child_node(type, scope), + end_angle_(1.57079633f), + radius_(1) + {} + + /** + * @brief Destroy. + */ + arc2d_node::~arc2d_node() OPENVRML_NOTHROW + {} + + + /** + * @brief @c node_class identifier. + */ + const char * const arc_close2d_class::id = + "urn:X-openvrml:node:ArcClose2D"; + + /** + * @brief Construct. + * + * @param browser the @c browser associated with this @c arc_close2d_class. + */ + arc_close2d_class::arc_close2d_class(openvrml::browser & browser): + node_class(arc_close2d_class::id, browser) + {} + + /** + * @brief Destroy. + */ + arc_close2d_class::~arc_close2d_class() OPENVRML_NOTHROW + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating ArcClose2D nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by arc_close2d_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + arc_close2d_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 6> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sfstring_id, + "closureType"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "endAngle"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius"), + node_interface(node_interface::field_id, + field_value::sfbool_id, + "solid"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "startAngle") + }; + typedef node_type_impl<arc_close2d_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<arc_close2d_node>::exposedfield<sfnode> >( + &arc_close2d_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<arc_close2d_node>::exposedfield<sfnode> >( + &arc_close2d_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<arc_close2d_node>::exposedfield<sfnode> >( + &arc_close2d_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sfstring>( + &arc_close2d_node::closure_type_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc_close2d_node::end_angle_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc_close2d_node::radius_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sfbool>( + &arc_close2d_node::solid_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &arc_close2d_node::start_angle_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** + * @class arc_close2d_node + * + * @brief Represents ArcClose2D node instances. + */ + + /** + * @var arc_close2d_node::ArcClose2D_class + * + * @brief Class object for ArcClose2D nodes. + */ + + /** + * @var arc_close2d_node::closure_type_ + * + * @brief closure_type field + */ + + /** + * @var arc_close2d_node::end_angle_ + * + * @brief end_angle field + */ + + /** + * @var arc_close2d_node::radius_ + * + * @brief radius field + */ + + /** + * @var arc_close2d_node::solid_ + * + * @brief solid field + */ + + /** + * @var arc_close2d_node::start_angle_ + * + * @brief start_angle field + */ + + + /** + * @brief Insert this geometry into @p viewer's display list. + * + * @param viewer a Viewer. + * @param context the rendering context. + * + * @todo Implement this! + */ + openvrml::viewer::object_t + arc_close2d_node:: + do_render_geometry(openvrml::viewer & /* viewer */, + const rendering_context /* context */) + { + //TODO: Implement this! + return 0; + } + + + /** + * @brief Determine whether the node has been modified. + * + * @return @c true if the node or one of its children has been modified, + * @c false otherwise. + */ + bool arc_close2d_node::modified() const + { + return this->node::modified(); + } + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + arc_close2d_node:: + arc_close2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope): + node(type, scope), + bounded_volume_node(type, scope), + abstract_node<self_t>(type, scope), + geometry_node(type, scope), + child_node(type, scope), + closure_type_("PIE"), + end_angle_(1.57079633f), + radius_(1) + {} + + /** + * @brief Destroy. + */ + arc_close2d_node::~arc_close2d_node() OPENVRML_NOTHROW + {} + + + /** + * @brief @c node_class identifier. + */ + const char * const circle2d_class::id = "urn:X-openvrml:node:Circle2D"; + + /** + * @brief Construct. + * + * @param browser the @c browser associated with this @c circle2d_class. + */ + circle2d_class::circle2d_class(openvrml::browser & browser): + node_class(circle2d_class::id, browser) + {} + + /** + * @brief Destroy. + */ + circle2d_class::~circle2d_class() OPENVRML_NOTHROW + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating Circle2D nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by circle2d_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + circle2d_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 2> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius") + }; + typedef node_type_impl<circle2d_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<circle2d_node>::exposedfield<sfnode> >( + &circle2d_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<circle2d_node>::exposedfield<sfnode> >( + &circle2d_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<circle2d_node>::exposedfield<sfnode> >( + &circle2d_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &circle2d_node::radius_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** + * @class circle2d_node + * + * @brief Represents Circle2D node instances. + */ + + /** + * @var circle2d_node::Circle2D_class + * + * @brief Class object for Circle2D nodes. + */ + + /** + * @var circle2d_node::radius_ + * + * @brief radius field + */ + + + /** + * @brief Insert this geometry into @p viewer's display list. + * + * @param viewer a Viewer. + * @param context the rendering context. + * + * @todo Implement this! + */ + openvrml::viewer::object_t + circle2d_node:: + do_render_geometry(openvrml::viewer & /* viewer */, + const rendering_context /* context */) + { + //TODO: Implement this! + return 0; + } + + + /** + * @brief Determine whether the node has been modified. + * + * @return @c true if the node or one of its children has been modified, + * @c false otherwise. + */ + bool circle2d_node::modified() const + { + return this->node::modified(); + } + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + circle2d_node:: + circle2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope): + node(type, scope), + bounded_volume_node(type, scope), + abstract_node<self_t>(type, scope), + geometry_node(type, scope), + child_node(type, scope), + radius_(1) + {} + + /** + * @brief Destroy. + */ + circle2d_node::~circle2d_node() OPENVRML_NOTHROW + {} + + + /** + * @brief @c node_class identifier. + */ + const char * const disk2d_class::id = "urn:X-openvrml:node:Disk2D"; + + /** + * @brief Construct. + * + * @param browser the @c browser associated with this @c disk2d_class. + */ + disk2d_class::disk2d_class(openvrml::browser & browser): + node_class(disk2d_class::id, browser) + {} + + /** + * @brief Destroy. + */ + disk2d_class::~disk2d_class() OPENVRML_NOTHROW + {} + + /** + * @brief Create a node_type. + * + * @param id the name for the new node_type. + * @param interfaces the interfaces for the new node_type. + * + * @return a node_type_ptr to a node_type capable of creating Disk2D nodes. + * + * @exception unsupported_interface if @p interfaces includes an interface + * not supported by disk2d_class. + * @exception std::bad_alloc if memory allocation fails. + */ + const boost::shared_ptr<openvrml::node_type> + disk2d_class::do_create_type(const std::string & id, + const node_interface_set & interfaces) const + OPENVRML_THROW2(unsupported_interface, std::bad_alloc) + { + typedef boost::array<node_interface, 4> supported_interfaces_t; + static const supported_interfaces_t supported_interfaces = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "innerRadius"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "outerRadius"), + node_interface(node_interface::field_id, + field_value::sfbool_id, + "solid") + }; + typedef node_type_impl<disk2d_node> node_type_t; + + const boost::shared_ptr<node_type> type(new node_type_t(*this, id)); + node_type_t & the_node_type = static_cast<node_type_t &>(*type); + + for (node_interface_set::const_iterator interface(interfaces.begin()); + interface != interfaces.end(); + ++interface) { + supported_interfaces_t::const_iterator supported_interface = + supported_interfaces.begin() - 1; + if (*interface == *++supported_interface) { + the_node_type.add_exposedfield( + supported_interface->field_type, + supported_interface->id, + node_type_t::event_listener_ptr_ptr( + new node_type_t::event_listener_ptr< + abstract_node<disk2d_node>::exposedfield<sfnode> >( + &disk2d_node::metadata)), + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr< + abstract_node<disk2d_node>::exposedfield<sfnode> >( + &disk2d_node::metadata)), + node_type_t::event_emitter_ptr_ptr( + new node_type_t::event_emitter_ptr< + abstract_node<disk2d_node>::exposedfield<sfnode> >( + &disk2d_node::metadata))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &disk2d_node::inner_radius_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sffloat>( + &disk2d_node::outer_radius_))); + } else if (*interface == *++supported_interface) { + the_node_type.add_field( + supported_interface->field_type, + supported_interface->id, + node_type_t::field_ptr_ptr( + new node_type_t::field_ptr<sfbool>( + &disk2d_node::solid_))); + } else { + throw unsupported_interface(*interface); + } + } + return type; + } + + /** + * @class disk2d_node + * + * @brief Represents Disk2D node instances. + */ + + /** + * @var disk2d_node::Disk2D_class + * + * @brief Class object for Disk2D nodes. + */ + + /** + * @var disk2d_node::inner_radius_ + * + * @brief inner_radius field + */ + + /** + * @var disk2d_node::outer_radius_ + * + * @brief outer_radius field + */ + + /** + * @var disk2d_node::solid_ + * + * @brief solid field + */ + + /** + * @brief Insert this geometry into @p viewer's display list. + * + * @param viewer a Viewer. + * @param context the rendering context. + * + * @todo Implement this! + */ + openvrml::viewer::object_t + disk2d_node:: + do_render_geometry(openvrml::viewer & /* viewer */, + const rendering_context /* context */) + { + //TODO: Implement this! + return 0; + } + + /** + * @brief Determine whether the node has been modified. + * + * @return @c true if the node or one of its children has been modified, + * @c false otherwise. + */ + bool disk2d_node::modified() const + { + return this->node::modified(); + } + + /** + * @brief Construct. + * + * @param type the node_type associated with this node. + * @param scope the scope to which the node belongs. + */ + disk2d_node:: + disk2d_node(const node_type & type, + const boost::shared_ptr<openvrml::scope> & scope): + node(type, scope), + bounded_volume_node(type, scope), + abstract_node<self_t>(type, scope), + geometry_node(type, scope), + child_node(type, scope), + outer_radius_(1) + {} + + /** + * @brief Destroy. + */ + disk2d_node::~disk2d_node() OPENVRML_NOTHROW + {} + + + /** + * @brief @c node_class identifier. + */ const char * const polyline2d_class::id = "urn:X-openvrml:node:Polyline2D"; Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** browser.cpp 17 Apr 2006 07:29:17 -0000 1.165 --- browser.cpp 18 Apr 2006 07:03:30 -0000 1.166 *************** *** 11323,11327 **** size_t x3d_geometry2d_component::support_level() const OPENVRML_NOTHROW { ! return 1; } --- 11323,11327 ---- size_t x3d_geometry2d_component::support_level() const OPENVRML_NOTHROW { ! return 2; } *************** *** 11429,11432 **** --- 11429,11546 ---- } } + + if (level >= 2) { + // + // Arc2D node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "endAngle"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "startAngle") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 4); + add_scope_entry(b, + "Arc2D", + interface_set, + "urn:X-openvrml:node:Arc2D", + scope); + } + + // + // ArcClose2D node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sfstring_id, + "closureType"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "endAngle"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius"), + node_interface(node_interface::field_id, + field_value::sfbool_id, + "solid"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "startAngle") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 6); + add_scope_entry(b, + "ArcClose2D", + interface_set, + "urn:X-openvrml:node:ArcClose2D", + scope); + } + + // + // Circle2D node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "radius") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 2); + add_scope_entry(b, + "Circle2D", + interface_set, + "urn:X-openvrml:node:Circle2D", + scope); + } + + // + // Disk2D node + // + { + static const node_interface interfaces[] = { + node_interface(node_interface::exposedfield_id, + field_value::sfnode_id, + "metadata"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "innerRadius"), + node_interface(node_interface::field_id, + field_value::sffloat_id, + "outerRadius"), + node_interface(node_interface::field_id, + field_value::sfbool_id, + "solid") + }; + + static const node_interface_set interface_set(interfaces, + interfaces + 4); + add_scope_entry(b, + "Disk2D", + interface_set, + "urn:X-openvrml:node:Disk2D", + scope); + } + } } |
From: Braden M. <br...@us...> - 2006-04-18 07:03:33
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11318 Modified Files: ChangeLog Log Message: Added support for creating scene graphs with the level 2 nodes of the Geometry2D component. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1222 retrieving revision 1.1223 diff -C2 -d -r1.1222 -r1.1223 *** ChangeLog 18 Apr 2006 06:47:53 -0000 1.1222 --- ChangeLog 18 Apr 2006 07:03:29 -0000 1.1223 *************** *** 1,4 **** --- 1,17 ---- 2006-04-18 Braden McDaniel <br...@en...> + Added support for creating scene graphs with the level 2 nodes of + the Geometry2D component. + + * src/libopenvrml/openvrml/browser.cpp + (x3d_geometry2d_component::support_level() const): Return 2. + (x3d_geometry2d_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Add the + level 2 node types to the scope. + * src/libopenvrml/openvrml/x3d_geometry2d.cpp: Added level 2 node + implementations. + + 2006-04-18 Braden McDaniel <br...@en...> + Applied exception specification macros. |
From: Braden M. <br...@us...> - 2006-04-18 06:47:57
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30381/src/libopenvrml/openvrml Modified Files: x3d_geospatial.cpp x3d_nurbs.cpp Log Message: Applied exception specification macros. Index: x3d_nurbs.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_nurbs.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x3d_nurbs.cpp 16 Apr 2006 08:22:19 -0000 1.2 --- x3d_nurbs.cpp 18 Apr 2006 06:47:53 -0000 1.3 *************** *** 44,48 **** explicit contour2d_class(openvrml::browser & browser); ! virtual ~contour2d_class() throw (); private: --- 44,48 ---- explicit contour2d_class(openvrml::browser & browser); ! virtual ~contour2d_class() OPENVRML_NOTHROW; [...1474 lines suppressed...] {} void nurbs_trimmed_surface_node::remove_trimming_contour_listener:: do_process_event(const mfnode & /* fraction */, const double /* timestamp */) ! OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here *************** *** 4577,4581 **** * @brief Destroy. */ ! nurbs_trimmed_surface_node::~nurbs_trimmed_surface_node() throw () {} } --- 4577,4581 ---- * @brief Destroy. */ ! nurbs_trimmed_surface_node::~nurbs_trimmed_surface_node() OPENVRML_NOTHROW {} } Index: x3d_geospatial.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_geospatial.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x3d_geospatial.cpp 16 Apr 2006 08:22:19 -0000 1.2 --- x3d_geospatial.cpp 18 Apr 2006 06:47:53 -0000 1.3 *************** *** 44,48 **** explicit geo_coordinate_class(openvrml::browser & browser); ! virtual ~geo_coordinate_class() throw (); private: --- 44,48 ---- explicit geo_coordinate_class(openvrml::browser & browser); ! virtual ~geo_coordinate_class() OPENVRML_NOTHROW; [...1103 lines suppressed...] {} void geo_viewpoint_node::set_position_listener:: do_process_event(const sfvec3d & /* fraction */, const double /* timestamp */) ! OPENVRML_THROW1(std::bad_alloc) { //TODO: add logic here *************** *** 3352,3356 **** * @brief Destroy. */ ! geo_viewpoint_node::~geo_viewpoint_node() throw () {} } --- 3352,3356 ---- * @brief Destroy. */ ! geo_viewpoint_node::~geo_viewpoint_node() OPENVRML_NOTHROW {} } |
From: Braden M. <br...@us...> - 2006-04-18 06:47:56
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30381 Modified Files: ChangeLog Log Message: Applied exception specification macros. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1221 retrieving revision 1.1222 diff -C2 -d -r1.1221 -r1.1222 *** ChangeLog 17 Apr 2006 07:31:00 -0000 1.1221 --- ChangeLog 18 Apr 2006 06:47:53 -0000 1.1222 *************** *** 1,2 **** --- 1,9 ---- + 2006-04-18 Braden McDaniel <br...@en...> + + Applied exception specification macros. + + * src/libopenvrml/openvrml/x3d_geospatial.cpp + * src/libopenvrml/openvrml/x3d_nurbs.cpp + 2006-04-17 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-17 07:31:04
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1784 Modified Files: ChangeLog Log Message: Added test to check that we can safely import a component level that's already been imported via the profile. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1220 retrieving revision 1.1221 diff -C2 -d -r1.1220 -r1.1221 *** ChangeLog 17 Apr 2006 07:29:16 -0000 1.1220 --- ChangeLog 17 Apr 2006 07:31:00 -0000 1.1221 *************** *** 1,4 **** --- 1,10 ---- 2006-04-17 Braden McDaniel <br...@en...> + * tests/testsuite.at: Added test to check that we can safely + import a component level that's already been imported via the + profile. + + 2006-04-17 Braden McDaniel <br...@en...> + Allow components to be added redundantly. This is necessary in the current design, where importing component X level 2 imports |
From: Braden M. <br...@us...> - 2006-04-17 07:31:04
|
Update of /cvsroot/openvrml/openvrml/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1784/tests Modified Files: testsuite.at Log Message: Added test to check that we can safely import a component level that's already been imported via the profile. Index: testsuite.at =================================================================== RCS file: /cvsroot/openvrml/openvrml/tests/testsuite.at,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** testsuite.at 12 Apr 2006 20:08:15 -0000 1.14 --- testsuite.at 17 Apr 2006 07:31:00 -0000 1.15 *************** *** 178,181 **** --- 178,190 ---- AT_CLEANUP + AT_SETUP([Core profile world plus Core component level 2]) + AT_DATA([core+core2.x3dv], + [[#X3D V3.0 utf8 + PROFILE Core + COMPONENT Core:2 + ]]) + AT_CHECK([parse-x3dvrml < core+core2.x3dv]) + AT_CLEANUP + AT_SETUP([X3D Core plus VRML97 component]) AT_DATA([x3d+vrml97-component.x3dv], |
From: Braden M. <br...@us...> - 2006-04-17 07:29:21
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv672/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g browser.cpp browser.h node.cpp node.h scope.cpp scope.h Log Message: Allow components to be added redundantly. This is necessary in the current design, where importing component X level 2 imports level 1 as well; and level 1 may already have been imported as part of the profile. Index: scope.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** scope.h 16 Apr 2006 08:22:18 -0000 1.14 --- scope.h 17 Apr 2006 07:29:17 -0000 1.15 *************** *** 53,57 **** const boost::shared_ptr<const scope> & parent() const OPENVRML_NOTHROW; ! bool add_type(const boost::shared_ptr<node_type> & type) OPENVRML_THROW1(std::bad_alloc); --- 53,58 ---- const boost::shared_ptr<const scope> & parent() const OPENVRML_NOTHROW; ! const std::pair<boost::shared_ptr<node_type>, bool> ! add_type(const boost::shared_ptr<node_type> & type) OPENVRML_THROW1(std::bad_alloc); Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** node.cpp 16 Apr 2006 15:29:22 -0000 1.79 --- node.cpp 17 Apr 2006 07:29:17 -0000 1.80 *************** *** 937,940 **** --- 937,991 ---- */ + /** + * @relates openvrml::node_type + * + * @brief Compare for equality. + * + * Two @c node_type%s @c t and @c u are considered equal if all of the + * following are true: + * + * - <code>t.id() == u.id()</code> + * - <code>t.interfaces() == u.interfaces()</code> + * - <code>t.node_class().id()</code> is in the set of identifiers + * associated with @c u in the <code>browser</code>'s @c node_class map. + * + * Note that the latter requirement makes this comparison a rather expensive + * operation. + * + * @param[in] lhs + * @param[in] rhs + * + * @return @c true if @p lhs and @p rhs are equal; @c false otherwise. + */ + bool openvrml::operator==(const node_type & lhs, const node_type & rhs) + OPENVRML_NOTHROW + { + if (lhs.id() != rhs.id()) { return false; } + if (lhs.interfaces() != rhs.interfaces()) { return false; } + + const std::vector<node_class_id> ids = + rhs.node_class().browser() + .node_class_map_.node_class_ids(rhs.node_class()); + const std::vector<node_class_id>::const_iterator pos = + std::find(ids.begin(), ids.end(), lhs.node_class().id()); + return pos != ids.end(); + } + + /** + * @relates openvrml::node_type + * + * @brief Compare for inequality. + * + * @param[in] lhs + * @param[in] rhs + * + * @return @c true if @p lhs and @p rhs are not equal; @c false otherwise. + */ + bool openvrml::operator!=(const node_type & lhs, const node_type & rhs) + OPENVRML_NOTHROW + { + return !(lhs == rhs); + } + /** Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** node.h 16 Apr 2006 08:22:18 -0000 1.53 --- node.h 17 Apr 2006 07:29:17 -0000 1.54 *************** *** 183,186 **** --- 183,190 ---- class OPENVRML_API node_class_id { + friend bool operator==(const node_class_id & lhs, + const node_class_id & rhs) + OPENVRML_NOTHROW; + std::string id_; *************** *** 193,196 **** --- 197,207 ---- }; + OPENVRML_API bool operator==(const node_class_id & lhs, + const node_class_id & rhs) + OPENVRML_NOTHROW; + OPENVRML_API bool operator!=(const node_class_id & lhs, + const node_class_id & rhs) + OPENVRML_NOTHROW; + class browser; *************** *** 269,272 **** --- 280,288 ---- }; + OPENVRML_API bool operator==(const node_type & lhs, const node_type & rhs) + OPENVRML_NOTHROW; + OPENVRML_API bool operator!=(const node_type & lhs, const node_type & rhs) + OPENVRML_NOTHROW; + class OPENVRML_API field_value_type_mismatch : public std::logic_error { Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Vrml97Parser.g 16 Apr 2006 08:22:17 -0000 1.62 --- Vrml97Parser.g 17 Apr 2006 07:29:16 -0000 1.63 *************** *** 1,3 **** ! // -*- Mode: Antlr; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML --- 1,3 ---- ! // -*- Mode: Antlr; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML *************** *** 749,753 **** node_class->create_type(id->getText(), interfaces); assert(node_type); ! if (!scope->add_type(node_type)) { using antlr::SemanticException; throw SemanticException("node type \"" + node_type->id() --- 749,753 ---- node_class->create_type(id->getText(), interfaces); assert(node_type); ! if (!scope->add_type(node_type).second) { using antlr::SemanticException; throw SemanticException("node type \"" + node_type->id() *************** *** 997,1001 **** assert(node_type); ! if (!scope->add_type(node_type)) { using antlr::SemanticException; throw SemanticException("node type \"" + node_type->id() --- 997,1001 ---- assert(node_type); ! if (!scope->add_type(node_type).second) { using antlr::SemanticException; throw SemanticException("node type \"" + node_type->id() Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** browser.cpp 16 Apr 2006 08:22:17 -0000 1.164 --- browser.cpp 17 Apr 2006 07:29:17 -0000 1.165 *************** *** 5446,5449 **** --- 5446,5477 ---- } + /** + * @relates openvrml::node_class_id + * + * @param[in] lhs + * @param[in] rhs + * + * @return @c true if @p lhs and @p rhs are equal, @c false otherwise. + */ + bool openvrml::operator==(const node_class_id & lhs, const node_class_id & rhs) + OPENVRML_NOTHROW + { + return lhs.id_ == rhs.id_; + } + + /** + * @relates openvrml::node_class_id + * + * @param[in] lhs + * @param[in] rhs + * + * @return @c true if @p lhs and @p rhs are not equal, @c false otherwise. + */ + bool openvrml::operator!=(const node_class_id & lhs, const node_class_id & rhs) + OPENVRML_NOTHROW + { + return !(lhs == rhs); + } + /** *************** *** 5663,5666 **** --- 5691,5717 ---- } + /** + * @brief The @c node_class identifiers associated with @p node_class. + * + * @param[in] node_class a @c node_class. + * + * @return the @c node_class identifiers associated with @p node_class. + */ + const std::vector<openvrml::node_class_id> + openvrml::browser::node_class_map:: + node_class_ids(const openvrml::node_class & node_class) const + OPENVRML_THROW1(std::bad_alloc) + { + std::vector<node_class_id> ids; + for (map_t::const_iterator entry = this->map_.begin(); + entry != this->map_.end(); + ++entry) { + if (entry->second.get() == &node_class) { + ids.push_back(entry->first); + } + } + return ids; + } + namespace { *************** *** 7873,7881 **** std::bad_alloc) { ! boost::shared_ptr<openvrml::node_class> node_class = b.node_class(urn); ! assert(node_class); ! const bool succeeded = ! scope.add_type(node_class->create_type(node_name, interface_set)); ! assert(succeeded); } --- 7924,7964 ---- std::bad_alloc) { ! using boost::shared_ptr; ! using openvrml::node_class; ! using openvrml::node_type; ! ! const shared_ptr<node_class> class_ = b.node_class(urn); ! assert(class_); ! const shared_ptr<node_type> type = class_->create_type(node_name, ! interface_set); ! const std::pair<shared_ptr<node_type>, bool> add_type_result = ! scope.add_type(type); ! ! // ! // If scope::add_type failed, there are two possible reasons: ! // 1. We're trying to add exactly the same node_type as already exists ! // in the scope. The mostly likely way this would happen is if a ! // component is added redundantly. There are entirely reasonable ! // ways that could happen; e.g., if the profile incorporates ! // component A level 1, and the X3D file also has a component ! // statement to import component A level 2. ! // 2. node_types in two different components have the same ! // node_type::id. ! // ! if (!add_type_result.second && *add_type_result.first != *type) { ! // ! // The way things are currently implemented, we don't want to throw ! // here. Even if a component has a problematic node, we might as ! // well add the rest of the nodes in it. After all, we don't know ! // how many nodes in the component we've already added. ! // ! // At some point it may be desirable to make component import ! // transactional--i.e., all nodes are added successfully, or ! // component import fails totally. But that doesn't seem necessary ! // at this point. ! // ! b.err(std::string("interfaces for \"") + node_name + "\" are not " ! "consistent with the existing node type by that name"); ! } } Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** browser.h 16 Apr 2006 08:22:18 -0000 1.55 --- browser.h 17 Apr 2006 07:29:17 -0000 1.56 *************** *** 172,175 **** --- 172,177 ---- friend class Vrml97Parser; friend class X3DVrmlParser; + friend bool operator==(const node_type &, const node_type &) + OPENVRML_NOTHROW; struct root_scene_loader; *************** *** 191,201 **** const boost::shared_ptr<openvrml::node_class> ! insert(const std::string & id, ! const boost::shared_ptr<openvrml::node_class> & node_class); bool remove(const std::string & id); const boost::shared_ptr<node_class> ! find(const std::string & id) const; void render(viewer & v); --- 193,207 ---- const boost::shared_ptr<openvrml::node_class> ! insert(const std::string & id, ! const boost::shared_ptr<openvrml::node_class> & node_class); bool remove(const std::string & id); const boost::shared_ptr<node_class> ! find(const std::string & id) const; ! ! const std::vector<node_class_id> ! node_class_ids(const openvrml::node_class & node_class) const ! OPENVRML_THROW1(std::bad_alloc); void render(viewer & v); Index: scope.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** scope.cpp 16 Apr 2006 08:22:18 -0000 1.19 --- scope.cpp 17 Apr 2006 07:29:17 -0000 1.20 *************** *** 120,126 **** * @param[in] type a node_type. * ! * @return @c true if @p type is successfully added to the scope; @c false ! * otherwise (if a node_type with the same id is already defined for ! * the scope). * * @exception std::bad_alloc if memory allocation fails. --- 120,130 ---- * @param[in] type a node_type. * ! * @return a pair whose first element is a pointer to a @c node_type whose ! * @c node_type::id is the same as that of @p type. The second element ! * is a boolean value. If the second element is @c true, @p type was ! * successfully added to the @c scope and the first element is the same ! * as @p type. If the second element is @c false, @p type was not ! * added to the scope and the first element is a @c node_type that ! * already exists in the @c scope. * * @exception std::bad_alloc if memory allocation fails. *************** *** 128,138 **** * @pre @p type is not null. */ ! bool openvrml::scope::add_type(const boost::shared_ptr<node_type> & type) OPENVRML_THROW1(std::bad_alloc) { assert(type); ! if (this->find_type(type->id())) { return false; } ! this->node_type_list.push_front(type); // Throws std::bad_alloc. ! return true; } --- 132,156 ---- * @pre @p type is not null. */ ! const std::pair<boost::shared_ptr<openvrml::node_type>, bool> ! openvrml::scope::add_type(const boost::shared_ptr<node_type> & type) OPENVRML_THROW1(std::bad_alloc) { assert(type); ! ! using boost::shared_ptr; ! ! std::pair<shared_ptr<node_type>, bool> result; ! if ((result.first = this->find_type(type->id()))) { ! result.second = false; ! } else { ! // ! // Throws std::bad_alloc. ! // ! const std::list<shared_ptr<node_type> >::iterator pos = ! this->node_type_list.insert(this->node_type_list.begin(), type); ! result.first = type; ! result.second = pos != this->node_type_list.end(); ! } ! return result; } *************** *** 171,175 **** const node_type_list_t::const_iterator end = this->node_type_list.end(); const node_type_list_t::const_iterator pos = ! std::find_if(this->node_type_list.begin(), end, has_id_(id)); if (pos != end) { return *pos; } --- 189,193 ---- const node_type_list_t::const_iterator end = this->node_type_list.end(); const node_type_list_t::const_iterator pos = ! std::find_if(this->node_type_list.begin(), end, has_id_(id)); if (pos != end) { return *pos; } |
From: Braden M. <br...@us...> - 2006-04-17 07:29:20
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv672 Modified Files: ChangeLog Log Message: Allow components to be added redundantly. This is necessary in the current design, where importing component X level 2 imports level 1 as well; and level 1 may already have been imported as part of the profile. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1219 retrieving revision 1.1220 diff -C2 -d -r1.1219 -r1.1220 *** ChangeLog 16 Apr 2006 15:29:21 -0000 1.1219 --- ChangeLog 17 Apr 2006 07:29:16 -0000 1.1220 *************** *** 1,2 **** --- 1,57 ---- + 2006-04-17 Braden McDaniel <br...@en...> + + Allow components to be added redundantly. This is necessary in + the current design, where importing component X level 2 imports + level 1 as well; and level 1 may already have been imported as + part of the profile. + + * src/libopenvrml/openvrml/Vrml97Parser.g + (proto): Changes for parity with change to + openvrml::scope::add_type. + (externproto): Changes for parity with change to + openvrml::scope::add_type. + * src/libopenvrml/openvrml/browser.cpp + (openvrml::operator==(const node_class_id &, const + node_class_id&)): Added function. + (openvrml::operator!=(const node_class_id &, const + node_class_id&)): Added function. + (openvrml::browser::node_class_map::node_class_ids(const + openvrml::node_class &) const): Added function; get the node_class + identifiers associated with a node_class in the map (i.e., the + keys). + (component::add_scope_entry(const openvrml::browser &, const + char*, const openvrml::node_interface_set &, const char *, + openvrml::scope &) const): Accommodate failure to add a node_type + to the scope. + * src/libopenvrml/openvrml/browser.h: + (openvrml::browser): Grant friendship to node_type's operator==. + (openvrml::browser::node_class_map): Added member function: + node_class_ids(const openvrml::node_class &) const + * src/libopenvrml/openvrml/node.cpp + (openvrml::operator==(const node_type &, const node_type &)): + Equality for node_type. + (openvrml::operator!=(const node_type &, const node_type &)): + Inequality for node_type. + * src/libopenvrml/openvrml/node.h + (openvrml::node_class_id): Grant friendship to operator==. + (openvrml::operator==(const node_class_id &, const node_class_id + &)): Equality for node_class_id. + (openvrml::operator!=(const node_class_id &, const node_class_id + &)): Inequality for node_class_id. + (openvrml::operator==(const node_type &, const node_type &)): + Equality for node_type. + (openvrml::operator!=(const node_type &, const node_type &)): + Inequality for node_type. + * src/libopenvrml/openvrml/scope.cpp + (openvrml::scope::add_type(const boost::shared_ptr<node_type> &)): + Changed to return + std::pair<boost::shared_ptr<openvrml::node_type>, bool> instead of + bool. + * src/libopenvrml/openvrml/scope.h + (openvrml::scope::add_type(const boost::shared_ptr<node_type> &)): + Changed to return + std::pair<boost::shared_ptr<openvrml::node_type>, bool> instead of + bool. + 2006-04-16 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-16 15:29:25
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639/src/libopenvrml/openvrml Modified Files: node.cpp Log Message: Must explicitly qualify openvrml::browser here. Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** node.cpp 16 Apr 2006 08:22:18 -0000 1.78 --- node.cpp 16 Apr 2006 15:29:22 -0000 1.79 *************** *** 609,613 **** * @param[in] b the @c browser to be associated with the @c node_class. */ ! openvrml::node_class::node_class(const node_class_id & id, browser & b) OPENVRML_NOTHROW: id_(id), --- 609,614 ---- * @param[in] b the @c browser to be associated with the @c node_class. */ ! openvrml::node_class::node_class(const node_class_id & id, ! openvrml::browser & b) OPENVRML_NOTHROW: id_(id), |
From: Braden M. <br...@us...> - 2006-04-16 15:29:25
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20639 Modified Files: ChangeLog Log Message: Must explicitly qualify openvrml::browser here. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1218 retrieving revision 1.1219 diff -C2 -d -r1.1218 -r1.1219 *** ChangeLog 16 Apr 2006 08:22:17 -0000 1.1218 --- ChangeLog 16 Apr 2006 15:29:21 -0000 1.1219 *************** *** 1,4 **** --- 1,11 ---- 2006-04-16 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/node.cpp + (openvrml::node_class::node_class(const node_class_id &, + openvrml::browser &)): Must explicitly qualify openvrml::browser + here. + + 2006-04-16 Braden McDaniel <br...@en...> + Added node_class::id accessor; node_class must now be constructed with an id. |
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8191/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g browser.cpp browser.h node.cpp node.h scope.cpp scope.h script.cpp vrml97node.cpp x3d_core.cpp x3d_dis.cpp x3d_event_utilities.cpp x3d_geometry2d.cpp x3d_geospatial.cpp x3d_hanim.cpp x3d_key_device_sensor.cpp x3d_networking.cpp x3d_nurbs.cpp x3d_rendering.cpp x3d_shape.cpp x3d_texturing.cpp Log Message: Added node_class::id accessor; node_class must now be constructed with an id. Index: scope.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** scope.h 27 Feb 2006 02:59:41 -0000 1.13 --- scope.h 16 Apr 2006 08:22:18 -0000 1.14 *************** *** 63,66 **** --- 63,68 ---- node * find_node(const std::string & id) const; }; + + const std::string path(const scope & s) OPENVRML_THROW1(std::bad_alloc); } Index: scope.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/scope.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** scope.cpp 27 Feb 2006 02:59:41 -0000 1.18 --- scope.cpp 16 Apr 2006 08:22:18 -0000 1.19 *************** *** 212,213 **** --- 212,232 ---- : 0; } + + /** + * @relates openvrml::scope + * + * @param[in] s a @c scope. + * + * @return the full “path” to the @c scope. + */ + const std::string openvrml::path(const scope & s) + OPENVRML_THROW1(std::bad_alloc) + { + std::string path_str; + const scope * s_ptr = &s; + while (s_ptr->parent()) { + path_str = '#' + s_ptr->id() + path_str; + s_ptr = s_ptr->parent().get(); + } + return s_ptr->id() + path_str; + } Index: x3d_dis.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_dis.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_dis.cpp 11 Apr 2006 07:34:51 -0000 1.1 --- x3d_dis.cpp 16 Apr 2006 08:22:19 -0000 1.2 *************** *** 41,44 **** --- 41,46 ---- class OPENVRML_LOCAL espdu_transform_class : public node_class { public: + static const char * const id; + explicit espdu_transform_class(openvrml::browser & browser); virtual ~espdu_transform_class() OPENVRML_NOTHROW; *************** *** 57,60 **** --- 59,64 ---- class OPENVRML_LOCAL receiver_pdu_class : public node_class { public: + static const char * const id; + explicit receiver_pdu_class(openvrml::browser & browser); virtual ~receiver_pdu_class() OPENVRML_NOTHROW; *************** *** 73,76 **** --- 77,82 ---- class OPENVRML_LOCAL signal_pdu_class : public node_class { public: + static const char * const id; + explicit signal_pdu_class(openvrml::browser & browser); virtual ~signal_pdu_class() OPENVRML_NOTHROW; *************** *** 89,92 **** --- 95,100 ---- class OPENVRML_LOCAL transmitter_pdu_class : public node_class { public: + static const char * const id; + explicit transmitter_pdu_class(openvrml::browser & browser); virtual ~transmitter_pdu_class() OPENVRML_NOTHROW; *************** *** 104,114 **** using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class("urn:X-openvrml:node:EspduTransform", shared_ptr<node_class>(new espdu_transform_class(b))); ! b.add_node_class("urn:X-openvrml:node:ReceiverPdu", shared_ptr<node_class>(new receiver_pdu_class(b))); ! b.add_node_class("urn:X-openvrml:node:SignalPdu", shared_ptr<node_class>(new signal_pdu_class(b))); ! b.add_node_class("urn:X-openvrml:node:TransmitterPdu", shared_ptr<node_class>(new transmitter_pdu_class(b))); } --- 112,122 ---- using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class(espdu_transform_class::id, shared_ptr<node_class>(new espdu_transform_class(b))); ! b.add_node_class(receiver_pdu_class::id, shared_ptr<node_class>(new receiver_pdu_class(b))); ! b.add_node_class(signal_pdu_class::id, shared_ptr<node_class>(new signal_pdu_class(b))); ! b.add_node_class(transmitter_pdu_class::id, shared_ptr<node_class>(new transmitter_pdu_class(b))); } *************** *** 533,543 **** }; /** * @brief Construct. * ! * @param browser the browser associated with this espdu_transform_class. */ espdu_transform_class::espdu_transform_class(openvrml::browser & browser): ! node_class(browser) {} --- 541,559 ---- }; + + /** + * @brief @c node_class identifier. + */ + const char * const espdu_transform_class::id = + "urn:X-openvrml:node:EspduTransform"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c espdu_transform_class. */ espdu_transform_class::espdu_transform_class(openvrml::browser & browser): ! node_class(espdu_transform_class::id, browser) {} *************** *** 1998,2008 **** } /** * @brief Construct. * ! * @param browser the browser associated with this receiver_pdu_class. */ receiver_pdu_class::receiver_pdu_class(openvrml::browser & browser): ! node_class(browser) {} --- 2014,2032 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const receiver_pdu_class::id = + "urn:X-openvrml:node:ReceiverPdu"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c receiver_pdu_class. */ receiver_pdu_class::receiver_pdu_class(openvrml::browser & browser): ! node_class(receiver_pdu_class::id, browser) {} *************** *** 2517,2526 **** /** * @brief Construct. * ! * @param browser the browser associated with this signal_pdu_class. */ signal_pdu_class::signal_pdu_class(openvrml::browser & browser): ! node_class(browser) {} --- 2541,2556 ---- /** + * @brief @c node_class identifier. + */ + const char * const signal_pdu_class::id = + "urn:X-openvrml:node:SignalPdu"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this @c signal_pdu_class. */ signal_pdu_class::signal_pdu_class(openvrml::browser & browser): ! node_class(signal_pdu_class::id, browser) {} *************** *** 3035,3044 **** /** * @brief Construct. * ! * @param browser the browser associated with this transmitter_pdu_class. */ transmitter_pdu_class::transmitter_pdu_class(openvrml::browser & browser): ! node_class(browser) {} --- 3065,3081 ---- /** + * @brief @c node_class identifier. + */ + const char * const transmitter_pdu_class::id = + "urn:X-openvrml:node:TransmitterPdu"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c transmitter_pdu_class. */ transmitter_pdu_class::transmitter_pdu_class(openvrml::browser & browser): ! node_class(transmitter_pdu_class::id, browser) {} Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** node.cpp 7 Mar 2006 07:05:08 -0000 1.77 --- node.cpp 16 Apr 2006 08:22:18 -0000 1.78 *************** *** 1,3 **** ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; -*- // // OpenVRML --- 1,3 ---- ! // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 78 -*- // // OpenVRML *************** *** 586,592 **** * @internal * ! * @var openvrml::browser * openvrml::node_class::browser_ * ! * @brief The browser associated with this <code>node_class</code>. */ --- 586,600 ---- * @internal * ! * @var const std::string openvrml::node_class::id_ * ! * @brief @c node_class identifier. ! */ ! ! /** ! * @internal ! * ! * @var openvrml::browser * const openvrml::node_class::browser_ ! * ! * @brief The @c browser associated with this @c node_class. */ *************** *** 594,606 **** * @brief Constructor. * ! * A <code>node_class</code> is constructed using a <code>browser</code>. All ! * <code>node</code> instances that share a particular <code>node_class</code> ! * "belong to" the <code>browser</code> associated with the ! * <code>node_class</code>. * ! * @param[in] b the <code>browser</code> to be associated with the ! * <code>node_class</code>. */ ! openvrml::node_class::node_class(openvrml::browser & b) OPENVRML_NOTHROW: browser_(&b) {} --- 602,615 ---- * @brief Constructor. * ! * A @c node_class is constructed using a @c browser. All @c node instances ! * that share a particular @c node_class “belong to” the ! * @c browser associated with the @c node_class. * ! * @param[in] id an identifier unique to @p b. ! * @param[in] b the @c browser to be associated with the @c node_class. */ ! openvrml::node_class::node_class(const node_class_id & id, browser & b) ! OPENVRML_NOTHROW: ! id_(id), browser_(&b) {} *************** *** 613,616 **** --- 622,636 ---- /** + * @brief Identifier. + * + * @return the @c node_class identifier. + */ + const openvrml::node_class_id & openvrml::node_class::id() const + OPENVRML_NOTHROW + { + return this->id_; + } + + /** * @brief The <code>browser</code> associated with this * <code>node_class</code>. Index: x3d_hanim.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_hanim.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_hanim.cpp 11 Apr 2006 07:34:51 -0000 1.1 --- x3d_hanim.cpp 16 Apr 2006 08:22:19 -0000 1.2 *************** *** 41,44 **** --- 41,46 ---- class OPENVRML_LOCAL hanim_displacer_class : public node_class { public: + static const char * const id; + explicit hanim_displacer_class(openvrml::browser & browser); virtual ~hanim_displacer_class() OPENVRML_NOTHROW; *************** *** 57,60 **** --- 59,64 ---- class OPENVRML_LOCAL hanim_humanoid_class : public node_class { public: + static const char * const id; + explicit hanim_humanoid_class(openvrml::browser & browser); virtual ~hanim_humanoid_class() OPENVRML_NOTHROW; *************** *** 73,76 **** --- 77,82 ---- class OPENVRML_LOCAL hanim_joint_class : public node_class { public: + static const char * const id; + explicit hanim_joint_class(openvrml::browser & browser); virtual ~hanim_joint_class() OPENVRML_NOTHROW; *************** *** 89,92 **** --- 95,100 ---- class OPENVRML_LOCAL hanim_segment_class : public node_class { public: + static const char * const id; + explicit hanim_segment_class(openvrml::browser & browser); virtual ~hanim_segment_class() OPENVRML_NOTHROW; *************** *** 105,108 **** --- 113,118 ---- class OPENVRML_LOCAL hanim_site_class : public node_class { public: + static const char * const id; + explicit hanim_site_class(openvrml::browser & browser); virtual ~hanim_site_class() OPENVRML_NOTHROW; *************** *** 120,132 **** using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class("urn:X-openvrml:node:HAnimDisplacer", shared_ptr<node_class>(new hanim_displacer_class(b))); ! b.add_node_class("urn:X-openvrml:node:HAnimHumanoid", shared_ptr<node_class>(new hanim_humanoid_class(b))); ! b.add_node_class("urn:X-openvrml:node:HAnimJoint", shared_ptr<node_class>(new hanim_joint_class(b))); ! b.add_node_class("urn:X-openvrml:node:HAnimSegment", shared_ptr<node_class>(new hanim_segment_class(b))); ! b.add_node_class("urn:X-openvrml:node:HAnimSite", shared_ptr<node_class>(new hanim_site_class(b))); } --- 130,142 ---- using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class(hanim_displacer_class::id, shared_ptr<node_class>(new hanim_displacer_class(b))); ! b.add_node_class(hanim_humanoid_class::id, shared_ptr<node_class>(new hanim_humanoid_class(b))); ! b.add_node_class(hanim_joint_class::id, shared_ptr<node_class>(new hanim_joint_class(b))); ! b.add_node_class(hanim_segment_class::id, shared_ptr<node_class>(new hanim_segment_class(b))); ! b.add_node_class(hanim_site_class::id, shared_ptr<node_class>(new hanim_site_class(b))); } *************** *** 135,139 **** using namespace openvrml_; ! class OPENVRML_LOCAL hanim_displacer_node : public abstract_node<hanim_displacer_node> { friend class hanim_displacer_class; --- 145,151 ---- using namespace openvrml_; ! class OPENVRML_LOCAL hanim_displacer_node : ! public abstract_node<hanim_displacer_node> { ! friend class hanim_displacer_class; *************** *** 149,154 **** }; ! class OPENVRML_LOCAL hanim_humanoid_node : public abstract_node<hanim_humanoid_node>, ! public child_node { friend class hanim_humanoid_class; --- 161,168 ---- }; ! class OPENVRML_LOCAL hanim_humanoid_node : ! public abstract_node<hanim_humanoid_node>, ! public child_node { ! friend class hanim_humanoid_class; *************** *** 174,189 **** public: hanim_humanoid_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~hanim_humanoid_node() OPENVRML_NOTHROW; }; ! class OPENVRML_LOCAL hanim_joint_node : public abstract_node<hanim_joint_node>, ! public child_node { friend class hanim_joint_class; ! class add_children_listener : ! public event_listener_base<self_t>, ! public mfnode_listener ! { public: explicit add_children_listener(self_t & node); --- 188,203 ---- public: hanim_humanoid_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~hanim_humanoid_node() OPENVRML_NOTHROW; }; ! class OPENVRML_LOCAL hanim_joint_node : ! public abstract_node<hanim_joint_node>, ! public child_node { ! friend class hanim_joint_class; ! class add_children_listener : public event_listener_base<self_t>, ! public mfnode_listener { public: explicit add_children_listener(self_t & node); *************** *** 196,203 **** }; ! class remove_children_listener : ! public event_listener_base<self_t>, ! public mfnode_listener ! { public: explicit remove_children_listener(self_t & node); --- 210,215 ---- }; ! class remove_children_listener : public event_listener_base<self_t>, ! public mfnode_listener { public: explicit remove_children_listener(self_t & node); *************** *** 231,246 **** public: hanim_joint_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~hanim_joint_node() OPENVRML_NOTHROW; }; ! class OPENVRML_LOCAL hanim_segment_node : public abstract_node<hanim_segment_node>, ! public child_node { friend class hanim_segment_class; ! class add_children_listener : ! public event_listener_base<self_t>, ! public mfnode_listener ! { public: explicit add_children_listener(self_t & node); --- 243,258 ---- public: hanim_joint_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~hanim_joint_node() OPENVRML_NOTHROW; }; ! class OPENVRML_LOCAL hanim_segment_node : ! public abstract_node<hanim_segment_node>, ! public child_node { ! friend class hanim_segment_class; ! class add_children_listener : public event_listener_base<self_t>, ! public mfnode_listener { public: explicit add_children_listener(self_t & node); *************** *** 253,260 **** }; ! class remove_children_listener : ! public event_listener_base<self_t>, ! public mfnode_listener ! { public: explicit remove_children_listener(self_t & node); --- 265,270 ---- }; ! class remove_children_listener : public event_listener_base<self_t>, ! public mfnode_listener { public: explicit remove_children_listener(self_t & node); *************** *** 285,290 **** }; ! class OPENVRML_LOCAL hanim_site_node : public abstract_node<hanim_site_node>, ! public child_node { friend class hanim_site_class; --- 295,302 ---- }; ! class OPENVRML_LOCAL hanim_site_node : ! public abstract_node<hanim_site_node>, ! public child_node { ! friend class hanim_site_class; *************** *** 303,310 **** }; ! class remove_children_listener : ! public event_listener_base<self_t>, ! public mfnode_listener ! { public: explicit remove_children_listener(self_t & node); --- 315,320 ---- }; ! class remove_children_listener : public event_listener_base<self_t>, ! public mfnode_listener { public: explicit remove_children_listener(self_t & node); *************** *** 335,345 **** }; /** * @brief Construct. * ! * @param browser the browser associated with this hanim_displacer_class. */ hanim_displacer_class::hanim_displacer_class(openvrml::browser & browser): ! node_class(browser) {} --- 345,363 ---- }; + + /** + * @brief @c node_class identifier. + */ + const char * const hanim_displacer_class::id = + "urn:X-openvrml:node:HAnimDisplacer"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c hanim_displacer_class. */ hanim_displacer_class::hanim_displacer_class(openvrml::browser & browser): ! node_class(hanim_displacer_class::id, browser) {} *************** *** 482,492 **** } /** * @brief Construct. * ! * @param browser the browser associated with this hanim_humanoid_class. */ hanim_humanoid_class::hanim_humanoid_class(openvrml::browser & browser): ! node_class(browser) {} --- 500,518 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const hanim_humanoid_class::id = + "urn:X-openvrml:node:HAnimHumanoid"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c hanim_humanoid_class. */ hanim_humanoid_class::hanim_humanoid_class(openvrml::browser & browser): ! node_class(hanim_humanoid_class::id, browser) {} *************** *** 877,887 **** } /** * @brief Construct. * ! * @param browser the browser associated with this hanim_joint_class. */ hanim_joint_class::hanim_joint_class(openvrml::browser & browser): ! node_class(browser) {} --- 903,920 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const hanim_joint_class::id = + "urn:X-openvrml:node:HAnimJoint"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this @c hanim_joint_class. */ hanim_joint_class::hanim_joint_class(openvrml::browser & browser): ! node_class(hanim_joint_class::id, browser) {} *************** *** 1256,1266 **** } /** * @brief Construct. * ! * @param browser the browser associated with this hanim_segment_class. */ hanim_segment_class::hanim_segment_class(openvrml::browser & browser): ! node_class(browser) {} --- 1289,1307 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const hanim_segment_class::id = + "urn:X-openvrml:node:HAnimSegment"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c hanim_segment_class. */ hanim_segment_class::hanim_segment_class(openvrml::browser & browser): ! node_class(hanim_segment_class::id, browser) {} *************** *** 1503,1512 **** /** * @brief Construct. * ! * @param browser the browser associated with this hanim_site_class. */ hanim_site_class::hanim_site_class(openvrml::browser & browser): ! node_class(browser) {} --- 1544,1559 ---- /** + * @brief @c node_class identifier. + */ + const char * const hanim_site_class::id = + "urn:X-openvrml:node:HAnimSite"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this @c hanim_site_class. */ hanim_site_class::hanim_site_class(openvrml::browser & browser): ! node_class(hanim_site_class::id, browser) {} Index: x3d_rendering.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_rendering.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** x3d_rendering.cpp 25 Mar 2006 09:22:16 -0000 1.2 --- x3d_rendering.cpp 16 Apr 2006 08:22:19 -0000 1.3 *************** *** 42,45 **** --- 42,47 ---- class OPENVRML_LOCAL color_rgba_class : public node_class { public: + static const char * const id; + explicit color_rgba_class(openvrml::browser & browser); virtual ~color_rgba_class() throw (); *************** *** 58,61 **** --- 60,65 ---- class OPENVRML_LOCAL indexed_triangle_fan_set_class : public node_class { public: + static const char * const id; + explicit indexed_triangle_fan_set_class(openvrml::browser & browser); virtual ~indexed_triangle_fan_set_class() OPENVRML_NOTHROW; *************** *** 74,77 **** --- 78,83 ---- class OPENVRML_LOCAL indexed_triangle_set_class : public node_class { public: + static const char * const id; + explicit indexed_triangle_set_class(openvrml::browser & browser); virtual ~indexed_triangle_set_class() OPENVRML_NOTHROW; *************** *** 90,93 **** --- 96,101 ---- class OPENVRML_LOCAL indexed_triangle_strip_set_class : public node_class { public: + static const char * const id; + explicit indexed_triangle_strip_set_class(openvrml::browser & browser); virtual ~indexed_triangle_strip_set_class() OPENVRML_NOTHROW; *************** *** 106,109 **** --- 114,119 ---- class OPENVRML_LOCAL triangle_fan_set_class : public node_class { public: + static const char * const id; + explicit triangle_fan_set_class(openvrml::browser & browser); virtual ~triangle_fan_set_class() OPENVRML_NOTHROW; *************** *** 122,125 **** --- 132,137 ---- class OPENVRML_LOCAL triangle_set_class : public node_class { public: + static const char * const id; + explicit triangle_set_class(openvrml::browser & browser); virtual ~triangle_set_class() OPENVRML_NOTHROW; *************** *** 138,141 **** --- 150,155 ---- class OPENVRML_LOCAL triangle_strip_set_class : public node_class { public: + static const char * const id; + explicit triangle_strip_set_class(openvrml::browser & browser); virtual ~triangle_strip_set_class() OPENVRML_NOTHROW; *************** *** 153,169 **** using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class("urn:X-openvrml:node:ColorRGBA", shared_ptr<node_class>(new color_rgba_class(b))); ! b.add_node_class("urn:X-openvrml:node:IndexedTriangleFanSet", ! shared_ptr<node_class>(new indexed_triangle_fan_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:IndexedTriangleSet", ! shared_ptr<node_class>(new indexed_triangle_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:IndexedTriangleStripSet", ! shared_ptr<node_class>(new indexed_triangle_strip_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:TriangleFanSet", shared_ptr<node_class>(new triangle_fan_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:TriangleSet", shared_ptr<node_class>(new triangle_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:TriangleStripSet", shared_ptr<node_class>(new triangle_strip_set_class(b))); } --- 167,186 ---- using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class(color_rgba_class::id, shared_ptr<node_class>(new color_rgba_class(b))); ! b.add_node_class(indexed_triangle_fan_set_class::id, ! shared_ptr<node_class>( ! new indexed_triangle_fan_set_class(b))); ! b.add_node_class(indexed_triangle_set_class::id, ! shared_ptr<node_class>( ! new indexed_triangle_set_class(b))); ! b.add_node_class(indexed_triangle_strip_set_class::id, ! shared_ptr<node_class>( ! new indexed_triangle_strip_set_class(b))); ! b.add_node_class(triangle_fan_set_class::id, shared_ptr<node_class>(new triangle_fan_set_class(b))); ! b.add_node_class(triangle_set_class::id, shared_ptr<node_class>(new triangle_set_class(b))); ! b.add_node_class(triangle_strip_set_class::id, shared_ptr<node_class>(new triangle_strip_set_class(b))); } *************** *** 173,178 **** using namespace openvrml_; ! class OPENVRML_LOCAL color_rgba_node : public abstract_node<color_rgba_node>, ! public openvrml::color_rgba_node { friend class color_rgba_class; --- 190,197 ---- using namespace openvrml_; ! class OPENVRML_LOCAL color_rgba_node : ! public abstract_node<color_rgba_node>, ! public openvrml::color_rgba_node { ! friend class color_rgba_class; *************** *** 191,203 **** }; ! class OPENVRML_LOCAL indexed_triangle_fan_set_node : public abstract_node<indexed_triangle_fan_set_node>, ! public geometry_node, ! public child_node { friend class indexed_triangle_fan_set_class; ! class set_index_listener : ! public event_listener_base<self_t>, ! public mfint32_listener ! { public: explicit set_index_listener(self_t & node); --- 210,222 ---- }; ! class OPENVRML_LOCAL indexed_triangle_fan_set_node : ! public abstract_node<indexed_triangle_fan_set_node>, ! public geometry_node, ! public child_node { ! friend class indexed_triangle_fan_set_class; ! class set_index_listener : public event_listener_base<self_t>, ! public mfint32_listener { public: explicit set_index_listener(self_t & node); *************** *** 223,228 **** public: ! indexed_triangle_fan_set_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_fan_set_node() OPENVRML_NOTHROW; --- 242,248 ---- public: ! indexed_triangle_fan_set_node( ! const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_fan_set_node() OPENVRML_NOTHROW; *************** *** 238,244 **** }; ! class OPENVRML_LOCAL indexed_triangle_set_node : public abstract_node<indexed_triangle_set_node>, ! public geometry_node, ! public child_node { friend class indexed_triangle_set_class; --- 258,266 ---- }; ! class OPENVRML_LOCAL indexed_triangle_set_node : ! public abstract_node<indexed_triangle_set_node>, ! public geometry_node, ! public child_node { ! friend class indexed_triangle_set_class; *************** *** 270,275 **** public: ! indexed_triangle_set_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_set_node() OPENVRML_NOTHROW; --- 292,298 ---- public: ! indexed_triangle_set_node( ! const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_set_node() OPENVRML_NOTHROW; *************** *** 285,297 **** }; ! class OPENVRML_LOCAL indexed_triangle_strip_set_node : public abstract_node<indexed_triangle_strip_set_node>, ! public geometry_node, ! public child_node { friend class indexed_triangle_strip_set_class; ! class set_index_listener : ! public event_listener_base<self_t>, ! public mfint32_listener ! { public: explicit set_index_listener(self_t & node); --- 308,320 ---- }; ! class OPENVRML_LOCAL indexed_triangle_strip_set_node : ! public abstract_node<indexed_triangle_strip_set_node>, ! public geometry_node, ! public child_node { ! friend class indexed_triangle_strip_set_class; ! class set_index_listener : public event_listener_base<self_t>, ! public mfint32_listener { public: explicit set_index_listener(self_t & node); *************** *** 318,323 **** public: ! indexed_triangle_strip_set_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_strip_set_node() OPENVRML_NOTHROW; --- 341,347 ---- public: ! indexed_triangle_strip_set_node( ! const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~indexed_triangle_strip_set_node() OPENVRML_NOTHROW; *************** *** 333,339 **** }; ! class OPENVRML_LOCAL triangle_fan_set_node : public abstract_node<triangle_fan_set_node>, ! public geometry_node, ! public child_node { friend class triangle_fan_set_class; --- 357,365 ---- }; ! class OPENVRML_LOCAL triangle_fan_set_node : ! public abstract_node<triangle_fan_set_node>, ! public geometry_node, ! public child_node { ! friend class triangle_fan_set_class; *************** *** 350,355 **** public: ! triangle_fan_set_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~triangle_fan_set_node() OPENVRML_NOTHROW; --- 376,382 ---- public: ! triangle_fan_set_node( ! const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~triangle_fan_set_node() OPENVRML_NOTHROW; *************** *** 365,371 **** }; ! class OPENVRML_LOCAL triangle_set_node : public abstract_node<triangle_set_node>, ! public geometry_node, ! public child_node { friend class triangle_set_class; --- 392,400 ---- }; ! class OPENVRML_LOCAL triangle_set_node : ! public abstract_node<triangle_set_node>, ! public geometry_node, ! public child_node { ! friend class triangle_set_class; *************** *** 396,402 **** }; ! class OPENVRML_LOCAL triangle_strip_set_node : public abstract_node<triangle_strip_set_node>, ! public geometry_node, ! public child_node { friend class triangle_strip_set_class; --- 425,433 ---- }; ! class OPENVRML_LOCAL triangle_strip_set_node : ! public abstract_node<triangle_strip_set_node>, ! public geometry_node, ! public child_node { ! friend class triangle_strip_set_class; *************** *** 413,418 **** public: ! triangle_strip_set_node(const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~triangle_strip_set_node() OPENVRML_NOTHROW; --- 444,450 ---- public: ! triangle_strip_set_node( ! const node_type & type, ! const boost::shared_ptr<openvrml::scope> & scope); virtual ~triangle_strip_set_node() OPENVRML_NOTHROW; *************** *** 430,439 **** /** * @brief Construct. * ! * @param browser the browser associated with this color_rgba_class. */ color_rgba_class::color_rgba_class(openvrml::browser & browser): ! node_class(browser) {} --- 462,476 ---- /** + * @brief @c node_class identifier. + */ + const char * const color_rgba_class::id = "urn:X-openvrml:node:ColorRGBA"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this @c color_rgba_class. */ color_rgba_class::color_rgba_class(openvrml::browser & browser): ! node_class(color_rgba_class::id, browser) {} *************** *** 521,530 **** /** * @brief Construct. * ! * @param browser the browser associated with this indexed_triangle_fan_set_class. */ ! indexed_triangle_fan_set_class::indexed_triangle_fan_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 558,575 ---- /** + * @brief @c node_class identifier. + */ + const char * const indexed_triangle_fan_set_class::id = + "urn:X-openvrml:node:IndexedTriangleFanSet"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c indexed_triangle_fan_set_class. */ ! indexed_triangle_fan_set_class:: ! indexed_triangle_fan_set_class(openvrml::browser & browser): ! node_class(indexed_triangle_fan_set_class::id, browser) {} *************** *** 532,536 **** * @brief Destroy. */ ! indexed_triangle_fan_set_class::~indexed_triangle_fan_set_class() OPENVRML_NOTHROW {} --- 577,582 ---- * @brief Destroy. */ ! indexed_triangle_fan_set_class::~indexed_triangle_fan_set_class() ! OPENVRML_NOTHROW {} *************** *** 728,738 **** } /** * @brief Construct. * ! * @param browser the browser associated with this indexed_triangle_set_class. */ ! indexed_triangle_set_class::indexed_triangle_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 774,793 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const indexed_triangle_set_class::id = + "urn:X-openvrml:node:IndexedTriangleSet"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c indexed_triangle_set_class. */ ! indexed_triangle_set_class:: ! indexed_triangle_set_class(openvrml::browser & browser): ! node_class(indexed_triangle_set_class::id, browser) {} *************** *** 936,946 **** } /** * @brief Construct. * ! * @param browser the browser associated with this indexed_triangle_strip_set_class. */ ! indexed_triangle_strip_set_class::indexed_triangle_strip_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 991,1010 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const indexed_triangle_strip_set_class::id = + "urn:X-openvrml:node:IndexedTriangleStripSet"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c indexed_triangle_strip_set_class. */ ! indexed_triangle_strip_set_class:: ! indexed_triangle_strip_set_class(openvrml::browser & browser): ! node_class(indexed_triangle_strip_set_class::id, browser) {} *************** *** 1163,1173 **** } /** * @brief Construct. * ! * @param browser the browser associated with this triangle_fan_set_class. */ triangle_fan_set_class::triangle_fan_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 1227,1245 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const triangle_fan_set_class::id = + "urn:X-openvrml:node:TriangleFanSet"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c triangle_fan_set_class. */ triangle_fan_set_class::triangle_fan_set_class(openvrml::browser & browser): ! node_class(triangle_fan_set_class::id, browser) {} *************** *** 1369,1379 **** } /** * @brief Construct. * ! * @param browser the browser associated with this triangle_set_class. */ triangle_set_class::triangle_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 1441,1459 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const triangle_set_class::id = + "urn:X-openvrml:node:TriangleSet"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c triangle_set_class. */ triangle_set_class::triangle_set_class(openvrml::browser & browser): ! node_class(triangle_set_class::id, browser) {} *************** *** 1557,1566 **** /** * @brief Construct. * ! * @param browser the browser associated with this triangle_strip_set_class. */ triangle_strip_set_class::triangle_strip_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 1637,1653 ---- /** + * @brief @c node_class identifier. + */ + const char * const triangle_strip_set_class::id = + "urn:X-openvrml:node:TriangleStripSet"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c triangle_strip_set_class. */ triangle_strip_set_class::triangle_strip_set_class(openvrml::browser & browser): ! node_class(triangle_strip_set_class::id, browser) {} Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** vrml97node.cpp 5 Apr 2006 07:23:20 -0000 1.102 --- vrml97node.cpp 16 Apr 2006 08:22:18 -0000 1.103 *************** *** 66,69 **** --- 66,71 ---- class OPENVRML_LOCAL anchor_class : public node_class { public: + static const char * const id; + explicit anchor_class(openvrml::browser & browser); virtual ~anchor_class() OPENVRML_NOTHROW; *************** *** 81,84 **** --- 83,88 ---- [...2387 lines suppressed...] world_info_class::world_info_class(openvrml::browser & browser): ! node_class(browser) {} --- 26989,27003 ---- /** + * @brief @c node_class identifier. + */ + const char * const world_info_class::id = "urn:X-openvrml:node:WorldInfo"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this @c node_class. */ world_info_class::world_info_class(openvrml::browser & browser): ! node_class(world_info_class::id, browser) {} Index: x3d_core.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/x3d_core.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x3d_core.cpp 17 Mar 2006 07:23:29 -0000 1.1 --- x3d_core.cpp 16 Apr 2006 08:22:19 -0000 1.2 *************** *** 41,44 **** --- 41,46 ---- class OPENVRML_LOCAL metadata_double_class : public node_class { public: + static const char * const id; + explicit metadata_double_class(openvrml::browser & browser); virtual ~metadata_double_class() OPENVRML_NOTHROW; *************** *** 57,60 **** --- 59,64 ---- class OPENVRML_LOCAL metadata_float_class : public node_class { public: + static const char * const id; + explicit metadata_float_class(openvrml::browser & browser); virtual ~metadata_float_class() OPENVRML_NOTHROW; *************** *** 73,76 **** --- 77,82 ---- class OPENVRML_LOCAL metadata_integer_class : public node_class { public: + static const char * const id; + explicit metadata_integer_class(openvrml::browser & browser); virtual ~metadata_integer_class() OPENVRML_NOTHROW; *************** *** 89,92 **** --- 95,100 ---- class OPENVRML_LOCAL metadata_set_class : public node_class { public: + static const char * const id; + explicit metadata_set_class(openvrml::browser & browser); virtual ~metadata_set_class() OPENVRML_NOTHROW; *************** *** 105,108 **** --- 113,118 ---- class OPENVRML_LOCAL metadata_string_class : public node_class { public: + static const char * const id; + explicit metadata_string_class(openvrml::browser & browser); virtual ~metadata_string_class() OPENVRML_NOTHROW; *************** *** 120,132 **** using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class("urn:X-openvrml:node:MetadataDouble", shared_ptr<node_class>(new metadata_double_class(b))); ! b.add_node_class("urn:X-openvrml:node:MetadataFloat", shared_ptr<node_class>(new metadata_float_class(b))); ! b.add_node_class("urn:X-openvrml:node:MetadataInteger", shared_ptr<node_class>(new metadata_integer_class(b))); ! b.add_node_class("urn:X-openvrml:node:MetadataSet", shared_ptr<node_class>(new metadata_set_class(b))); ! b.add_node_class("urn:X-openvrml:node:MetadataString", shared_ptr<node_class>(new metadata_string_class(b))); } --- 130,142 ---- using boost::shared_ptr; using openvrml::node_class; ! b.add_node_class(metadata_double_class::id, shared_ptr<node_class>(new metadata_double_class(b))); ! b.add_node_class(metadata_float_class::id, shared_ptr<node_class>(new metadata_float_class(b))); ! b.add_node_class(metadata_integer_class::id, shared_ptr<node_class>(new metadata_integer_class(b))); ! b.add_node_class(metadata_set_class::id, shared_ptr<node_class>(new metadata_set_class(b))); ! b.add_node_class(metadata_string_class::id, shared_ptr<node_class>(new metadata_string_class(b))); } *************** *** 134,138 **** namespace { ! class OPENVRML_LOCAL metadata_double_node : public abstract_node<metadata_double_node> { friend class metadata_double_class; --- 144,150 ---- namespace { ! class OPENVRML_LOCAL metadata_double_node : ! public abstract_node<metadata_double_node> { ! friend class metadata_double_class; *************** *** 147,151 **** }; ! class OPENVRML_LOCAL metadata_float_node : public abstract_node<metadata_float_node> { friend class metadata_float_class; --- 159,165 ---- }; ! class OPENVRML_LOCAL metadata_float_node : ! public abstract_node<metadata_float_node> { ! friend class metadata_float_class; *************** *** 160,164 **** }; ! class OPENVRML_LOCAL metadata_integer_node : public abstract_node<metadata_integer_node> { friend class metadata_integer_class; --- 174,180 ---- }; ! class OPENVRML_LOCAL metadata_integer_node : ! public abstract_node<metadata_integer_node> { ! friend class metadata_integer_class; *************** *** 173,177 **** }; ! class OPENVRML_LOCAL metadata_set_node : public abstract_node<metadata_set_node> { friend class metadata_set_class; --- 189,195 ---- }; ! class OPENVRML_LOCAL metadata_set_node : ! public abstract_node<metadata_set_node> { ! friend class metadata_set_class; *************** *** 186,190 **** }; ! class OPENVRML_LOCAL metadata_string_node : public abstract_node<metadata_string_node> { friend class metadata_string_class; --- 204,210 ---- }; ! class OPENVRML_LOCAL metadata_string_node : ! public abstract_node<metadata_string_node> { ! friend class metadata_string_class; *************** *** 199,209 **** }; /** * @brief Construct. * ! * @param browser the browser associated with this metadata_double_class. */ metadata_double_class::metadata_double_class(openvrml::browser & browser): ! node_class(browser) {} --- 219,237 ---- }; + + /** + * @brief @c node_class identifier. + */ + const char * const metadata_double_class::id = + "urn:X-openvrml:node:MetadataDouble"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c metadata_double_class. */ metadata_double_class::metadata_double_class(openvrml::browser & browser): ! node_class(metadata_double_class::id, browser) {} *************** *** 215,232 **** /** ! * @brief Create a node_type. * ! * @param id the name for the new node_type. ! * @param interfaces the interfaces for the new node_type. * ! * @return a node_type_ptr to a node_type capable of creating MetadataDouble nodes. * * @exception unsupported_interface if @p interfaces includes an interface ! * not supported by metadata_double_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> ! metadata_double_class::do_create_type(const std::string & id, ! const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { --- 243,262 ---- /** ! * @brief Create a @c node_type. * ! * @param id the name for the new @c node_type. ! * @param interfaces the interfaces for the new @c node_type. * ! * @return a @c node_type capable of creating MetadataDouble nodes. * * @exception unsupported_interface if @p interfaces includes an interface ! * not supported by ! * @c metadata_double_class. * @exception std::bad_alloc if memory allocation fails. */ const boost::shared_ptr<openvrml::node_type> ! metadata_double_class:: ! do_create_type(const std::string & id, ! const node_interface_set & interfaces) const OPENVRML_THROW2(unsupported_interface, std::bad_alloc) { *************** *** 327,337 **** } /** * @brief Construct. * ! * @param browser the browser associated with this metadata_float_class. */ metadata_float_class::metadata_float_class(openvrml::browser & browser): ! node_class(browser) {} --- 357,375 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const metadata_float_class::id = + "urn:X-openvrml:node:MetadataFloat"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c metadata_float_class. */ metadata_float_class::metadata_float_class(openvrml::browser & browser): ! node_class(metadata_float_class::id, browser) {} *************** *** 455,465 **** } /** * @brief Construct. * ! * @param browser the browser associated with this metadata_integer_class. */ ! metadata_integer_class::metadata_integer_class(openvrml::browser & browser): ! node_class(browser) {} --- 493,512 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const metadata_integer_class::id = + "urn:X-openvrml:node:MetadataInteger"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c metadata_integer_class. */ ! metadata_integer_class:: ! metadata_integer_class(openvrml::browser & browser): ! node_class(metadata_integer_class::id, browser) {} *************** *** 584,593 **** /** * @brief Construct. * ! * @param browser the browser associated with this metadata_set_class. */ metadata_set_class::metadata_set_class(openvrml::browser & browser): ! node_class(browser) {} --- 631,647 ---- /** + * @brief @c node_class identifier. + */ + const char * const metadata_set_class::id = + "urn:X-openvrml:node:MetadataSet"; + + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c metadata_set_class. */ metadata_set_class::metadata_set_class(openvrml::browser & browser): ! node_class(metadata_set_class::id, browser) {} *************** *** 711,721 **** } /** * @brief Construct. * ! * @param browser the browser associated with this metadata_string_class. */ metadata_string_class::metadata_string_class(openvrml::browser & browser): ! node_class(browser) {} --- 765,783 ---- } + + /** + * @brief @c node_class identifier. + */ + const char * const metadata_string_class::id = + "urn:X-openvrml:node:MetadataString"; + /** * @brief Construct. * ! * @param browser the @c browser associated with this ! * @c metadata_string_class. */ metadata_string_class::metadata_string_class(openvrml::browser & browser): ! node_class(metadata_string_class::id, browser) {} Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Vrml97Parser.g 17 Mar 2006 07:23:29 -0000 1.61 --- Vrml97Parser.g 16 Apr 2006 08:22:17 -0000 1.62 *************** *** 709,713 **** : KEYWORD_PROTO id:ID { assert(scope); ! boost::shared_ptr<openvrml::scope> proto_scope(new openvrml::scope(id->getText(), scope)); } LBRACKET (protoInterfaceDeclaration[scene, --- 709,713 ---- : KEYWORD_PROTO id:ID { assert(scope); ! const boost::shared_ptr<openvrml::scope> proto_scope(new openvrml::scope(id->getText(), scope)); } LBRACKET (protoInterfaceDeclaration[scene, *************** *** 722,745 **** is_map, routes] RBRACE { ! shared_ptr<openvrml::node_class> ! node_class(new proto_node_class(scene.browser(), ! interfaces, ! default_value_map, ! impl_nodes, ! is_map, ! routes)); // // Add the new node_class (prototype definition) to the browser's // node_class_map. // ! // First, construct the id for the node implementation. ! // ! string impl_id; ! shared_ptr<const openvrml::scope> s = proto_scope; ! do { ! impl_id = '#' + s->id() + impl_id; ! } while ((s = s->parent())->parent()); ! impl_id = s->id() + impl_id; ! scene.browser().add_node_class(impl_id, node_class); if (!dynamic_pointer_cast<proto_node_class>( --- 722,739 ---- is_map, routes] RBRACE { ! const shared_ptr<openvrml::node_class> ! node_class( ! new proto_node_class(path(*proto_scope), ! scene.browser(), ! interfaces, ! default_value_map, ! impl_nodes, ! is_map, ! routes)); // // Add the new node_class (prototype definition) to the browser's // node_class_map. // ! scene.browser().add_node_class(node_class->id(), node_class); if (!dynamic_pointer_cast<proto_node_class>( *************** *** 977,1006 **** if (!node_type) { const shared_ptr<node_class> externproto_class( ! 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); - } } --- 971,992 ---- if (!node_type) { const shared_ptr<node_class> externproto_class( ! new externproto_node_class( ! path(*scope) + '#' + id->getText(), ! scene, ! alt_uris)); ! scene.browser().add_node_class(externproto_class->id(), ! externproto_class); ! 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); } Index: script.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/script.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** script.cpp 9 Mar 2006 05:19:17 -0000 1.68 --- script.cpp 16 Apr 2006 08:22:18 -0000 1.69 *************** *** 304,311 **** * @brief Construct. * ! * @param[in] browser the browser to be associated with the script_node_class. */ openvrml::script_node_class::script_node_class(openvrml::browser & browser): ! node_class(browser) {} --- 304,312 ---- * @brief Construct. * ! * @param[in] browser the @c browser to be associated with the ! * @c script_node_class. */ openvrml::script_node_class::script_node_class(openvrml::browser & browser): ! node_class("urn:X-openvrml:node:Script", browser) {} Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.52 retrieving revision 1.53 diff -C2... [truncated message content] |
From: Braden M. <br...@us...> - 2006-04-16 08:22:22
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8191 Modified Files: ChangeLog Log Message: Added node_class::id accessor; node_class must now be constructed with an id. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1217 retrieving revision 1.1218 diff -C2 -d -r1.1217 -r1.1218 *** ChangeLog 13 Apr 2006 07:37:53 -0000 1.1217 --- ChangeLog 16 Apr 2006 08:22:17 -0000 1.1218 *************** *** 1,2 **** --- 1,744 ---- + 2006-04-16 Braden McDaniel <br...@en...> + + Added node_class::id accessor; node_class must now be constructed + with an id. + + * src/libopenvrml/openvrml/Vrml97Parser.g + (proto): Construct proto_node_class with a node_class id; moved + code to construct the id to path(const scope &). + (externproto): Construct externproto_node_class with a node_class + id; add the externproto_node_class to the browser's node_class map + using this id regardless (instead of only if the alternative URI + list is empty). + * src/libopenvrml/openvrml/browser.cpp + (openvrml::proto_node_class::proto_node_class(const node_class_id + &, openvrml::browser &, const node_interface_set &, const + default_value_map_t & const is_map_t &, const routes_t &)): + Construct node_class with an id. + (externproto_node_class::externproto_node_class(const + openvrml::node_class_id &, const openvrml::scene &, const + std::vector<std::string> &)): Construct node_class with an id. + (openvrml::null_node_class::null_node_class(openvrml::browser &)): + Construct node_class with an id. + * src/libopenvrml/openvrml/browser.h + (openvrml::node_class_id): Removed; moved to node.h. + * src/libopenvrml/openvrml/node.cpp + (openvrml::node_class::node_class(const node_class_id &, + browser&): Initialize node_class::id_. + (openvrml::node_class::id() const): Added id accessor. + * src/libopenvrml/openvrml/node.h + (openvrml::node_class_id): Moved from browser.h. + (openvrml::node_class): Added member id_ and id accessor. + * src/libopenvrml/openvrml/scope.cpp + (openvrml::path(const scope &)): Added function; construct the + path to a scope. + * src/libopenvrml/openvrml/scope.h + (openvrml::path(const scope &)): Added function declaration. + * src/libopenvrml/openvrml/script.cpp + (openvrml::script_node_class::script_node_class(openvrml::browser&)): + Pass identifier to node_class constructor. + * src/libopenvrml/openvrml/vrml97node.cpp + (anchor_class): Added id member. + (appearance_class): Added id member. + (audio_clip_class): Added id member. + (background_class): Added id member. + (billboard_class): Added id member. + (box_class): Added id member. + (collision_class): Added id member. + (color_class): Added id member. + (color_interpolator_class): Added id member. + (cone_class): Added id member. + (coordinate_class): Added id member. + (coordinate_interpolator_class): Added id member. + (cylinder_class): Added id member. + (cylinder_sensor_class): Added id member. + (directional_light_class): Added id member. + (elevation_grid_class): Added id member. + (extrusion_class): Added id member. + (fog_class): Added id member. + (font_style_class): Added id member. + (group_class): Added id member. + (image_texture_class): Added id member. + (indexed_face_set_class): Added id member. + (indexed_line_set_class): Added id member. + (inline_class): Added id member. + (lod_class): Added id member. + (material_class): Added id member. + (movie_texture_class): Added id member. + (navigation_info_class): Added id member. + (normal_class): Added id member. + (normal_interpolator_class): Added id member. + (orientation_interpolator_class): Added id member. + (pixed_texture_class): Added id member. + (plane_sensor_class): Added id member. + (point_light_class): Added id member. + (point_set_class): Added id member. + (position_interpolator_class): Added id member. + (proximity_sensor_class): Added id member. + (scalar_interpolator_class): Added id member. + (shape_class): Added id member. + (sound_class): Added id member. + (sphere_class): Added id member. + (sphere_sensor_class): Added id member. + (spot_light_class): Added id member. + (switch_class): Added id member. + (text_class): Added id member. + (texture_coordinate_class): Added id member. + (texture_transform_class): Added id member. + (time_sensor_class): Added id member. + (touch_sensor_class): Added id member. + (transform_class): Added id member. + (visibility_sensor_class): Added id member. + (world_info_class): Added id member. + (register_vrml97_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (anchor_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (anchor_class::anchor_class(openvrml::browser &)): Pass the id to + the base node_class. + (appearance_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (appearance_class::appearance_class(openvrml::browser &)): Pass + the id to the base node_class. + (audio_clip_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (audio_clip_class::audio_clip_class(openvrml::browser &)): Pass + the id to the base node_class. + (background_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (background_class::background_class(openvrml::browser &)): Pass + the id to the base node_class. + (billboard_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (billboard_class::billboard_class(openvrml::browser &)): Pass the + id to the base node_class. + (collision_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (collision_class::collision_class(openvrml::browser &)): Pass the + id to the base node_class. + (color_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (color_class::color_class(openvrml::browser &)): Pass the id to + the base node_class. + (color_interpolator_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (color_interpolator_class::color_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (cone_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (cone_class::cone_class(openvrml::browser &)): Pass the id to the + base node_class. + (coordinate_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (coordinate_class::coordinate_class(openvrml::browser &)): Pass + the id to the base node_class. + (coordinate_interpolator_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (coordinate_interpolator_class::coordinate_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (cylinder_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (cylinder_class::cylinder_class(openvrml::browser &)): Pass the id + to the base node_class. + (cylinder_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (cylinder_sensor_class::cylinder_sensor_class(openvrml::browser&)): + Pass the id to the base node_class. + (directional_light_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (directional_light_class::directional_light_class(openvrml::browser&)): + Pass the id to the base node_class. + (elevation_grid_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (elevation_grid_class::elevation_grid_class(openvrml::browser &)): + Pass the id to the base node_class. + (extrusion_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (extrusion_class::extrusion_class(openvrml::browser &)): Pass the + id to the base node_class. + (fog_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (fog_class::fog_class(openvrml::browser &)): Pass the id to the + base node_class. + (font_style_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (font_style_class::font_style_class(openvrml::browser &)): Pass + the id to the base node_class. + (group_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (group_class::group_class(openvrml::browser &)): Pass the id to + the base node_class. + (image_texture_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (image_texture_class::image_texture_class(openvrml::browser &)): + Pass the id to the base node_class. + (indexed_face_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (indexed_face_set_class::indexed_face_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (indexed_line_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (indexed_line_set_class::indexed_line_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (inline_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (inline_class::inline_class(openvrml::browser &)): Pass the id to + the base node_class. + (lod_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (lod_class::lod_class(openvrml::browser &)): Pass the id to the + base node_class. + (material_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (material_class::material_class(openvrml::browser &)): Pass the id + to the base node_class. + (movie_texture_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (movie_texture_class::movie_texture_class(openvrml::browser &)): + Pass the id to the base node_class. + (navigation_info_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (navigation_info_class::navigation_info_class(openvrml::browser&)): + Pass the id to the base node_class. + (normal_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (normal_class::normal_class(openvrml::browser &)): Pass the id to + the base node_class. + (normal_interpolator_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (normal_interpolator_class::normal_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (orientation_interpolator_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (orientation_interpolator_class::orientation_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (pixel_texture_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (pixel_texture_class::pixel_texture_class(openvrml::browser &)): + Pass the id to the base node_class. + (plane_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (plane_sensor_class::plane_sensor_class(openvrml::browser &)): + Pass the id to the base node_class. + (point_light_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (point_light_class::point_light_class(openvrml::browser &)): Pass + the id to the base node_class. + (position_interpolator_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (position_interpolator_class::position_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (proximity_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (proximity_sensor_class::proximity_sensor_class(openvrml::browser + &)): Pass the id to the base node_class. + (scalar_interpolator_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (scalar_interpolator_class::scalar_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (shape_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (shape_class::shape_class(openvrml::browser &)): Pass the id to + the base node_class. + (sound_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (sound_class::sound_class(openvrml::browser &)): Pass the id to + the base node_class. + (sphere_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (sphere_class::sphere_class(openvrml::browser &)): Pass the id to + the base node_class. + (sphere_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (sphere_sensor_class::sphere_sensor_class(openvrml::browser &)): + Pass the id to the base node_class. + (spot_light_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (spot_light_class::spot_light_class(openvrml::browser &)): Pass + the id to the base node_class. + (switch_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (switch_class::switch_class(openvrml::browser &)): Pass the id to + the base node_class. + (text_class::id): node_class identifier used when registering an + instance with the browser and constructing the base node_class. + (text_class::text_class(openvrml::browser &)): Pass the id to the + base node_class. + (texture_coordinate_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (texture_coordinate_class::texture_coordinate_class(openvrml::browser&)): + Pass the id to the base node_class. + (texture_transform_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (texture_transform_class::texture_coordinate_class(openvrml::browser&)): + Pass the id to the base node_class. + (time_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (time_sensor_class::time_sensor_class(openvrml::browser &)): Pass + the id to the base node_class. + (touch_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (touch_sensor_class::touch_sensor_class(openvrml::browser &)): + Pass the id to the base node_class. + (transform_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (transform_class::transform_class(openvrml::browser &)): Pass the + id to the base node_class. + (viewpoint_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (viewpoint_class::viewpoint_class(openvrml::browser &)): Pass the + id to the base node_class. + (visibility_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (visibility_sensor_class::visibility_sensor_class(openvrml::browser&)): + Pass the id to the base node_class. + (world_info_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (world_info_class::world_info_class(openvrml::browser &)): Pass + the id to the base node_class. + * src/libopenvrml/openvrml/x3d_core.cpp + (metadata_double_class): Added id member. + (metadata_float_class): Added id member. + (metadata_integer_class): Added id member. + (metadata_set_class): Added id member. + (metadata_string_class): Added id member. + (register_core_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (metadata_double_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (metadata_double_class::metadata_double_class(openvrml::browser + &)): Pass the id to the base node_class. + (metadata_float_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (metadata_float_class::metadata_float_class(openvrml::browser &)): + Pass the id to the base node_class. + (metadata_integer_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (metadata_integer_class::metadata_integer_class(openvrml::browser&)): + Pass the id to the base node_class. + (metadata_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (metadata_set_class::metadata_set_class(openvrml::browser &)): + Pass the id to the base node_class. + (metadata_string_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (metadata_string_class::metadata_string_class(openvrml::browser&)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_dis.cpp + (espdu_transform_class): Added id member. + (receiver_pdu_class): Added id member. + (signal_pdu_class): Added id member. + (transmitter_pdu_class): Added id member. + (register_dis_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (espdu_transform_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (espdu_transform_class::espdu_transform_class(openvrml::browser&)): + Pass the id to the base node_class. + (receiver_pdu_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (receiver_pdu_class::receiver_pdu_class(openvrml::browser &)): + Pass the id to the base node_class. + (signal_pdu_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (signal_pdu_class::signal_pdu_class(openvrml::browser &)): + Pass the id to the base node_class. + (transmitter_pdu_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (transmitter_pdu_class::transmitter_pdu_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_event_utilities.cpp + (boolean_filter_class): Added id member. + (boolean_sequencer_class): Added id member. + (boolean_toggle_class): Added id member. + (boolean_trigger_class): Added id member. + (integer_sequencer_class): Added id member. + (integer_trigger_class): Added id member. + (time_trigger_class): Added id member. + (register_event_utilities_node_classes(openvrml::browser &)): Add + the node_classes using the id member of the concrete node_classes. + (boolean_filter_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (boolean_filter_class::boolean_filter_class(openvrml::browser &)): + Pass the id to the base node_class. + (boolean_sequencer_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (boolean_sequencer_class::boolean_sequencer_class(openvrml::browser &)): + Pass the id to the base node_class. + (boolean_toggle_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (boolean_toggle_class::boolean_toggle_class(openvrml::browser &)): + Pass the id to the base node_class. + (boolean_trigger_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (boolean_trigger_class::boolean_trigger_class(openvrml::browser &)): + Pass the id to the base node_class. + (integer_sequencer_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (integer_sequencer_class::integer_sequencer_class(openvrml::browser &)): + Pass the id to the base node_class. + (integer_trigger_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (integer_trigger_class::integer_trigger_class(openvrml::browser &)): + Pass the id to the base node_class. + (time_trigger_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (time_trigger_class::time_trigger_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_geometry2d.cpp + (polyline2d_class): Added id member. + (polypoint2d_class): Added id member. + (rectangle2d_class): Added id member. + (triangle_set2d_class): Added id member. + (register_geometry2d_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (polyline2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (polyline2d_class::polyline2d_class(openvrml::browser &)): Pass + the id to the base node_class. + (polypoint2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (polypoint2d_class::polypoint2d_class(openvrml::browser &)): Pass + the id to the base node_class. + (rectangle2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (rectangle2d_class::rectangle2d_class(openvrml::browser &)): Pass + the id to the base node_class. + (triangle_set2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (triangle_set2d_class::triangle_set2d_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_geospatial.cpp + (geo_coordinate_class): Added id member. + (geo_elevation_grid_class): Added id member. + (geo_location_class): Added id member. + (geo_lod_class): Added id member. + (geo_metadata_class): Added id member. + (geo_origin_class): Added id member. + (geo_position_interpolator_class): Added id member. + (geo_touch_sensor_class): Added id member. + (geo_viewpoint_class): Added id member. + (register_geospatial_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (geo_coordinate_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_coordinate_class::geo_coordinate_class(openvrml::browser &)): + Pass the id to the base node_class. + (geo_elevation_grid_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_elevation_grid_class::geo_elevation_grid_class(openvrml::browser&)): + Pass the id to the base node_class. + (geo_location_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_location_class::geo_location_class(openvrml::browser &)): + Pass the id to the base node_class. + (geo_lod_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (geo_lod_class::geo_lod_class(openvrml::browser &)): Pass the id + to the base node_class. + (geo_metadata_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_metadata_class::geo_metadata_class(openvrml::browser &)): + Pass the id to the base node_class. + (geo_origin_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_origin_class::geo_origin_class(openvrml::browser &)): Pass + the id to the base node_class. + (geo_position_interpolator_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (geo_position_interpolator_class::geo_position_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (geo_touch_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_touch_sensor_class::geo_touch_sensor_class(openvrml::browser&)): + Pass the id to the base node_class. + (geo_viewpoint_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (geo_viewpoint_class::geo_viewpoint_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_hanim.cpp + (hanim_displacer_class): Added id member. + (hanim_humanoid_class): Added id member. + (hanim_joint_class): Added id member. + (hanim_segment_class): Added id member. + (hanim_site_class): Added id member. + (register_hanim_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (hanim_displacer_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (hanim_displacer_class::hanim_displacer_class(openvrml::browser&)): + Pass the id to the base node_class. + (hanim_humanoid_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (hanim_humanoid_class::hanim_humanoid_class(openvrml::browser &)): + Pass the id to the base node_class. + (hanim_joint_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (hanim_joint_class::hanim_joint_class(openvrml::browser &)): + Pass the id to the base node_class. + (hanim_segment_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (hanim_segment_class::hanim_segment_class(openvrml::browser &)): + Pass the id to the base node_class. + (hanim_site_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (hanim_site_class::hanim_site_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_key_device_sensor.cpp + (key_sensor_class): Added id member. + (string_sensor_class): Added id member. + (register_key_device_sensor_node_classes(openvrml::browser &)): + Add the node_classes using the id member of the concrete + node_classes. + (key_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (key_sensor_class::key_sensor_class(openvrml::browser &)): Pass + the id to the base node_class. + (string_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (string_sensor_class::string_sensor_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_networking.cpp + (load_sensor_class): Added id member. + (register_networking_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (load_sensor_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (load_sensor_class::load_sensor_class(openvrml::browser &)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_nurbs.cpp + (contour2d_class): Added id member. + (contour_polyline2d_class): Added id member. + (coordinate_double_class): Added id member. + (nurbs_curve_class): Added id member. + (nurbs_curve2d_class): Added id member. + (nurbs_orientation_interpolator_class): Added id member. + (nurbs_patch_surface_class): Added id member. + (nurbs_position_interpolator_class): Added id member. + (nurbs_set_class): Added id member. + (nurbs_surface_interpolator_class): Added id member. + (nurbs_swept_surface_class): Added id member. + (nurbs_swung_surface_class): Added id member. + (nurbs_texture_coordinate_class): Added id member. + (nurbs_trimmed_surface_class): Added id member. + (register_nurbs_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (contour2d_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (contour2d_class::contour2d_class(openvrml::browser &)): Pass the + id to the base node_class. + (contour_polyline2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (contour_polyline2d_class::contour_polyline2d_class(openvrml::browser&)): + Pass the id to the base node_class. + (coordinate_double_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (coordinate_double_class::coordinate_double_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_curve_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_curve_class::nurbs_curve_class(openvrml::browser &)): Pass + the id to the base node_class. + (nurbs_curve2d_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_curve2d_class::nurbs_curve2d_class(openvrml::browser &)): + Pass the id to the base node_class. + (nurbs_orientation_interpolator_class::id): node_class identifier + used when registering an instance with the browser and + constructing the base node_class. + (nurbs_orientation_interpolator_class::nurbs_orientation_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_patch_surface_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_patch_surface_class::nurbs_patch_surface_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_position_interpolator_class::id): node_class identifier + used when registering an instance with the browser and + constructing the base node_class. + (nurbs_position_interpolator_class::nurbs_position_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_set_class::id): node_class identifier used when registering + an instance with the browser and constructing the base node_class. + (nurbs_set_class::nurbs_set_class(openvrml::browser &)): Pass the + id to the base node_class. + (nurbs_surface_interpolator_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (nurbs_surface_interpolator_class::nurbs_surface_interpolator_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_swept_surface_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_swept_surface_class::nurbs_swept_surface_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_swung_surface_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_swung_surface_class::nurbs_swung_surface_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_texture_coordinate_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (nurbs_texture_coordinate_class::nurbs_texture_coordinate_class(openvrml::browser&)): + Pass the id to the base node_class. + (nurbs_trimmed_surface_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (nurbs_trimmed_surface_class::nurbs_trimmed_surface_class(openvrml::browser&)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_rendering.cpp + (color_rgba_class): Added id member. + (indexed_triangle_fan_set_class): Added id member. + (indexed_triangle_set_class): Added id member. + (indexed_triangle_strip_set_class): Added id member. + (triangle_fan_set_class): Added id member. + (triangle_set_class): Added id member. + (triangle_strip_set_class): Added id member. + (register_rendering_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (color_rgba_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (color_rgba_class::color_rgba_class(openvrml::browser &)): Pass + the id to the base node_class. + (indexed_triangle_fan_set_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (indexed_triangle_fan_set_class::indexed_triangle_fan_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (indexed_triangle_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (indexed_triangle_set_class::indexed_triangle_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (indexed_triangle_strip_set_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (indexed_triangle_strip_set_class::indexed_triangle_strip_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (triangle_fan_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (triangle_fan_set_class::triangle_fan_set_class(openvrml::browser&)): + Pass the id to the base node_class. + (triangle_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (triangle_set_class::triangle_set_class(openvrml::browser &)): + Pass the id to the base node_class. + (triangle_strip_set_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (triangle_strip_set_class::triangle_strip_set_class(openvrml::browser&)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_shape.cpp + (line_properties_class): Added id member. + (register_shape_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (line_properties_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (line_properties_class::line_properties_class(openvrml::browser&)): + Pass the id to the base node_class. + * src/libopenvrml/openvrml/x3d_texturing.cpp + (multi_texture_class): Added id member. + (multi_texture_coordinate_class): Added id member. + (multi_texture_transform_class): Added id member. + (texture_coordinate_generator_class): Added id member. + (register_texturing_node_classes(openvrml::browser &)): Add the + node_classes using the id member of the concrete node_classes. + (multi_texture_class::id): node_class identifier used when + registering an instance with the browser and constructing the base + node_class. + (multi_texture_class::multi_texture_class(openvrml::browser &)): + Pass the id to the base node_class. + (multi_texture_coordinate_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (multi_texture_coordinate_class::multi_texture_coordinate_class(openvrml::browser&)): + Pass the id to the base node_class. + (multi_texture_transform_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (multi_texture_transform_class::multi_texture_transform_class(openvrml::browser&)): + Pass the id to the base node_class. + (texture_coordinate_generator_class::id): node_class identifier used + when registering an instance with the browser and constructing the + base node_class. + (texture_coordinate_generator_class::texture_coordinate_generator_class(openvrml::browser&)): + Pass the id to the base node_class. + 2006-04-13 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-13 07:37:56
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13213/src/libopenvrml/openvrml Modified Files: browser.cpp browser.h Log Message: Made openvrml::browser::out() and openvrml::browser::err() const. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -d -r1.162 -r1.163 *** browser.cpp 12 Apr 2006 20:08:15 -0000 1.162 --- browser.cpp 13 Apr 2006 07:37:53 -0000 1.163 *************** *** 5981,5986 **** viewer_(0), modified_(false), ! out_(out), ! err_(err), frame_rate_(0.0), flags_need_updating(false) --- 5981,5986 ---- viewer_(0), modified_(false), ! out_(&out), ! err_(&err), frame_rate_(0.0), flags_need_updating(false) *************** *** 7136,7143 **** * @param[in] str a string. */ ! void openvrml::browser::out(const std::string & str) { boost::mutex::scoped_lock(this->out_mutex_); ! this->out_ << str << std::endl; } --- 7136,7143 ---- * @param[in] str a string. */ ! void openvrml::browser::out(const std::string & str) const { boost::mutex::scoped_lock(this->out_mutex_); ! *this->out_ << str << std::endl; } *************** *** 7147,7154 **** * @param[in] str a string. */ ! void openvrml::browser::err(const std::string & str) { boost::mutex::scoped_lock(this->err_mutex_); ! this->err_ << str << std::endl; } --- 7147,7154 ---- * @param[in] str a string. */ ! void openvrml::browser::err(const std::string & str) const { boost::mutex::scoped_lock(this->err_mutex_); ! *this->err_ << str << std::endl; } Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** browser.h 5 Apr 2006 07:23:20 -0000 1.53 --- browser.h 13 Apr 2006 07:37:53 -0000 1.54 *************** *** 246,253 **** mutable boost::mutex out_mutex_; ! std::ostream & out_; mutable boost::mutex err_mutex_; ! std::ostream & err_; protected: --- 246,253 ---- mutable boost::mutex out_mutex_; ! std::ostream * const out_; mutable boost::mutex err_mutex_; ! std::ostream * const err_; protected: *************** *** 339,344 **** void update_flags(); ! void out(const std::string & str); ! void err(const std::string & str); protected: --- 339,344 ---- void update_flags(); ! void out(const std::string & str) const; ! void err(const std::string & str) const; protected: |
From: Braden M. <br...@us...> - 2006-04-13 07:37:56
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13213 Modified Files: ChangeLog Log Message: Made openvrml::browser::out() and openvrml::browser::err() const. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1216 retrieving revision 1.1217 diff -C2 -d -r1.1216 -r1.1217 *** ChangeLog 12 Apr 2006 20:08:15 -0000 1.1216 --- ChangeLog 13 Apr 2006 07:37:53 -0000 1.1217 *************** *** 1,2 **** --- 1,15 ---- + 2006-04-13 Braden McDaniel <br...@en...> + + Made openvrml::browser::out() and openvrml::browser::err() const. + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::out(const std::string & str) const): Made + function const. + (openvrml::browser::err(const std::string & str) const): Made + function const. + * src/libopenvrml/openvrml/browser.h + (openvrml::browser): Changed out_ and err_ from references to + pointers; made out() and err() const. + 2006-04-12 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-12 20:08:22
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008 Modified Files: ChangeLog Log Message: Emit an error when a requested component level is not supported. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1215 retrieving revision 1.1216 diff -C2 -d -r1.1215 -r1.1216 *** ChangeLog 11 Apr 2006 07:34:51 -0000 1.1215 --- ChangeLog 12 Apr 2006 20:08:15 -0000 1.1216 *************** *** 1,2 **** --- 1,129 ---- + 2006-04-12 Braden McDaniel <br...@en...> + + Emit an error when a requested component level is not supported. + + * src/libopenvrml/openvrml/X3DVrmlParser.g + (componentStatement): Catch std::invalid_argument thrown from + component::add_to_scope. + * src/libopenvrml/openvrml/browser.cpp + (component): Added pure virtual function support_level. Made + add_to_scope nonvirtual; delegate to pure virtual do_add_to_scope. + (component::add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Check that the requested level + is supported before delegating to do_add_to_scope. + (vrml97_component): Override support_level and do_add_to_scope. + (vrml97_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + vrml97_component::add_to_scope to here. + (x3d_core_component): Override support_level and do_add_to_scope. + (x3d_core_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_core_component::add_to_scope to here. + (x3d_time_component): Override support_level and do_add_to_scope. + (x3d_time_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_time_component::add_to_scope to here. + (x3d_networking_component): Override support_level and + do_add_to_scope. + (x3d_networking_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_networking_component::add_to_scope to here. + (x3d_grouping_component): Override support_level and + do_add_to_scope. + (x3d_grouping_component::do_add_to_scope(const openvrml::browser&, + openvrml::scope &, size_t) const): Moved + x3d_grouping_component::add_to_scope to here. + (x3d_rendering_component): Override support_level and + do_add_to_scope. + (x3d_rendering_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_rendering_component::add_to_scope to here. + (x3d_shape_component): Override support_level and do_add_to_scope. + (x3d_shape_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_shape_component::add_to_scope to here. + (x3d_geometry3d_component): Override support_level and + do_add_to_scope. + (x3d_geometry3d_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_geometry3d_component::add_to_scope to here. + (x3d_geometry2d_component): Override support_level and + do_add_to_scope. + (x3d_geometry2d_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_geometry2d_component::add_to_scope to here. + (x3d_text_component): Override support_level and do_add_to_scope. + (x3d_text_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_text_component::add_to_scope to here. + (x3d_sound_component): Override support_level and do_add_to_scope. + (x3d_sound_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_sound_component::add_to_scope to here. + (x3d_lighting_component): Override support_level and + do_add_to_scope. + (x3d_lighting_component::do_add_to_scope(const openvrml::browser&, + openvrml::scope &, size_t) const): Moved + x3d_lighting_component::add_to_scope to here. + (x3d_texturing_component): Override support_level and + do_add_to_scope. + (x3d_texturing_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_texturing_component::add_to_scope to here. + (x3d_interpolation_component): Override support_level and + do_add_to_scope. + (x3d_interpolation_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_interpolation_component::add_to_scope to here. + (x3d_pointing_device_sensor_component): Override support_level and + do_add_to_scope. + (x3d_pointing_device_sensor_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_pointing_device_sensor_component::add_to_scope to here. + (x3d_key_device_sensor_component): Override support_level and + do_add_to_scope. + (x3d_key_device_sensor_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_key_device_sensor_component::add_to_scope to here. + (x3d_environmental_sensor_component): Override support_level and + do_add_to_scope. + (x3d_environmental_sensor_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_environmental_sensor_component::add_to_scope to here. + (x3d_navigation_component): Override support_level and + do_add_to_scope. + (x3d_navigation_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_navigation_component::add_to_scope to here. + (x3d_environmental_effects_component): Override support_level and + do_add_to_scope. + (x3d_environmental_effects_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_environmental_effects_component::add_to_scope to here. + (x3d_geospatial_component): Override support_level and + do_add_to_scope. + (x3d_geospatial_component::do_add_to_scope(const + openvrml::browser&, openvrml::scope &, size_t) const): Moved + x3d_geospatial_component::add_to_scope to here. + (x3d_hanim_component): Override support_level and do_add_to_scope. + (x3d_hanim_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_hanim_component::add_to_scope to here. + (x3d_nurbs_component): Override support_level and do_add_to_scope. + (x3d_nurbs_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_nurbs_component::add_to_scope to here. + (x3d_dis_component): Override support_level and do_add_to_scope. + (x3d_dis_component::do_add_to_scope(const openvrml::browser &, + openvrml::scope &, size_t) const): Moved + x3d_dis_component::add_to_scope to here. + (x3d_event_utilities_component): Override support_level and + do_add_to_scope. + (x3d_event_utilities_component::do_add_to_scope(const + openvrml::browser &, openvrml::scope &, size_t) const): Moved + x3d_utilities_component::add_to_scope to here. + * tests/testsuite.at: Added test to confirm that an error is emitted + when an unsupported component level is encountered. + 2006-04-11 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2006-04-12 20:08:19
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008/src/libopenvrml/openvrml Modified Files: X3DVrmlParser.g browser.cpp Log Message: Emit an error when a requested component level is not supported. Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** X3DVrmlParser.g 19 Mar 2006 16:42:22 -0000 1.20 --- X3DVrmlParser.g 12 Apr 2006 20:08:15 -0000 1.21 *************** *** 3,7 **** // OpenVRML // ! // Copyright 2000, 2001, 2003, 2004 Braden N. McDaniel // // This library is free software; you can redistribute it and/or --- 3,7 ---- // OpenVRML // ! // Copyright 2000, 2001, 2003, 2004, 2005, 2005 Braden N. McDaniel // // This library is free software; you can redistribute it and/or *************** *** 275,278 **** --- 275,284 ---- id->getColumn()); } + catch [std::invalid_argument & ex] { + throw antlr::SemanticException(ex.what(), + this->uri, + id->getLine(), + id->getColumn()); + } metaStatement[std::map<std::string, std::string> & meta_data] Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -d -r1.161 -r1.162 *** browser.cpp 11 Apr 2006 07:34:51 -0000 1.161 --- browser.cpp 12 Apr 2006 20:08:15 -0000 1.162 *************** *** 3896,3902 **** virtual ~component() OPENVRML_NOTHROW = 0; ! virtual void add_to_scope(const openvrml::browser & b, ! openvrml::scope & scope, ! int support_level) const = 0; protected: --- 3896,3904 ---- virtual ~component() OPENVRML_NOTHROW = 0; [...1510 lines suppressed...] const char * const x3d_event_utilities_component::id = "EventUtilities"; + size_t x3d_event_utilities_component::support_level() const + OPENVRML_NOTHROW + { + return 1; + } + void ! x3d_event_utilities_component:: ! do_add_to_scope(const openvrml::browser & b, ! openvrml::scope & scope, ! const size_t level) const ! OPENVRML_THROW1(std::bad_alloc) { using namespace openvrml; ! if (level >= 1) { // // BooleanFilter node |