lemon/bits/item_writer.h
changeset 1946 17eb3eaad9f8
parent 1910 f95eea8c34b0
child 1956 a055123339d5
equal deleted inserted replaced
5:cb1f49d897a9 6:a1b5a0296150
    12  * express or implied, and with no claim as to its suitability for any
    12  * express or implied, and with no claim as to its suitability for any
    13  * purpose.
    13  * purpose.
    14  *
    14  *
    15  */
    15  */
    16 
    16 
    17 /// \ingroin item_io
    17 /// \ingroup item_io
    18 /// \file
    18 /// \file
    19 /// \brief Item writer bits for lemon output.
    19 /// \brief Item writer bits for lemon output.
    20 
    20 
    21 #ifndef LEMON_BITS_ITEM_WRITER_H
    21 #ifndef LEMON_BITS_ITEM_WRITER_H
    22 #define LEMON_BITS_ITEM_WRITER_H
    22 #define LEMON_BITS_ITEM_WRITER_H
    32 namespace lemon {
    32 namespace lemon {
    33   
    33   
    34   template <typename Value>
    34   template <typename Value>
    35   class DefaultWriter;
    35   class DefaultWriter;
    36 
    36 
    37   /// \ingroin item_io
    37   /// \ingroup item_io
    38   /// \brief Writer class for quoted strings.
    38   /// \brief Writer class for quoted strings.
    39   ///
    39   ///
    40   /// Writer class for quoted strings. It can process the escape
    40   /// Writer class for quoted strings. It can process the escape
    41   /// sequences in the string.
    41   /// sequences in the string.
    42   /// \author Balazs Dezso
    42   /// \author Balazs Dezso
   115     }
   115     }
   116   private:
   116   private:
   117     bool escaped;
   117     bool escaped;
   118   };
   118   };
   119 
   119 
   120   /// \ingroin item_io
   120   /// \ingroup item_io
   121   /// \brief Writer class for quoted char array.
   121   /// \brief Writer class for quoted char array.
   122   ///
   122   ///
   123   /// Writer class for quoted char array. It can process the escape
   123   /// Writer class for quoted char array. It can process the escape
   124   /// sequences in the char array.
   124   /// sequences in the char array.
   125   /// \author Balazs Dezso
   125   /// \author Balazs Dezso
   143   private:    
   143   private:    
   144     bool escaped;
   144     bool escaped;
   145   };
   145   };
   146 
   146 
   147 
   147 
   148   /// \ingroin item_io
   148   /// \ingroup item_io
   149   ///
   149   ///
   150   /// \brief Writer for standard containers.
   150   /// \brief Writer for standard containers.
   151   ///
   151   ///
   152   /// Writer for each iterable standard containers. The representation
   152   /// Writer for each iterable standard containers. The representation
   153   /// of the container is the values enumerated between an open and a
   153   /// of the container is the values enumerated between an open and a
   185       os << ')';
   185       os << ')';
   186     }
   186     }
   187 
   187 
   188   };
   188   };
   189 
   189 
   190   /// \ingroin item_io
   190   /// \ingroup item_io
   191   ///
   191   ///
   192   /// \brief Writer for standard pairs.
   192   /// \brief Writer for standard pairs.
   193   ///
   193   ///
   194   /// Writer for standard pairs. The representation of a pair is
   194   /// Writer for standard pairs. The representation of a pair is
   195   /// \code ( first_value => second_value ) \endcode.
   195   ///\code ( first_value => second_value ) \endcode.
   196   /// \author Balazs Dezso
   196   /// \author Balazs Dezso
   197   template <typename _Pair, 
   197   template <typename _Pair, 
   198 	    typename _FirstWriter = 
   198 	    typename _FirstWriter = 
   199 	    DefaultWriter<typename _Pair::first_type>,
   199 	    DefaultWriter<typename _Pair::first_type>,
   200 	    typename _SecondWriter = 
   200 	    typename _SecondWriter = 
   232       os << " )";
   232       os << " )";
   233     }
   233     }
   234 
   234 
   235   };
   235   };
   236 
   236 
   237   /// \ingroin item_io
   237   /// \ingroup item_io
   238   /// 
   238   /// 
   239   /// \brief The default item writer template class.
   239   /// \brief The default item writer template class.
   240   ///
   240   ///
   241   /// The default item writer template class. If some section writer
   241   /// The default item writer template class. If some section writer
   242   /// needs to write a value to the stream it will give the default way for it.
   242   /// needs to write a value to the stream it will give the default way for it.
   305 
   305 
   306   template <typename First, typename Second>
   306   template <typename First, typename Second>
   307   class DefaultWriter<std::pair<First, Second> > 
   307   class DefaultWriter<std::pair<First, Second> > 
   308     : public PairWriter<std::pair<First, Second> > {};
   308     : public PairWriter<std::pair<First, Second> > {};
   309 
   309 
   310   /// \ingroin item_io
   310   /// \ingroup item_io
   311   /// \brief Standard WriterTraits for the section writers.
   311   /// \brief Standard WriterTraits for the section writers.
   312   ///
   312   ///
   313   /// Standard WriterTraits for the section writers.
   313   /// Standard WriterTraits for the section writers.
   314   /// It defines standard writing method for all type of value. 
   314   /// It defines standard writing method for all type of value. 
   315   /// \author Balazs Dezso
   315   /// \author Balazs Dezso