TerraLib 4.1
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeQuerierParams.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_PARAMS_H
00028 #define  __TERRALIB_INTERNAL_QUERIER_PARAMS_H
00029 
00030 #include "TeTheme.h"
00031 
00043 class TL_DLL TeQuerierParams
00044 {
00045 protected: 
00046            bool                                                   loadGeometries_;                 
00047            bool                                                   loadAllAttributes_;              
00048            vector<string>                              loadAttrNames_;                             
00049            vector<string>                              loadAttrNamesSeted_;  
00050            TeGroupingAttr                              groupingAttr_;                              
00051            
00052            bool                                                   themeFlag_;                      
00053            TeTheme*                                    theme_;                          
00054            TeLayer*                                    layer_;                          
00055            
00056            string                                                 fileName_;            
00057            TeBox                                                  box_;                            
00058 
00059            TeChronon                                   chr_;                 
00060            string                                                 objId_;               
00061            
00062            //TeStatisticType                tsOper_;              //operator used in the construction of temporal series
00063            
00064            string                                                 strategy_;            
00065 
00066            TeSelectedObjects                selectedObjs_;  
00067            
00068            int                                                               spatialRelation_;     
00069            bool                                                   hasSpatialRes_;                  
00070            TeBox                                                  boxRest_;                        
00071            TeGeometry*                                            geomRest_;                       
00072            TeGeomRep                                   geomRepRest_;                    
00073 
00074 public:
00076            TeQuerierParams(bool loadGeom = false, bool loadAllAttr = true): 
00077                                  loadGeometries_(loadGeom),
00078                                  loadAllAttributes_(loadAllAttr),
00079                                  themeFlag_(false),
00080                                  theme_ (0),
00081                                  layer_ (0),
00082                                  fileName_(""),
00083                                  box_(TeBox()),
00084                                  chr_ (TeNOCHRONON),
00085                                  objId_(""),
00086                                  selectedObjs_(TeAll),
00087                                  spatialRelation_(0),
00088                                  hasSpatialRes_(false),
00089                                  geomRest_(0)
00090                                  { }
00091 
00093            TeQuerierParams(bool loadGeom, const vector<string>& loadAttr): 
00094                                  loadGeometries_(loadGeom),
00095                                  loadAllAttributes_(false),
00096                                  themeFlag_(false),
00097                                  theme_ (0),
00098                                  layer_ (0),
00099                                  fileName_(""),
00100                                  box_(TeBox()),
00101                                  chr_ (TeNOCHRONON),
00102                                  objId_(""),
00103                                  selectedObjs_(TeAll),
00104                                  spatialRelation_(0),
00105                                  hasSpatialRes_(false),
00106                                  geomRest_(0)
00107                                  {
00108                                             loadAttrNamesSeted_.clear();
00109                                             loadAttrNamesSeted_ = loadAttr;
00110                                  }
00111 
00112 
00114            TeQuerierParams(bool loadGeom, TeGroupingAttr& groupAttr): 
00115                                  loadGeometries_(loadGeom),
00116                                  loadAllAttributes_(false),
00117                                  themeFlag_(false),
00118                                  theme_ (0),
00119                                  layer_ (0),
00120                                  fileName_(""),
00121                                  box_(TeBox()),
00122                                  chr_ (TeNOCHRONON),
00123                                  objId_(""),
00124                                  selectedObjs_(TeAll),
00125                                  spatialRelation_(0),
00126                                  hasSpatialRes_(false),
00127                                  geomRest_(0)
00128                                  {
00129                                             groupingAttr_.clear();
00130                                             groupingAttr_ = groupAttr;
00131                                  }
00132            
00134            virtual ~TeQuerierParams();
00135 
00137            TeQuerierParams(const TeQuerierParams& qp);
00138 
00140            virtual TeQuerierParams& operator=(const TeQuerierParams& rhs);
00141 
00143            virtual void setParams(TeLayer* layer);
00144 
00146            virtual void setParams(TeTheme* theme, TeChronon chr=TeNOCHRONON); 
00147 
00149            virtual void setParams(TeTheme* theme, const string& objId, TeChronon chr=TeNOCHRONON);
00150 
00152            virtual void setParams(const string& fileName, TeChronon chr=TeNOCHRONON);
00153            
00155            virtual void setFillParams(bool loadGeom, bool loadAllAttr, vector<string> loadAttr = vector<string>());
00156 
00158            virtual void setFillParams(bool loadGeom, TeGroupingAttr attrG);
00159            
00161            virtual void setSpatialRest(TeBox& box, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
00162 
00164            virtual void setSpatialRest(TeGeometry* geom, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
00165 
00167            virtual void setSelecetObjs(TeSelectedObjects so) { selectedObjs_ = so; }
00168 
00170            virtual void setLoadAttrs(const vector<string>& vec) { loadAttrNames_ = vec; }
00171 
00173            virtual string decName() const { return strategy_; }
00174 
00176            virtual TeTheme* theme() { return theme_; }
00177 
00179            virtual TeLayer* layer() { return layer_; }
00180 
00182            virtual string fileName() { return fileName_; }
00183 
00185            virtual TeBox& box();
00186 
00188            virtual void box(TeBox& b) { box_ = b; }
00189 
00191            virtual TeChronon chronon()      { return chr_; }
00192            
00194            virtual string objId() { return objId_; }
00195            
00197            virtual TeGroupingAttr& groupAttr() { return groupingAttr_;}
00198 
00200            virtual bool loadGeom ()  { return          loadGeometries_; }
00201            
00203            virtual bool loadAllAttr() { return loadAllAttributes_;}
00204 
00206            virtual vector<string>& loadAttrs() { return loadAttrNames_;}
00207 
00209            virtual vector<string>& loadSetedAttrs() { return loadAttrNamesSeted_;}
00210 
00212            virtual TeSelectedObjects selectedObjs() { return selectedObjs_; }
00213            
00215            virtual int spatialRelation() { return spatialRelation_; }
00216 
00218            virtual bool hasSpatialRes() { return hasSpatialRes_;}
00219            
00221            virtual TeBox boxRest() { return boxRest_; } 
00222 
00224            virtual TeGeometry* geomRest() { return geomRest_; }
00225 
00227            virtual TeGeomRep  geomRepRest() { return geomRepRest_; }
00228 
00230            virtual void clear();
00231 };
00232 
00233 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines