| 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/TeProject.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_PROJECT_H
    00027 #define  __TERRALIB_INTERNAL_PROJECT_H
    00028
    00029 #include "TeDefines.h"
    00030 #include <string>
    00031 #include <vector>
    00032 #include <map>
    00033
    00034 class TeDatabase;
    00035 class TeProjection;
    00036 class TeView;
    00037
    00038 using std::vector;
    00039 using std::string;
    00040 using std::map;
    00041
    00043 typedef vector<int> TeViewVector;
    00044
    00046 typedef vector<string> TeViewNameVector;
    00047
    00049 typedef vector<int> TeProjectIdVector;
    00050
    00056 class TL_DLL TeProject
    00057 {
    00058 public:
    00059
    00061            TeProject();
    00062
    00064            TeProject(int id, TeDatabase* db);
    00065
    00067            TeProject(const string& name, TeDatabase* db);
    00068
    00070            TeProject(const TeProject& other);
    00071
    00073            TeProject& operator= (const TeProject& other);
    00074
    00076            virtual ~TeProject();
    00077
    00079            virtual void setId(int id)
    00080            {id_ = id;}
    00081
    00083            virtual int id()
    00084            { return id_; }
    00085
    00087            virtual void setName(const string& name)
    00088            {name_ = name;}
    00089
    00091            virtual string name()
    00092            { return name_; }
    00093
    00095            virtual string description()
    00096            { return description_; }
    00097
    00099            virtual void setDescription(const string& desc)
    00100            { description_ = desc ; }
    00101
    00103            virtual void setDatabase(TeDatabase* db)
    00104            { db_ = db; }
    00105
    00107            virtual TeDatabase* getDatabase()
    00108            { return db_; }
    00109
    00111            virtual bool isProjectView(int viewId);
    00112
    00114            virtual bool hasCurrentView();
    00115
    00117            virtual void setCurrentViewId(int viewId);
    00118
    00120            virtual int getCurrentViewId();
    00121
    00123            virtual void setCurrentViewIndex(int index)
    00124            { currentViewIndex_ = index; }
    00125
    00127            virtual int getCurrentViewIndex()
    00128            { return currentViewIndex_; }
    00129
    00131            const TeViewVector& getViewVector() const
    00132            {          return views_; }
    00133
    00135            virtual TeViewNameVector getViewNameVector();
    00136
    00138            virtual int getViewId(int index);
    00139
    00141            /*
    00142                       \param name view name
    00143                       \param projection view projection. If null uses as default LatLong/SAD69
    00144                       \return the id of the new view
    00145            */
    00146            virtual int insertView(string name, TeProjection* projection = NULL);
    00147
    00149            /*
    00150            \param view The view object
    00151            \return the id of the new view
    00152            */
    00153            virtual int insertViewRel(int viewId);
    00154
    00156            virtual int addView(int viewId);
    00157
    00159            virtual void deleteView(int viewId, const bool& removeFromDatabase = true);
    00160
    00162            virtual void clearViews();
    00163
    00164 private:
    00165            int id_;
    00166            string name_;
    00167            string description_;
    00168            TeViewVector views_;
    00169            int currentViewIndex_;
    00170            TeDatabase* db_;
    00171 };
    00172
    00174 typedef map<int, TeProject*>  TeProjectMap;
    00175
    00176 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines