OpenWalnut 1.2.5

WGrid.h

00001 //---------------------------------------------------------------------------
00002 //
00003 // Project: OpenWalnut ( http://www.openwalnut.org )
00004 //
00005 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
00006 // For more information see http://www.openwalnut.org/copying
00007 //
00008 // This file is part of OpenWalnut.
00009 //
00010 // OpenWalnut is free software: you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as published by
00012 // the Free Software Foundation, either version 3 of the License, or
00013 // (at your option) any later version.
00014 //
00015 // OpenWalnut is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 // GNU Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public License
00021 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
00022 //
00023 //---------------------------------------------------------------------------
00024 
00025 #ifndef WGRID_H
00026 #define WGRID_H
00027 
00028 #include <cstddef>
00029 
00030 #include "../common/WBoundingBox.h"
00031 #include "WExportDataHandler.h"
00032 
00033 // forward declarations
00034 class WProperties;
00035 
00036 /**
00037  * Base class to all grid types, e.g. a regular grid.
00038  * \ingroup dataHandler
00039  */
00040 class OWDATAHANDLER_EXPORT WGrid // NOLINT
00041 {
00042 public:
00043     /**
00044      * Constructs a new WGrid instance.
00045      * \param size number of positions in grid
00046      */
00047     explicit WGrid( size_t size );
00048 
00049     /**
00050      * Since WGrid is a base class and thus should be polymorphic we add
00051      * virtual destructor.
00052      */
00053     virtual ~WGrid();
00054 
00055     /**
00056      * The number of positions in this grid.
00057      *
00058      * \return \copybrief WGrid::size()
00059      */
00060     size_t size() const;
00061 
00062     /**
00063      * Axis aligned Bounding Box that encloses this grid.
00064      *
00065      * \return \copybrief WGrid::getBoundingBox()
00066      */
00067     virtual WBoundingBox getBoundingBox() const = 0;
00068 
00069     /**
00070      * Returns a pointer to the information properties object of the grid. The grid intends these properties to not be modified.
00071      *
00072      * \return the properties.
00073      */
00074     boost::shared_ptr< WProperties > getInformationProperties() const;
00075 
00076 protected:
00077     /**
00078      * The property object for the grid containing only props whose purpose is "PV_PURPOSE_INFORMNATION". It is useful to define some property
00079      * to only be of informational nature. The GUI does not modify them.
00080      */
00081     boost::shared_ptr< WProperties > m_infoProperties;
00082 
00083 private:
00084     /**
00085      * Stores the number of positions.
00086      */
00087     size_t m_size;
00088 };
00089 
00090 #endif  // WGRID_H
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends