| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeQuerierDBStr3.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00027 #ifndef  __TERRALIB_INTERNAL_QUERIER_DBSTR3_H
    00028 #define  __TERRALIB_INTERNAL_QUERIER_DBSTR3_H
    00029
    00030 #include "TeQuerierDB.h"
    00031 #include "TeTemporalSeries.h"
    00032
    00047 class TL_DLL TeQuerierDBStr3: public TeQuerierDB
    00048 {
    00049 private:
    00050            int                                         timeFramePortal_;     // the time frame appointed by the portal
    00051            TeTSEntry             TSEntry_;
    00052            TeGeomRep             rep_;
    00053
    00054            string                                                            fromClause_;   //store the sql clause(from and where) to return the number of instances
    00055            string                                                            whereClause_;
    00056
    00057            /* @name Internal functions to initialize portals */
    00059            bool initPortal(TeTSEntry* ent=0);
    00061
    00063            bool fillSTO(TeSTInstance& sto);
    00064
    00065 public:
    00067            TeQuerierDBStr3(TeQuerierParams* params):
    00068                       TeQuerierDB(params),
    00069                       timeFramePortal_(-1),
    00070                       fromClause_(""),
    00071                       whereClause_("")
    00072            {}
    00073
    00075            bool loadInstances(TeTSEntry* ent=0);
    00076
    00078            bool fetchInstance(TeSTInstance&  sto);
    00079
    00081            int  numElemInstances();
    00082 };
    00083
    00090 class TL_DLL TeQuerierDBStr3Factory : public TeQuerierImplFactory
    00091 {
    00092 public:
    00093
    00095            TeQuerierDBStr3Factory(const string& name) : TeQuerierImplFactory(name) {}
    00096
    00098            virtual TeQuerierImpl* build (const TeQuerierParams& arg)
    00099            {
    00100                       TeQuerierParams* tempArg = new TeQuerierParams();
    00101                       *tempArg = arg;
    00102                       return new TeQuerierDBStr3(tempArg);
    00103            }
    00104 };
    00105
    00107 namespace
    00108 {
    00109   static TeQuerierDBStr3Factory querierDBStr3("querierDBStr3");
    00110 };
    00111
    00112 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines