1 : /******************************************************************************
2 : * $Id: vfkreaderp.h 18483 2010-01-08 23:59:26Z mloskot $
3 : *
4 : * Project: VFK Reader
5 : * Purpose: Private Declarations for OGR free VFK Reader code.
6 : * Author: Martin Landa, landa.martin gmail.com
7 : *
8 : ******************************************************************************
9 : * Copyright (c) 2009-2010, Martin Landa <landa.martin gmail.com>
10 : *
11 : * Permission is hereby granted, free of charge, to any person
12 : * obtaining a copy of this software and associated documentation
13 : * files (the "Software"), to deal in the Software without
14 : * restriction, including without limitation the rights to use, copy,
15 : * modify, merge, publish, distribute, sublicense, and/or sell copies
16 : * of the Software, and to permit persons to whom the Software is
17 : * furnished to do so, subject to the following conditions:
18 : *
19 : * The above copyright notice and this permission notice shall be
20 : * included in all copies or substantial portions of the Software.
21 : *
22 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 : * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 : * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 : * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26 : * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 : * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 : * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 : * SOFTWARE.
30 : ****************************************************************************/
31 :
32 : #ifndef GDAL_OGR_VFK_VFKREADERP_H_INCLUDED
33 : #define GDAL_OGR_VFK_VFKREADERP_H_INCLUDED
34 :
35 : #include <map>
36 : #include <string>
37 :
38 : #include "vfkreader.h"
39 : #include "ogr_api.h"
40 :
41 : class VFKReader;
42 :
43 : /************************************************************************/
44 : /* VFKReader */
45 : /************************************************************************/
46 : class VFKReader:public IVFKReader
47 : {
48 : private:
49 : char *m_pszFilename;
50 :
51 : /* data buffer */
52 : char *m_pszWholeText;
53 :
54 : /* data blocks */
55 : int m_nDataBlockCount;
56 : VFKDataBlock **m_papoDataBlock;
57 :
58 : /* metadata */
59 : std::map<std::string, std::string> poInfo;
60 :
61 : int AddDataBlock(VFKDataBlock *);
62 : void AddInfo(const char *);
63 :
64 : public:
65 : VFKReader();
66 : virtual ~VFKReader();
67 :
68 : void SetSourceFile(const char *);
69 :
70 : int LoadData();
71 : int LoadDataBlocks();
72 : long LoadGeometry();
73 :
74 63 : int GetDataBlockCount() const { return m_nDataBlockCount; }
75 : VFKDataBlock *GetDataBlock(int) const;
76 : VFKDataBlock *GetDataBlock(const char *) const;
77 :
78 : const char *GetInfo(const char *);
79 : };
80 :
81 : #endif // GDAL_OGR_VFK_VFKREADERP_H_INCLUDED
|