/** * \file rmf/KeyCategory.h * \brief Handle read/write of Model data from/to files. * * Copyright 2007-2011 IMP Inventors. All rights reserved. * */ #include namespace rmf { RootHandle::RootHandle(boost::shared_ptr shared): NodeHandle(0, shared) {} RootHandle::RootHandle(std::string name, bool clear): NodeHandle( 0, boost::shared_ptr(new internal::SharedData(name, clear))) { } NodeHandle RootHandle::get_node_handle_from_id(NodeID id) const { //RMF_USAGE_CHECK( id >=0, "Invalid id " << id); return NodeHandle(id.get_index(), shared_); } NodeHandle RootHandle::get_node_handle_from_association(void*d) const { return NodeHandle(shared_->get_association(d), shared_); } }