From 96502e6acef1d992365a8ae8e36e5891f7c1c4a9 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 28 Jul 2004 22:24:07 +0000 Subject: [PATCH] TableIndicesBase now has operators==/!= git-svn-id: https://svn.dealii.org/trunk@9532 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/table.h | 37 ++++++++++++++++++++++++++++++- deal.II/doc/news/c-5.0.html | 7 ++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/deal.II/base/include/base/table.h b/deal.II/base/include/base/table.h index b1a17c19cf..515e990a9f 100644 --- a/deal.II/base/include/base/table.h +++ b/deal.II/base/include/base/table.h @@ -50,7 +50,19 @@ template class Table<6,T>; * ith index. */ unsigned int operator[] (const unsigned int i) const; - + + /** + * Compare two index fields for + * equality. + */ + bool operator == (const TableIndicesBase &other) const; + + /** + * Compare two index fields for + * inequality. + */ + bool operator != (const TableIndicesBase &other) const; + protected: /** * Store the indices in an array. @@ -1586,6 +1598,29 @@ TableIndicesBase::operator [] (const unsigned int i) const +template +inline +bool +TableIndicesBase::operator == (const TableIndicesBase &other) const +{ + for (unsigned int i=0; i +inline +bool +TableIndicesBase::operator != (const TableIndicesBase &other) const +{ + return !(*this == other); +} + + + inline TableIndices<1>::TableIndices () { diff --git a/deal.II/doc/news/c-5.0.html b/deal.II/doc/news/c-5.0.html index 7217f5c5ee..ddb160dcb0 100644 --- a/deal.II/doc/news/c-5.0.html +++ b/deal.II/doc/news/c-5.0.html @@ -75,6 +75,13 @@ inconvenience this causes.

base

    +
  1. + New: Class TableIndices now has + operators that check for equality and inequality of objects. +
    + (WB 2004/07/28) +

    +
  2. New: A class PointerComparison for comparing pointers that may or may not be of the same type. -- 2.39.5