| 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/TeBlockLoader.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 *************************************************************************************/
    00026 #ifndef  __TERRALIB_INTERNAL_BLOCKLOADER_H
    00027 #define  __TERRALIB_INTERNAL_BLOCKLOADER_H
    00028
    00029 /*
    00030 ** ----------------------------------------------------------------------------
    00031 ** Includes:
    00032 */
    00033 #include "TeDatabase.h"
    00034 #include "TeBox.h"
    00035 #include "TeTime.h"
    00036 #include <string>
    00037 #include <vector>
    00038
    00039 /*
    00040 ** ----------------------------------------------------------------------------
    00041 ** Definitions:
    00042 */
    00043
    00044 typedef struct
    00045 {
    00046     TeDatabase* db;
    00047
    00048     std::string table_name;
    00049     TeBox selection_box;
    00050
    00051     bool load_all_attrs;
    00052            std::vector<std::string> attrs;
    00053     std::string attrs_rest;
    00054
    00055     std::set<int> dont_load_ids;
    00056
    00057 } TeBlockLoaderParams;
    00058
    00059 class TL_DLL TeBlockLoader
    00060 {
    00061 public:
    00062
    00064            TeBlockLoader(const TeBlockLoaderParams& params);
    00065
    00067     virtual ~TeBlockLoader();
    00068
    00069            bool loadBlocks();
    00070
    00071            bool fetchNext();
    00072
    00073     int getID();
    00074            void getSpatialData(unsigned char* &data, long& size);
    00075
    00076     char* getData(const std::string& name);
    00077     int getInt(const std::string& name);
    00078     double getDouble(const std::string& name);
    00079     bool getBool(const std::string& name);
    00080     TeTime getDate(const std::string& name);
    00081     std::string getDateAsString(const std::string& name);
    00082
    00083 protected:
    00084
    00085     TeBlockLoaderParams params_;
    00086     TeDatabasePortal* portal_;
    00087
    00088 };
    00089
    00090 #endif // __TERRALIB_INTERNAL_BLOCKLOADER_H
    00091
    00092 /*
    00093 ** ----------------------------------------------------------------------------
    00094 ** End:
    00095 */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines