COIN-OR::LEMON - Graph Library

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


Ignore:
Timestamp:
05/18/05 15:02:47 (19 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/lemon_reader.h

    r1424 r1427  
    100100  /// while it does not starts with \c \@ character. This line can start a
    101101  /// new section or if it can close the file with the \c \@end line.
    102   /// The file format ignore the empty lines and it may contain comments
    103   /// started with a \c # character to the end of the line.
     102  /// The file format ignore the empty and comment lines. The line is
     103  /// comment line if it starts with a \c # character.
    104104  ///
    105105  /// The framework provides an abstract LemonReader::SectionReader class
     
    109109  /// can be attached to an LemonReader and the first attached what can
    110110  /// process the section will be used. Its \c read() member will called
    111   /// with a stream contains the section. From this stream the empty lines
    112   /// and comments are filtered out.
     111  /// with a stream contains the section. From this stream the empty and
     112  /// comment lines are filtered out.
    113113  ///
    114114  /// \relates GraphReader
     
    134134      enum skip_state_type {
    135135        no_skip,
    136         after_comment,
    137136        after_endl,
    138         empty_line
     137        comment_line
    139138      };
    140139
     
    181180            skip_state = after_endl;
    182181            return true;
    183           case '#':
    184             skip_state = after_comment;
    185             return false;
    186182          default:
    187183            return true;
    188184          }
    189         case after_comment:
    190           switch (c) {
    191           case '\n':
    192             skip_state = after_endl;
    193             return true;
    194           default:
    195             return false;
    196           }       
    197185        case after_endl:
    198186          switch (c) {
     
    202190            return false;
    203191          case '#':
    204             skip_state = empty_line;
     192            skip_state = comment_line;
    205193            return false;
    206194          default:
     
    213201          }
    214202          break;
    215         case empty_line:
     203        case comment_line:
    216204          switch (c) {
    217205          case '\n':
Note: See TracChangeset for help on using the changeset viewer.