]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Augment documentation.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Feb 2013 03:04:27 +0000 (03:04 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Feb 2013 03:04:27 +0000 (03:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@28241 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/function.h

index e41611040bfa54541df5f054c20889157cbc4ae8..bf0c08183fa6d04621120c8a9f0b351d91ffd0eb 100644 (file)
@@ -132,20 +132,25 @@ public:
    * Virtual destructor; absolutely
    * necessary in this case.
    *
-   * This destructor is declared
-   * pure virtual, such that
-   * objects of this class cannot
-   * be created. Since all the
-   * other virtual functions have a
-   * pseudo-implementation to avoid
-   * overhead in derived classes,
-   * this is the best place to do
-   * this.
+   * This destructor is declared pure virtual, such that objects of this class
+   * cannot be created. Since all the other virtual functions have a
+   * pseudo-implementation to avoid overhead in derived classes, they can not
+   * be abstract. As a consequence, we could generate an object of this class
+   * because none of this class's functions are abstract.
    *
-   * Nevertheless, since derived
+   * We circumvent this problem by making the destructor of this class
+   * abstract virtual. This ensures that at least one member function is
+   * abstract, and consequently, no objects of type Function can be
+   * created. However, there is no need for derived classes to explicitly
+   * implement a destructor: every class has a destructor, either explicitly
+   * implemented or implicitly generated by the compiler, and this resolves
+   * the abstractness of any derived class even if they do not have an
+   * explicitly declared destructor.
+   *
+   * Nonetheless, since derived
    * classes want to call the
    * destructor of a base class,
-   * the destructor is implemented
+   * this destructor is implemented
    * (despite it being pure
    * virtual).
    */

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.