Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26966/src/libopenvrml/openvrml
Modified Files:
browser.cpp node.h
Log Message:
It is not desirable for arbitrary clients of openvrml::node to be able to share ownership of the scope. Changed openvrml::node::scope() to return a reference rather than a boost::shared_ptr.
Index: node.h
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** node.h 8 Dec 2005 06:50:14 -0000 1.46
--- node.h 10 Feb 2006 09:12:57 -0000 1.47
***************
*** 299,302 ****
--- 299,303 ----
class OPENVRML_API node : boost::noncopyable {
friend class proto_node;
+ friend class externproto_node;
friend std::ostream & operator<<(std::ostream & out, const node & n);
***************
*** 422,426 ****
void id(const std::string & node_id) throw (std::bad_alloc);
! const boost::shared_ptr<openvrml::scope> & scope() const throw ();
openvrml::scene * scene() const throw ();
--- 423,427 ----
void id(const std::string & node_id) throw (std::bad_alloc);
! openvrml::scope & scope() const throw ();
openvrml::scene * scene() const throw ();
***************
*** 540,546 ****
}
! inline const boost::shared_ptr<scope> & node::scope() const throw ()
{
! return this->scope_;
}
--- 541,548 ----
}
! inline scope & node::scope() const throw ()
{
! assert(this->scope_);
! return *this->scope_;
}
Index: browser.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -d -r1.123 -r1.124
*** browser.cpp 21 Jan 2006 20:32:03 -0000 1.123
--- browser.cpp 10 Feb 2006 09:12:57 -0000 1.124
***************
*** 403,412 ****
} // namespace openvrml
- namespace {
- class externproto_node;
- }
-
namespace openvrml {
/**
* @internal
[...1162 lines suppressed...]
! */
! openvrml::viewpoint_node * openvrml::externproto_node::to_viewpoint() throw ()
! {
! return node_cast<viewpoint_node *>(this->proto_node_.get());
! }
***************
*** 7907,7911 ****
const intrusive_ptr<node> & n = this->scene_->nodes().front();
if (n) {
! node * const vp = n->scope()->find_node(viewpoint_node_id);
initial_viewpoint = dynamic_cast<viewpoint_node *>(vp);
}
--- 7890,7894 ----
const intrusive_ptr<node> & n = this->scene_->nodes().front();
if (n) {
! node * const vp = n->scope().find_node(viewpoint_node_id);
initial_viewpoint = dynamic_cast<viewpoint_node *>(vp);
}
|