~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: ogrvrtdatasource.cpp 17506 2009-08-02 17:09:10Z rouault $
 
2
 * $Id: ogrvrtdatasource.cpp 23575 2011-12-14 20:24:08Z rouault $
3
3
 *
4
4
 * Project:  OpenGIS Simple Features Reference Implementation
5
5
 * Purpose:  Implements OGRVRTDataSource class.
31
31
#include "cpl_conv.h"
32
32
#include "cpl_string.h"
33
33
 
34
 
CPL_CVSID("$Id: ogrvrtdatasource.cpp 17506 2009-08-02 17:09:10Z rouault $");
 
34
CPL_CVSID("$Id: ogrvrtdatasource.cpp 23575 2011-12-14 20:24:08Z rouault $");
 
35
 
35
36
/************************************************************************/
36
37
/*                          OGRVRTDataSource()                          */
37
38
/************************************************************************/
42
43
    pszName = NULL;
43
44
    papoLayers = NULL;
44
45
    nLayers = 0;
 
46
    psTree = NULL;
 
47
    nCallLevel = 0;
45
48
}
46
49
 
47
50
/************************************************************************/
59
62
        delete papoLayers[i];
60
63
    
61
64
    CPLFree( papoLayers );
 
65
 
 
66
    if( psTree != NULL)
 
67
        CPLDestroyXMLNode( psTree );
62
68
}
63
69
 
64
70
/************************************************************************/
71
77
{
72
78
    CPLAssert( nLayers == 0 );
73
79
 
 
80
    this->psTree = psTree;
 
81
 
74
82
/* -------------------------------------------------------------------- */
75
83
/*      Set name, and capture the directory path so we can use it       */
76
84
/*      for relative datasources.                                       */
95
103
/* -------------------------------------------------------------------- */
96
104
        OGRVRTLayer  *poLayer;
97
105
        
98
 
        poLayer = new OGRVRTLayer();
 
106
        poLayer = new OGRVRTLayer(this);
99
107
        
100
 
        if( !poLayer->Initialize( psLTree, pszVRTDirectory, bUpdate ) )
 
108
        if( !poLayer->FastInitialize( psLTree, pszVRTDirectory, bUpdate ) )
101
109
        {
102
110
            CPLFree( pszVRTDirectory );
103
111
            delete poLayer;
138
146
    else
139
147
        return papoLayers[iLayer];
140
148
}
 
149
 
 
150
/************************************************************************/
 
151
/*                         AddForbiddenNames()                          */
 
152
/************************************************************************/
 
153
 
 
154
void OGRVRTDataSource::AddForbiddenNames(const char* pszOtherDSName)
 
155
{
 
156
    aosOtherDSNameSet.insert(pszOtherDSName);
 
157
}
 
158
 
 
159
/************************************************************************/
 
160
/*                         IsInForbiddenNames()                         */
 
161
/************************************************************************/
 
162
 
 
163
int OGRVRTDataSource::IsInForbiddenNames(const char* pszOtherDSName)
 
164
{
 
165
    return aosOtherDSNameSet.find(pszOtherDSName) != aosOtherDSNameSet.end();
 
166
}