lemon/bits/item_writer.h
changeset 1933 a876a3d6a4c7
parent 1875 98698b69a902
child 1946 17eb3eaad9f8
equal deleted inserted replaced
4:d89f83e68e7c 5:cb1f49d897a9
     1 /* -*- C++ -*-
     1 /* -*- C++ -*-
     2  * lemon/bits/item_reader.h - Part of LEMON, a generic C++ optimization library
     2  * lemon/bits/item_reader.h - Part of LEMON, a generic C++ optimization library
     3  *
     3  *
     4  * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     4  * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     5  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     5  * (Egervary Research Groin on Combinatorial Optimization, EGRES).
     6  *
     6  *
     7  * Permission to use, modify and distribute this software is granted
     7  * Permission to use, modify and distribute this software is granted
     8  * provided that this copyright notice appears in all copies. For
     8  * provided that this copyright notice appears in all copies. For
     9  * precise terms see the accompanying LICENSE file.
     9  * precise terms see the accompanying LICENSE file.
    10  *
    10  *
    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 /// \ingroup item_io
    17 /// \ingroin 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   /// \ingroup item_io
    37   /// \ingroin 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   /// \ingroup item_io
   120   /// \ingroin 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   /// \ingroup item_io
   148   /// \ingroin 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   /// \ingroup item_io
   190   /// \ingroin 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.
   232       os << " )";
   232       os << " )";
   233     }
   233     }
   234 
   234 
   235   };
   235   };
   236 
   236 
   237   /// \ingroup item_io
   237   /// \ingroin 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   /// \ingroup item_io
   310   /// \ingroin 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