Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

xst_iterator_writer.h

Go to the documentation of this file.
00001 
00002 // Common Text Transformation Library
00003 // Copyright (C) 1997-2006 by Igor Kholodov. 
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the
00017 // Free Software Foundation, Inc.,
00018 // 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 // mailto:cttl@users.sourceforge.net
00021 // http://sourceforge.net/projects/cttl/
00023 
00034 // xst_iterator_writer.h
00035 
00036 #ifndef _XST_ITERATOR_WRITER_H_INCLUDED_
00037 #define _XST_ITERATOR_WRITER_H_INCLUDED_
00038 
00039 namespace cttl_impl {
00040 
00049 template< typename OutputIteratorT >
00050 class xst_iterator_writer
00051 {
00052 private:
00054     OutputIteratorT& m_iterator;
00055 
00056 public:
00058     xst_iterator_writer( OutputIteratorT& iterator_ )
00059         :
00060     m_iterator( iterator_ )
00061     {
00062     }
00063 
00065     void operator=( xst_iterator_writer< OutputIteratorT > const& ) const
00066     {
00067     }
00068 
00075     template< typename TerminalT >
00076     void operator() ( TerminalT const& terminal_ )
00077     {
00078         *m_iterator = terminal_.top( const_scalar( 0 ) );
00079         ++m_iterator;
00080     }
00081 
00082 }; // struct xst_iterator_writer
00083 
00084 }   // namespace cttl_impl
00085 
00086 #endif // _XST_ITERATOR_WRITER_H_INCLUDED_

Generated on Thu Nov 2 17:48:23 2006 for CTTL Lambda Expression by  doxygen 1.3.9.1