lemon/lemon_reader.h
changeset 1509 f9113440b667
parent 1492 0d58f0301923
child 1627 3fd1ba6e9872
equal deleted inserted replaced
3:021727a9004a 4:588cf105e78a
   308       /// the given LemonReader.
   308       /// the given LemonReader.
   309       SectionReader(LemonReader& reader) {
   309       SectionReader(LemonReader& reader) {
   310 	reader.attach(*this);
   310 	reader.attach(*this);
   311       }
   311       }
   312 
   312 
       
   313       virtual ~SectionReader() {}
       
   314 
   313       /// \brief Gives back true when the SectionReader can process 
   315       /// \brief Gives back true when the SectionReader can process 
   314       /// the section with the given header line.
   316       /// the section with the given header line.
   315       ///
   317       ///
   316       /// It gives back true when the SectionReader can process
   318       /// It gives back true when the SectionReader can process
   317       /// the section with the given header line.
   319       /// the section with the given header line.
   569 
   571 
   570     template <typename _Item>
   572     template <typename _Item>
   571     class IdReaderBase {
   573     class IdReaderBase {
   572     public:
   574     public:
   573       typedef _Item Item;
   575       typedef _Item Item;
       
   576       virtual ~IdReaderBase() {}
   574       virtual Item read(std::istream& is) const = 0;
   577       virtual Item read(std::istream& is) const = 0;
   575       virtual bool isIdReader() const = 0;
   578       virtual bool isIdReader() const = 0;
   576     };
   579     };
   577 
   580 
   578     template <typename _Item, typename _BoxedIdReader>
   581     template <typename _Item, typename _BoxedIdReader>
   598     };
   601     };
   599 
   602 
   600     class ValueReaderBase {
   603     class ValueReaderBase {
   601     public:
   604     public:
   602       virtual void read(std::istream&) {};
   605       virtual void read(std::istream&) {};
       
   606       virtual ~ValueReaderBase() {}
   603     };
   607     };
   604 
   608 
   605     template <typename _Value, typename _Reader>
   609     template <typename _Value, typename _Reader>
   606     class ValueReader : public ValueReaderBase {
   610     class ValueReader : public ValueReaderBase {
   607     public:
   611     public: