From 3ed5d3d74d9c793dc09b9cd766bfbf8bed8df2bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert=20Kl=C3=B6fkorn?= <robertk@dune-project.org>
Date: Thu, 16 Feb 2006 16:54:48 +0000
Subject: [PATCH] NewGeometryType --> GeometryType

NewGeometryType is still existent as a typedef.

[[Imported from SVN: r4106]]
---
 common/geometrytype.hh | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/common/geometrytype.hh b/common/geometrytype.hh
index ca351a8f5..d8c59f89c 100644
--- a/common/geometrytype.hh
+++ b/common/geometrytype.hh
@@ -16,7 +16,7 @@ namespace Dune {
      This class has to be extended if a grid implementation with new entity types
      is added to DUNE.
    */
-  class NewGeometryType
+  class GeometryType
   {
   public:
     /** \brief Each entity can be tagged by one of these basic types
@@ -32,19 +32,18 @@ namespace Dune {
     short dim_;
 
   public:
-
     /** \brief Default constructor, not initializing anything */
-    NewGeometryType () {}
+    GeometryType () {}
 
     /** \brief Constructor */
-    NewGeometryType(BasicType basicType, unsigned int dim)
+    GeometryType(BasicType basicType, unsigned int dim)
       : basicType_(basicType), dim_(dim)
     {}
 
     /** \brief Constructor for vertices and segments
         \todo Add check for dim={0,1} when compiled with a suitable flag
      */
-    explicit NewGeometryType(unsigned int dim)
+    explicit GeometryType(unsigned int dim)
       : basicType_(cube), dim_(dim)
     {}
 
@@ -125,18 +124,18 @@ namespace Dune {
     /*@}*/
 
     /** \brief Check for equality */
-    bool operator==(const NewGeometryType& other) const {
+    bool operator==(const GeometryType& other) const {
       return ( (dim()==0 && other.dim()==0)
                || (dim()==1 && other.dim()==1)
                || (dim()==other.dim() && basicType_==other.basicType_) );
     }
 
     /** \brief Check for inequality */
-    bool operator!=(const NewGeometryType& other) const {
+    bool operator!=(const GeometryType& other) const {
       return ! ((*this)==other);
     }
 
-    bool operator<(const NewGeometryType& other) const {
+    bool operator<(const GeometryType& other) const {
       if (dim() != other.dim())
         return dim() < other.dim();
       else if (dim()==0 || dim()==1)
@@ -146,7 +145,7 @@ namespace Dune {
     }
 
     /** \brief Prints the type to an output stream */
-    friend std::ostream& operator<< (std::ostream& s, const NewGeometryType& a)
+    friend std::ostream& operator<< (std::ostream& s, const GeometryType& a)
     {
       switch (a.basicType_) {
       case simplex :
@@ -167,8 +166,11 @@ namespace Dune {
 
   };
 
-  /** \brief Prints a NewGeometryType::BasicType to an output stream */
-  inline std::ostream& operator<< (std::ostream& s, NewGeometryType::BasicType type)
+  //! to be removed soon
+  typedef GeometryType NewGeometryType;
+
+  /** \brief Prints a GeometryType::BasicType to an output stream */
+  inline std::ostream& operator<< (std::ostream& s, GeometryType::BasicType type)
   {
     switch (type) {
     case NewGeometryType::simplex : s << "simplex"; break;
@@ -177,7 +179,6 @@ namespace Dune {
     case NewGeometryType::prism :   s << "prism";   break;
     default : s << "[unknown NewGeometryType::BasicType: " << int(type) << "]";
     }
-
     return s;
   }
 }
-- 
GitLab