GraphPtr loadGraph( const std::string & fileName ) throw ( ResourceException ) { Resource * rsrc = ResourceManager::getResource( fileName, &Graph::load, Graph::LABEL ); if ( rsrc == 0x0 ) { logger << Logger::ERR_MSG << "No resource available\n"; throw ResourceException(); } Graph * graph = dynamic_cast< Graph * >( rsrc ); if ( graph == 0x0 ) { logger << Logger::ERR_MSG << "Resource with name " << fileName << " is not a Graph\n"; throw ResourceException(); } return GraphPtr( graph ); }
GraphPtr SceneGraphFactory::createSceneGraph() { return GraphPtr(new SceneGraph); }