[BGL] boost::detail::error_property_not_found issue
Hi boost users, at first some pieces of code: class EdgeProperties { public: cPose m_pose; PosePrecision m_precisionPose; }; class VertexContainer { public: VertexID m_idVertex; //!< ID of the container VertexID m_idParent; //!< ID of the parent container unsigned int m_nDepth; //!< Depth of vertex in the tree }; typedef adjacency_list< vecS , vecS , bidirectionalS , VertexContainer , EdgeProperties
BGLGraph;
void traverse(BGLGraph& graphIn, const IDMapper& idMapperIn) { // Get the index map typedef property_map<BGLGraph, VertexID VertexContainer::*>::type IndexMap; IndexMap im = get(&VertexContainer::m_idVertex, graphIn); // The source vertex BGLVertexDescriptor startDescriptor; idMapperIn.mapIDs(this->getStartID(), startDescriptor); std::vector<BGLVertexDescriptor> p(num_vertices(graphIn)); p[get(im, startDescriptor)] = startDescriptor; //p[startDescriptor] = startDescriptor; breadth_first_search( graphIn , startDescriptor , vertex_index_map(im).visitor(make_bfs_visitor(record_predecessors(&p[0], boost::on_tree_edge()))) ); . . . } Compiling my whole code that contains the above one gives me the following error/warning: ----------------------------------------------------------------------------------------------------------- ph_visitor_t,boost::bgl_named_params<IndexMap,boost::vertex_index_t,boost::no_property>::self>,boost::graph_visitor_t>::type>::result<boost::bfs_visitor<>>::type ] d:\FAS_SIM\SDKs\boost_1_35_0\boost\graph\breadth_first_search.hpp(256): Siehe Verweis auf Instanziierung der kompilierten Funktionsvorlage 'void boost::detail::bfs_dispatch<boost::detail::error_property_not_found>::apply<VertexListGraph,boost::bfs_visitor<Visitors>,boost::graph_visitor_t,boost::bgl_named_params<T,Tag,Base>::self>(VertexListGraph &,boost::graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<boost::bfs_visitor<Visitors>,boost::graph_visitor_t,boost::bgl_named_params<T,Tag,Base>::self> &,boost::detail::error_property_not_found)' with [ VertexListGraph=de::audi::scenetree::BGLGraph, Visitors=boost::predecessor_recorder<std::allocator<std::_Vbase>::value_type *__w64 ,boost::on_tree_edge>, T=IndexMap, Tag=boost::vertex_index_t, Base=boost::no_property, G=de::audi::scenetree::BGLGraph ] d:\Sources\SceneTreeLib\test_src\de\audi\scenetree\visitor\DepthTestVisitor.cpp(48): Siehe Verweis auf Instanziierung der kompilierten Funktionsvorlage 'void boost::breadth_first_search<de::audi::scenetree::BGLGraph,boost::bfs_visitor<Visitors>,boost::graph_visitor_t,boost::bgl_named_params<T,Tag,Base>::self>(const VertexListGraph &,boost::graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<boost::bfs_visitor<Visitors>,boost::graph_visitor_t,boost::bgl_named_params<T,Tag,Base>::self> &)' with [ Visitors=boost::predecessor_recorder<std::allocator<std::_Vbase>::value_type *__w64 ,boost::on_tree_edge>, T=IndexMap, Tag=boost::vertex_index_t, Base=boost::no_property, VertexListGraph=de::audi::scenetree::BGLGraph, G=de::audi::scenetree::BGLGraph ] ----------------------------------------------------------------------------------------------------------- Does anybody know what this means? greetz, Manuel -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Does anybody know what this means?
Not really. It looks like the instantiation is having trouble finding the color map - which should be created implicitly since you're not specifying one. It may be some kind of odd conflict with your index map. If you're declaring your graphs with VertexList == vecS, you don't need an index map. The graph will implicitly create one for you. Andrew Sutton andrew.n.sutton@gmail.com
Am Di November 18 2008 19:36:34 schrieb Andrew Sutton:
Does anybody know what this means?
Not really. It looks like the instantiation is having trouble finding the color map - which should be created implicitly since you're not specifying one. It may be some kind of odd conflict with your index map. If you're declaring your graphs with VertexList == vecS, you don't need an index map. The graph will implicitly create one for you.
Andrew Sutton andrew.n.sutton@gmail.com
You're right. But I want to implement a method that is independet of the VertexList type. Something I haven't mentioned before: MSVC 7.1 says this is an error, but the compiler seems to ignore them. Because the code will compile. Perhaps it's only an odd warning... Beside that, with VertexList==listS the posted code really doesn't compile. But this is another threat ;-) (see [graph] predecessor_recorder and VertexList=listS) thanks for the response, Manuel
participants (3)
-
Andrew Sutton
-
M. Siebeneicher
-
trashing@gmx.net