~ubuntu-branches/ubuntu/saucy/libwpd/saucy

« back to all changes in this revision

Viewing changes to src/lib/WPXPropertyListVector.cpp

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2013-04-19 00:47:04 UTC
  • mfrom: (11.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130419004704-j04jp8dan8plg630
Tags: 0.9.7-2
upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
2
/* libwpd
 
3
 * Version: MPL 2.0 / LGPLv2.1+
 
4
 *
 
5
 * This Source Code Form is subject to the terms of the Mozilla Public
 
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
8
 *
 
9
 * Major Contributor(s):
3
10
 * Copyright (C) 2005 William Lachance (wrlach@gmail.com)
4
11
 * Copyright (C) 2005 Net Integration Technologies, Inc. (http://www.net-itech.com)
5
12
 * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6
13
 *
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Library General Public
9
 
 * License as published by the Free Software Foundation; either
10
 
 * version 2 of the License, or (at your option) any later version.
11
 
 *
12
 
 * This library is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
 * Library General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU Library General Public
18
 
 * License along with this library; if not, write to the Free Software
19
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
14
 * For minor contributions see the git repository.
 
15
 *
 
16
 * Alternatively, the contents of this file may be used under the terms
 
17
 * of the GNU Lesser General Public License Version 2.1 or later
 
18
 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
 
19
 * applicable instead of those above.
20
20
 *
21
21
 * For further information visit http://libwpd.sourceforge.net
22
22
 */
53
53
class WPXPropertyListVectorIterImpl
54
54
{
55
55
public:
56
 
        WPXPropertyListVectorIterImpl(std::vector<WPXPropertyList> * vect) :
 
56
        WPXPropertyListVectorIterImpl(std::vector<WPXPropertyList> *vect) :
57
57
                m_vector(vect),
58
58
                m_iter(m_vector->begin()),
59
59
                m_imaginaryFirst(false) {}
66
66
        bool next()
67
67
        {
68
68
                if (!m_imaginaryFirst && m_iter != m_vector->end())
69
 
                        m_iter++;
 
69
                        ++m_iter;
70
70
                m_imaginaryFirst = false;
71
 
                if (m_iter != m_vector->end())
72
 
                        return true;
73
 
                return false;
 
71
                return (m_iter != m_vector->end());
74
72
        }
75
73
        bool last()
76
74
        {
77
 
                if (m_iter == m_vector->end())
78
 
                        return true;
79
 
                return false;
 
75
                return (m_iter == m_vector->end());
80
76
        }
81
77
        const WPXPropertyList &operator()() const
82
78
        {
86
82
private:
87
83
        WPXPropertyListVectorIterImpl(const WPXPropertyListVectorIterImpl &);
88
84
        WPXPropertyListVectorIterImpl &operator=(const WPXPropertyListVectorIterImpl &);
89
 
        std::vector<WPXPropertyList> * m_vector;
 
85
        std::vector<WPXPropertyList> *m_vector;
90
86
        std::vector<WPXPropertyList>::iterator m_iter;
91
87
        bool m_imaginaryFirst;
92
88
};