From: Braden M. <br...@us...> - 2005-11-26 22:04:42
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3069/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g X3DVrmlParser.g browser.cpp browser.h Log Message: Made create_root_scope a nonmember function. Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** X3DVrmlParser.g 30 Oct 2005 03:20:17 -0000 1.5 --- X3DVrmlParser.g 26 Nov 2005 22:04:33 -0000 1.6 *************** *** 202,206 **** profile_id profile = invalid_profile_id; std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! scene.browser().create_root_scope(this->uri); const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } --- 202,206 ---- profile_id profile = invalid_profile_id; std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! create_root_scope(scene.browser(), this->uri); const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** browser.cpp 26 Nov 2005 20:18:09 -0000 1.95 --- browser.cpp 26 Nov 2005 22:04:33 -0000 1.96 *************** *** 4066,4069 **** --- 4066,5818 ---- return result_uri; } + + /** + * @brief Create a root scope. + */ + std::auto_ptr<openvrml::scope> + create_root_scope(openvrml::browser & browser, const std::string & uri) + throw (std::bad_alloc) [...3462 lines suppressed...] - "title") - }; - static const node_interface_set - interface_set(interfaces, interfaces + 2); - node_class = - this->node_class_map_.find("urn:X-openvrml:node:WorldInfo"); - assert(node_class); - root_scope->add_type(node_class->create_type("WorldInfo", - interface_set)); - } - } catch (std::invalid_argument & ex) { - OPENVRML_PRINT_EXCEPTION_(ex); - } - return root_scope; - } - - /** * @internal * --- 6534,6537 ---- Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** browser.h 26 Nov 2005 20:18:09 -0000 1.35 --- browser.h 26 Nov 2005 22:04:33 -0000 1.36 *************** *** 338,344 **** private: - OPENVRML_LOCAL std::auto_ptr<scope> - create_root_scope(const std::string & uri) throw (std::bad_alloc); - virtual std::auto_ptr<resource_istream> do_get_resource(const std::string & uri) = 0; --- 338,341 ---- Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Vrml97Parser.g 26 Nov 2005 20:18:09 -0000 1.36 --- Vrml97Parser.g 26 Nov 2005 22:04:33 -0000 1.37 *************** *** 627,631 **** { std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! scene.browser().create_root_scope(this->uri); const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } --- 627,631 ---- { std::auto_ptr<openvrml::scope> root_scope_auto_ptr = ! create_root_scope(scene.browser(), this->uri); const boost::shared_ptr<openvrml::scope> root_scope(root_scope_auto_ptr); } |