| 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/TeSFSTheme.h
Go to the documentation of this file.

    00001 #ifndef __TESFSTHEME_H
    00002 #define __TESFSTHEME_H
    00003
    00004 // TerraLib
    00005 #include "TeDefines.h"
    00006 #include "TeAbstractTheme.h"
    00007
    00008 // forward declarations
    00009 class TeDatabase;
    00010 class TeDatabasePortal;
    00011
    00012
    00013 class TL_DLL TeSFSTheme : public TeAbstractTheme
    00014 {
    00015
    00016 public:
    00017
    00018            TeSFSTheme(const std::string& name = "", TeViewNode* parent = 0, int view = 0, int id = 0);
    00019
    00020            virtual ~TeSFSTheme();
    00021
    00022            void setLocalDatabase(TeDatabase* database);
    00023
    00024            void setRemoteDatabaseId(const int& remoteDbId);
    00025
    00026            void setRemoteDatabase(TeDatabase* remoteDb);
    00027
    00028            TeDatabase* getLocalDatabase();
    00029
    00030            void setThemeProjection(TeProjection* proj);
    00031
    00032            void getAttributeList(TeAttributeList& attrList);
    00033
    00035
    00036            virtual TeProjection* getThemeProjection();
    00037
    00038            virtual TeDatabasePortal* getQueryPortal(const TeBox& box, int& spatialColumnIndex, TeGeomRep& geomRep);
    00039
    00040            virtual void setSFSTableInfo(const std::string& tableName, const std::string& columnName);
    00041
    00043            virtual bool save();
    00044
    00046            virtual bool buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll,
    00047                                      vector<double>* dValuesVec = 0);
    00048
    00050            virtual bool buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec);
    00051
    00052
    00054            virtual bool saveGrouping(TeSelectedObjects selectedObjects = TeAll);
    00055
    00057            virtual bool deleteGrouping();
    00058
    00060            virtual void setLegendsForObjects();
    00061
    00063            virtual void setOwnLegendsForObjects();
    00064
    00069            virtual bool locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
    00070            virtual bool locatePolygonSet(TeCoord2D &pt, double tol, TePolygonSet &polygons);
    00071            virtual bool locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
    00072            virtual bool locatePoint(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
    00073            virtual bool locateCell(TeCoord2D &pt, TeCell &c, const double& tol = 0.0);
    00075
    00077            virtual set<string> getObjects(TeSelectedObjects selectedObjects = TeAll);
    00078
    00080            virtual set<string> getObjects(const vector<string>& itemVec);
    00081
    00083            virtual vector<string> getItemVector(TeSelectedObjects selectedObjects);
    00084
    00086            virtual vector<string> getItemVector(const set<string>& oidSet);
    00087
    00089            virtual unsigned int getNumberOfObjects();
    00090
    00092            virtual bool saveMetadata(TeDatabase*);
    00093
    00095            virtual bool loadMetadata(TeDatabase*);
    00096
    00097            static bool createSFSThemeTable(TeDatabase* sourceDB);
    00098
    00099            bool getRemoteThemeInfo(int& databaseId, std::string& tableName, std::string& columnName, int& geomRep, int& projId);
    00100
    00101 protected:
    00102
    00104            virtual bool eraseMetadata(TeDatabase*);
    00105
    00106 protected:
    00107
    00108            std::string                                 _tableName;
    00109            std::string                                 _columnName;
    00110            TeDatabase*                                 _localDB;
    00111            TeDatabase*                                 _remoteDb;
    00112            int                                                    _remoteDbId;
    00113            TeProjection*                    _projection;
    00114            TeAttributeList                  _attrList;
    00115            TeAttributeList                  _originalAttrList;
    00116
    00117 };
    00118
    00120 class TL_DLL TeSFSThemeFactory : public TeViewNodeFactory
    00121 {
    00122
    00123 public:
    00124
    00126            TeSFSThemeFactory() : TeViewNodeFactory((int)TeSFSTHEME)
    00127            {}
    00128
    00130            TeViewNode* build(TeViewNodeParams* params)
    00131            {
    00132                       TeViewNodeParams auxParams = *params;
    00133                       return new TeSFSTheme(auxParams.name_, auxParams.myParent_, auxParams.viewId_, auxParams.id_);
    00134            }
    00135
    00136            TeViewNode* build()
    00137            {
    00138                       return new TeSFSTheme();
    00139            }
    00140 };
    00141
    00142 namespace
    00143 {
    00144   static TeSFSThemeFactory sfsThemeFactory;
    00145 };
    00146
    00147 #endif //__TESFSTHEME_H

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines