All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ReaderFactory.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/xml/ReaderFactory.cpp
22 
23  \brief This is the abstract factory for XML readers.
24 */
25 
26 // TerraLib
27 #include "../common/StringUtils.h"
28 #include "ReaderFactory.h"
29 
31 
33 {
35 }
36 
37 te::xml::Reader* te::xml::ReaderFactory::make(const std::string& readerType)
38 {
39  std::string uType = te::common::Convert2UCase(readerType);
41 }
42 
43 void te::xml::ReaderFactory::setDefaultReader(const std::string& readerType)
44 {
45  std::string uType = te::common::Convert2UCase(readerType);
46  sm_defaultReaderType = uType;
47 }
48 
49 te::xml::ReaderFactory::ReaderFactory(const std::string& factoryKey)
50  : te::common::AbstractFactory<te::xml::Reader, std::string>(factoryKey)
51 {
52 }
53 
This class models a XML reader object.
Definition: Reader.h:55
static void setDefaultReader(const std::string &readerType)
It sets the default driver used to create the XML reader objects.
std::string Convert2UCase(const std::string &value)
It converts a string to upper case.
Definition: StringUtils.h:163
static te::xml::Reader * make()
It creates a new XML reader using the dafault implementation.
ReaderFactory(const std::string &factoryKey)
It creates the factory.
static TPRODUCT * make(const TFACTORYKEY &factoryKey)
It creates an object with the appropriated factory.
This is the abstract factory for XML readers.
#define TE_XML_DEFAULT_READER_TYPE
The default implementation to be used when creating a XML reader.
Definition: Config.h:44
static std::string sm_defaultReaderType
The type of the reader to be created if no type is informed.