| 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/TeMultiGeometry.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_MULTIGEOMETRY_H
    00028 #define  __TERRALIB_MULTIGEOMETRY_H
    00029
    00030 #include "TeGeometry.h"
    00031
    00032
    00033 class TL_DLL TeMultiGeometry
    00034 {
    00035
    00036 public:
    00037            TePolygonSet                     polygons_;
    00038            TeLineSet                        lines_;
    00039            TePointSet                       points_;
    00040            TeCellSet                        cells_;
    00041            TeTextSet                        texts_;
    00042
    00044            TeMultiGeometry() {};
    00045
    00047            TeMultiGeometry(const TeMultiGeometry& other);
    00048
    00050            TeMultiGeometry& operator= (const TeMultiGeometry& other);
    00051
    00053            bool getGeometry(TePolygonSet& result) const;
    00054
    00056            bool getGeometry(TeLineSet& result) const;
    00057
    00059            bool getGeometry(TePointSet& result) const;
    00060
    00062            bool getGeometry(TeCellSet& result) const;
    00063
    00065            bool getGeometry(TeTextSet& result) const;
    00066
    00068            TePolygonSet&  getPolygons()
    00069            {          return polygons_; }
    00070
    00072            TeLineSet&  getLines()
    00073            {          return lines_; }
    00074
    00076            TePointSet&  getPoints()
    00077            {          return points_; }
    00078
    00080            TeCellSet&  getCells()
    00081            {          return cells_; }
    00082
    00084            TeTextSet&  getTexts()
    00085            {          return texts_; }
    00086
    00088            bool getGeometry(vector<TeGeometry*>& result);
    00089
    00091            void setGeometry(const TePolygonSet& result);
    00092
    00094            void setGeometry(const TeLineSet& result);
    00095
    00097            void setGeometry(const TePointSet& result);
    00098
    00100            void setGeometry(const TeCellSet& result);
    00101
    00103            void setGeometry(const TeTextSet& result);
    00104
    00106            void setGeometry(vector<TeGeometry*>& result);
    00107
    00109            void addGeometry(const TePolygon& poly);
    00110
    00112            void addGeometry(const TeLine2D& line);
    00113
    00115            void addGeometry(const TePoint& point);
    00116
    00118            void addGeometry(const TeCell& cell);
    00119
    00121            void addGeometry(const TeText& text);
    00122
    00124            bool hasPolygons()    const
    00125            { return (!polygons_.empty()); }
    00126
    00128            bool hasLines() const
    00129            { return (!lines_.empty()); }
    00130
    00132            bool hasPoints() const
    00133            { return (!points_.empty()); }
    00134
    00136            bool hasCells()       const
    00137            { return (!cells_.empty()); }
    00138
    00140            bool hasTexts()       const
    00141            { return (!texts_.empty()); }
    00142
    00144            bool empty()
    00145            {
    00146                       return ( polygons_.empty() &&  lines_.empty() &&
    00147                                              points_.empty()   &&  cells_.empty() &&  texts_.empty());
    00148            }
    00149
    00151            void clear();
    00152
    00154            TeBox getBox();
    00155
    00157            TeBox box()
    00158            { return this->getBox(); }
    00159 };
    00160
    00161 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines