[opengtl-commits] [225] add a Region class |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 225
Author: cyrille
Date: 2008-06-24 21:32:47 +0200 (Tue, 24 Jun 2008)
Log Message:
-----------
add a Region class
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt
Added Paths:
-----------
trunk/OpenGTL/OpenGTL/GTLCore/Region.cpp
trunk/OpenGTL/OpenGTL/GTLCore/Region.h
trunk/OpenGTL/OpenGTL/GTLCore/RegionF.cpp
trunk/OpenGTL/OpenGTL/GTLCore/RegionF.h
Modified: trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt 2008-06-24 19:32:31 UTC (rev 224)
+++ trunk/OpenGTL/OpenGTL/GTLCore/CMakeLists.txt 2008-06-24 19:32:47 UTC (rev 225)
@@ -13,6 +13,8 @@
Function.cpp
Parameter.cpp
PixelDescription.cpp
+ Region.cpp
+ RegionF.cpp
ScopedName.cpp
String.cpp
Type.cpp
@@ -61,5 +63,5 @@
# installation
install(TARGETS GTLCore DESTINATION ${LIB_INSTALL_DIR} )
-install( FILES Parameter.h Function.h Array.h Buffer.h ErrorMessage.h PixelDescription.h ScopedName.h String.h Type.h Value.h Version.h Macros.h DESTINATION ${INCLUDE_INSTALL_DIR}/GTLCore )
+install( FILES Parameter.h Function.h Array.h Buffer.h ErrorMessage.h PixelDescription.h Region.h RegionF.h ScopedName.h String.h Type.h Value.h Version.h Macros.h DESTINATION ${INCLUDE_INSTALL_DIR}/GTLCore )
Added: trunk/OpenGTL/OpenGTL/GTLCore/Region.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Region.cpp (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Region.cpp 2008-06-24 19:32:47 UTC (rev 225)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "Region.h"
+
+using namespace GTLCore;
+
+Region::Region( int _x, int _y, int _width, int _height )
+ : m_x(_x), m_y(_y), m_width(_width), m_height(_height)
+{
+}
+Region::~Region()
+{
+}
+
+int Region::x() const
+{
+ return m_x;
+}
+
+int Region::y() const
+{
+ return m_y;
+}
+
+int Region::width() const
+{
+ return m_width;
+}
+
+int Region::height() const
+{
+ return m_height;
+}
Property changes on: trunk/OpenGTL/OpenGTL/GTLCore/Region.cpp
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/OpenGTL/GTLCore/Region.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Region.h (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Region.h 2008-06-24 19:32:47 UTC (rev 225)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GTLCORE_REGION_H_
+#define _GTLCORE_REGION_H_
+
+namespace GTLCore {
+ class Region {
+ public:
+ Region( int _x, int _y, int _width, int _height );
+ ~Region();
+ int x() const;
+ int y() const;
+ int width() const;
+ int height() const;
+ private:
+ int m_x, m_y, m_width, m_height;
+ };
+}
+
+#endif
Property changes on: trunk/OpenGTL/OpenGTL/GTLCore/Region.h
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/OpenGTL/GTLCore/RegionF.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/RegionF.cpp (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/RegionF.cpp 2008-06-24 19:32:47 UTC (rev 225)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "RegionF.h"
+
+using namespace GTLCore;
+
+RegionF::RegionF( double _x, double _y, double _width, double _height )
+ : m_x(_x), m_y(_y), m_width(_width), m_height(_height)
+{
+}
+
+RegionF::~RegionF()
+{
+}
+
Property changes on: trunk/OpenGTL/OpenGTL/GTLCore/RegionF.cpp
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/OpenGTL/OpenGTL/GTLCore/RegionF.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/RegionF.h (rev 0)
+++ trunk/OpenGTL/OpenGTL/GTLCore/RegionF.h 2008-06-24 19:32:47 UTC (rev 225)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2008 Cyrille Berger <cberger@xxxxxxxxxxx>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GTLCORE_REGIONF_H_
+#define _GTLCORE_REGIONF_H_
+
+namespace GTLCore {
+ class RegionF {
+ public:
+ RegionF( double _x, double _y, double _width, double _height );
+ ~RegionF();
+ private:
+ double m_x, m_y, m_width, m_height;
+ };
+
+}
+
+#endif
Property changes on: trunk/OpenGTL/OpenGTL/GTLCore/RegionF.h
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native