8 #include <boost/graph/adjacency_list.hpp> 9 #include <boost/graph/depth_first_search.hpp> 10 #include <boost/graph/dijkstra_shortest_paths.hpp> 11 #include <boost/graph/graph_utility.hpp> 12 #include <boost/graph/graphviz.hpp> 13 #include <boost/graph/isomorphism.hpp> 14 #include <boost/graph/properties.hpp> 15 #include <boost/graph/topological_sort.hpp> 16 #include <boost/graph/visitors.hpp> 17 #include <boost/utility.hpp> 28 typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::property<boost::vertex_name_t, std::string> >
ObjectGraph_Type;
54 ObjectGraph(std::vector<Core::DocObject*> objs,
bool ignoreLinksToTemporaryObjects =
false);
64 bool recreate(std::vector<const Core::DocObject*> toDelete);
65 bool allLinksConnected();
69 std::vector<Core::DocObject*> build_SubGraph(
const std::vector<Core::DocObject*>& featureSet);
75 std::vector<const Core::DocObject*> getTopologicalSorted();
85 std::vector< std::string > getErrors();
90 ObjectGraph_Type build(
const std::vector<Core::DocObject*>& featureSet, std::map<size_t, Core::DocObject*>& myFeaturemap);
94 std::set<const Core::DocObject*>& beforeobjects,
97 std::vector<const Core::DocObject*>& beforeobjects,
99 boost::unordered_map<Object_Vertex, const Core::DocObject*> _vertex_to_object;
100 boost::unordered_map<const Core::DocObject*, Object_Vertex> _object_to_vertex;
102 boost::unordered_map<Object_Vertex, const Core::DocObject*> _vertex_to_object_BackLink;
103 boost::unordered_map<const Core::DocObject*, Object_Vertex> _object_to_vertex_BackLink;
107 bool _ignoreLinksToTemporaryObjects =
false;
109 std::vector< std::string > mErrors;
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, boost::property< boost::vertex_name_t, std::string > > ObjectGraph_Type
Definition: GraphBuilder.h:28
#define CORE_EXPORT
Definition: core_defines2.h:10
void removeObject(Core::DocObject *e)
Removes an object from the document.
ObjectGraph_Type::vertex_descriptor Object_Vertex
Definition: GraphBuilder.h:41
std::vector< const Core::DocObject * > getInner(const Core::DocObject *me, std::function< bool(const Core::DocObject *)> *allowToAddObject=0)
Get ALL Links to me, also indirect.
bool addObject(Core::DocObject *e)
Adds an existing object to the document.
std::vector< const Core::DocObject * > getBackLinksFromMe(const Core::DocObject *o)
Returns all objects 'o' directly linked from 'o'.
std::vector< const Core::DocObject * > getBackLinksToMe(const Core::DocObject *o)
Returns all objects that directly linked to 'o'.
std::vector< const Core::DocObject * > getOuter(const Core::DocObject *me)
Get ALL Links from me, also indirect.
std::vector< const Core::DocObject * > getLinksFromMe(const Core::DocObject *o)
Returns all objects 'o' directly linked from 'o'.
std::vector< const Core::DocObject * > getLinksToMe(const Core::DocObject *o)
Returns all objects that directly linked to 'o'.
Definition: GraphBuilder.h:47
Definition: DocObject.h:28