OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGpkgSpatialRefSysRecord.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // File: ossimGpkgSpatialRefSysRecord.h
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 // Description: Container class for gpkg_spatial_ref_sys table.
10 //
11 //----------------------------------------------------------------------------
12 // $Id$
13 
14 #ifndef ossimGpkgSpatialRefSysRecord_HEADER
15 #define ossimGpkgSpatialRefSysRecord_HEADER 1
16 
19 
20 class ossimMapProjection;
21 struct sqlite3;
22 
24 {
25 public:
26 
27  enum InitCode
28  {
29  ERROR = -1, // Something bad...
30  OK_EXISTS = 0, // Initialized and entry exist in database.
31  OK = 1 // Initialized but not in database yet.
32  };
33 
36 
37  /* @brief copy constructor */
39 
40  /* @brief assignment operator= */
42 
45 
50  static const std::string& getTableName();
51 
57  virtual bool init( sqlite3_stmt* pStmt );
58 
66  InitCode init( sqlite3* db, const ossimMapProjection* proj );
67 
73  static bool createTable( sqlite3* db );
74 
80  bool insert( sqlite3* db );
81 
87  virtual void saveState( ossimKeywordlist& kwl, const std::string& prefix ) const;
88 
94  ossim_int32 getSrsId( sqlite3* db );
95 
101  ossim_int32 getNextSrsId( sqlite3* db );
102 
103  std::string m_srs_name;
105  std::string m_organization;
107  std::string m_definition;
108  std::string m_description;
109 };
110 
111 #endif /* #ifndef ossimGpkgSpatialRefSysRecord_HEADER */
bool insert(sqlite3 *db)
Inserst this record into gpkg_contents table.
static const std::string & getTableName()
Get the table name "gpkg_spatial_ref_sys".
Represents serializable keyword/value map.
const ossimGpkgSpatialRefSysRecord & operator=(const ossimGpkgSpatialRefSysRecord &obj)
static bool createTable(sqlite3 *db)
Creates gpkg_contents table in database.
ossimGpkgSpatialRefSysRecord()
default constructor
virtual void saveState(ossimKeywordlist &kwl, const std::string &prefix) const
Saves the state of object.
ossim_int32 getSrsId(sqlite3 *db)
Looks in database for matching record and returns the id if found.
ossim_int32 getNextSrsId(sqlite3 *db)
Looks in database for matching record and returns the id if found.
virtual bool init(sqlite3_stmt *pStmt)
Initialize from database.
int ossim_int32