Boost logo

Boost Users :

From: Jens Müller (jens.mueller_at_[hidden])
Date: 2006-10-02 12:51:23


Jens Müller schrieb:
> I tried to read a GraphML file using Douglas' code and the following:

>
> I am not even really interested in the d0 properties ...

Now I did that:

  static void
  on_end_element(void* user_data, const XML_Char *c_name)
  {
    self_type* self = static_cast<self_type*>(user_data);
    std::string name(c_name);

    bool stored = false;

    if (name == "data") {
      typename std::map<std::string, vertex_descriptor>::iterator v =
        self->vertex.find(self->active_descriptor);
      if (v != self->vertex.end()) {
        // stored = put(self->active_key, self->dp, *v,
self->character_data);
      } else {
        typename std::map<std::string, edge_descriptor>::iterator e =
          self->edge.find(self->active_descriptor);
        if (e != self->edge.end())
          ;// stored = put(self->active_key, self->dp, *e,
self->character_data);
      }

      if (!stored) self->unhandled_data(self->active_key);
    }
  }

(two lines commented out)

But I have to take a closer look ...

Probably sooner or later I'll get a graph where I need some properties.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net