COIN-OR::LEMON - Graph Library

Changeset 2416:261b4701405d in lemon-0.x


Ignore:
Timestamp:
03/30/07 16:17:28 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3248
Message:

Small improvments

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • demo/reader_writer_demo.cc

    r2391 r2416  
    4040  try {
    4141    std::string filename="sample.lgf";
     42    std::string name;
    4243    GraphReader<SmartGraph> reader(filename,graph);
    4344    SmartGraph::EdgeMap<int> cap(graph);
    4445    reader.readEdgeMap("capacity",cap);
     46    reader.readAttribute("name",name);
    4547    reader.run();
    4648
     
    5254    GraphWriter<SmartGraph> writer(std::cout, graph);
    5355    writer.writeEdgeMap("multiplicity", cap);
     56    writer.writeAttribute("name",name);
    5457    writer.run();
    5558     
  • demo/sample.lgf

    r1901 r2416  
    2121target 5
    2222@edges
    23 @attributes
     23@attributes
     24name "Simple Sample Graph"
    2425author "Attila BERNATH"
    2526@end
  • lemon/lemon_reader.h

    r2391 r2416  
    19521952    /// Add an attribute reader command for the reader.
    19531953    template <typename Value>
    1954     AttributeReader& readAttribute(const std::string& id, Value& value) {
     1954    AttributeReader& readAttribute(const std::string& label, Value& value) {
    19551955      return readAttribute<typename Traits::template Reader<Value> >
    1956         (id, value);
     1956        (label, value);
    19571957    }
    19581958
     
    19611961    /// Add an attribute reader command for the reader.
    19621962    template <typename ItemReader, typename Value>
    1963     AttributeReader& readAttribute(std::string label, Value& value,
     1963    AttributeReader& readAttribute(const std::string& label, Value& value,
    19641964                                   const ItemReader& ir = ItemReader()) {
    19651965      checkConcept<_reader_bits::ItemReader<Value>, ItemReader>();
     
    20132013      }
    20142014    }   
    2015 
     2015   
    20162016    virtual void missing() {
    20172017      if (readers.empty()) return;
Note: See TracChangeset for help on using the changeset viewer.