~ubuntu-branches/ubuntu/trusty/mapnik/trusty-proposed

« back to all changes in this revision

Viewing changes to plugins/input/ogr/ogr_feature_ptr.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-08-27 00:28:37 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827002837-ztqzfg2rmclfh4i9
Tags: 0.6.1-0ubuntu1
* New upstream release.
* Change usr/lib to usr/lib* to enable build on 64 bits systems due to new
  configuration in SConstruct in :
  - debian/libmapnik-dev.install
  - debian/libmapnik0.6.install
  - debian/mapnik-plugin-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * 
 
3
 * This file is part of Mapnik (c++ mapping toolkit)
 
4
 *
 
5
 * Copyright (C) 2007 Artem Pavlenko
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Lesser General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2.1 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
 * Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public
 
18
 * License along with this library; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
20
 *
 
21
 *****************************************************************************/
 
22
//$Id$
 
23
 
 
24
#ifndef OGR_FEATURE_PTR_HPP
 
25
#define OGR_FEATURE_PTR_HPP
 
26
 
 
27
// ogr
 
28
#include <ogrsf_frmts.h>
 
29
  
 
30
class ogr_feature_ptr
 
31
{
 
32
public:
 
33
    ogr_feature_ptr (OGRFeature* const feat)
 
34
        : feat_ (feat)
 
35
    {
 
36
    }
 
37
    
 
38
    ~ogr_feature_ptr ()
 
39
    {
 
40
        if (feat_ != NULL)
 
41
            OGRFeature::DestroyFeature (feat_);
 
42
    }
 
43
 
 
44
    OGRFeature* operator*()
 
45
    {
 
46
        return feat_;
 
47
    }
 
48
 
 
49
private:
 
50
    OGRFeature* feat_;
 
51
};
 
52
 
 
53
#endif // OGR_FEATURE_PTR_HPP
 
54