COIN-OR::LEMON - Graph Library

Changeset 1427:14c75970840e in lemon-0.x for src/lemon/bits/item_reader.h


Ignore:
Timestamp:
05/18/05 15:02:47 (15 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1899
Message:

Two minor changes.

DefaultReader?<std::string>
comment lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/bits/item_reader.h

    r1415 r1427  
    342342  };
    343343
    344   template <typename Item>
    345   class DefaultReader<std::vector<Item> >
    346     : public PushBackReader<std::vector<Item> > {};
    347 
    348   template <typename Item>
    349   class DefaultReader<std::deque<Item> >
    350     : public PushBackReader<std::deque<Item> > {};
    351 
    352   template <typename Item>
    353   class DefaultReader<std::list<Item> >
    354     : public PushBackReader<std::list<Item> > {};
    355 
    356   template <typename Item>
    357   class DefaultReader<std::set<Item> >
    358     : public InsertReader<std::set<Item> > {};
    359 
    360   template <typename Item>
    361   class DefaultReader<std::multiset<Item> >
    362     : public InsertReader<std::multiset<Item> > {};
    363 
    364   /// \ingroup item_io
    365   ///
    366   /// \brief The default item reader for skipping a value in the stream.
    367   ///
    368   /// The default item reader for skipping a value in the stream.
    369   ///
    370   /// \author Balazs Dezso
    371   class DefaultSkipper {
     344  template <>
     345  class DefaultReader<std::string> {
    372346  public:
    373347    typedef std::string Value;
     
    385359        break;
    386360      default:
    387         DefaultReader<std::string>().read(is, value);
     361        is >> value;
    388362        break;
    389363      }
    390364    }
    391   };
     365   
     366  };
     367
     368  template <typename Item>
     369  class DefaultReader<std::vector<Item> >
     370    : public PushBackReader<std::vector<Item> > {};
     371
     372  template <typename Item>
     373  class DefaultReader<std::deque<Item> >
     374    : public PushBackReader<std::deque<Item> > {};
     375
     376  template <typename Item>
     377  class DefaultReader<std::list<Item> >
     378    : public PushBackReader<std::list<Item> > {};
     379
     380  template <typename Item>
     381  class DefaultReader<std::set<Item> >
     382    : public InsertReader<std::set<Item> > {};
     383
     384  template <typename Item>
     385  class DefaultReader<std::multiset<Item> >
     386    : public InsertReader<std::multiset<Item> > {};
     387
     388  /// \ingroup item_io
     389  ///
     390  /// \brief The default item reader for skipping a value in the stream.
     391  ///
     392  /// The default item reader for skipping a value in the stream.
     393  ///
     394  /// \author Balazs Dezso
     395  class DefaultSkipper : public DefaultReader<std::string> {};
    392396
    393397  /// \ingroup item_io 
Note: See TracChangeset for help on using the changeset viewer.