OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimSqliteInfoFactory.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: LGPL
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: David Burken
8 //
9 // Description: Factory for SQLite info objects.
10 //
11 //----------------------------------------------------------------------------
12 // $Id$
13 
14 #include "ossimSqliteInfoFactory.h"
18 #include <ossim/base/ossimRefPtr.h>
19 #include "ossimGpkgInfo.h"
20 
22 {}
23 
25 {
26  static ossimSqliteInfoFactory sharedInstance;
27 
28  return &sharedInstance;
29 }
30 
31 std::shared_ptr<ossimInfoBase> ossimSqliteInfoFactory::create(const ossimFilename& file) const
32 {
33  std::shared_ptr<ossimInfoBase> result = 0;
34 
35  std::string ext = file.ext().downcase().string();
36  if ( ext == "gpkg" )
37  {
38  result = std::make_shared<ossimGpkgInfo>();
39  if(result->open(file) == false)
40  {
41  result.reset();
42  }
43  }
44 
45  return result;
46 }
47 
48 std::shared_ptr<ossimInfoBase> ossimSqliteInfoFactory::create(std::shared_ptr<ossim::istream>& str,
49  const std::string& connectionString)const
50 {
51  std::shared_ptr<ossimInfoBase> result;
52 
53 
54 
55  return result;
56 }
57 
59 {}
60 
62 {}
63 
65  const ossimSqliteInfoFactory& /* rhs */)
66 {
67  return *this;
68 }
69 
virtual std::shared_ptr< ossimInfoBase > create(const ossimFilename &file) const
create method.
static ossimSqliteInfoFactory * instance()
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
const ossimSqliteInfoFactory & operator=(const ossimSqliteInfoFactory &rhs)
hidden from use operator =
ossimString ext() const
virtual ~ossimSqliteInfoFactory()
virtual destructor
ossimSqliteInfoFactory()
hidden from use default constructor
const std::string & string() const
Definition: ossimString.h:414