how to package graph related data ???

Hi all, I'm developing a hardware test program with some class abstractions like resistor, diode, relay ... which I stick to the BGL graph structure in the edge properties. I so have some information associated with vertices, and the result is a set of data composed of the graph itself - an ajacency_list - the graph properties for edges and vertices and a couple of vectors for the abstractions. My problem is how can I manage all these data in an OO program. The method used in BGL examples (just declare all these in main ) is right just for that, but in a more complex object colaboration society I consider it to be simple and useless. I just use a class named GraphContainer to package all the elements, but I wonder if there is any other better aproach... class GraphContainer{ int nVertices; public: UGraph g; property_map<UGraph, vertex_index_t>::type id; property_map<UGraph, edge_name_t>::type name; property_map<UGraph, vertex_name_t>::type vname; std::map<string,boost::graph_traits<UGraph>::vertex_descriptor> vertx; // mapa vertices(string)--vertex_descriptor vector<Lampara> Lamparas; vector<Diodo> Diodos; vector<Switch> Switches; vector<Resistencia> Resistencias; vector<Bobina> Bobinas; // ---------- GraphContainer(); }; Thanks a lot... --------------------------------- Antivirus Filtros antispam 6 MB gratis ¿Todavía no tienes un correo inteligente?
participants (1)
-
Gustavo Sánchez