exceptions.hh

Go to the documentation of this file.
1 
6 #ifndef formulaexceptions_hh
7 #define formulaexceptions_hh
8 
9 #include "elementFormula.hh"
10 #include "basics/exceptions.hh"
11 
12 namespace concepts {
13 
14  template<typename F>
15  class Element;
16 
17 
18  // ******************************************* ElementNotInDomainOfFormula **
19 
25  public:
27  template<typename F, typename G>
29  const ElementFormula<F,G>& frm) {
30  std::stringstream s;
31  s << "element " << elm << " is not in the domain of " << frm;
32  errorMessage_ = s.str();
33  }
34 
35  template<typename F>
37  std::stringstream s;
38  s << "element " << elm << " is not in the domain";
39  errorMessage_ = s.str();
40  }
41 
42  virtual ~ElementNotInDomainOfFormula() throw() {}
43  protected:
44  virtual std::ostream& info(std::ostream& os) const throw();
45  private:
46  std::string errorMessage_;
47  };
48 
49  // ******************************************* PointerToEmptyElementFormula **
50 
56  public:
59  {
60  errorMessage_ = "Empty RCP<ElementFormula>";
61  }
62  virtual ~PointerToEmptyElementFormula() throw() {}
63  protected:
64  virtual std::ostream& info(std::ostream& os) const throw();
65  private:
66  std::string errorMessage_;
67  };
68 
69  // ************************************************** PointerToEmptyFormula **
70 
76  public:
79  {
80  errorMessage_ = "Empty RCP<Formula>";
81  }
82  virtual ~PointerToEmptyFormula() throw() {}
83  protected:
84  virtual std::ostream& info(std::ostream& os) const throw();
85  private:
86  std::string errorMessage_;
87  };
88 
89 
90 } // namespace concepts
91 
92 #endif // formulaexceptions_hh
93 
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
An abstract class for an element of a space.
Definition: exceptions.hh:15
PointerToEmptyFormula()
Constructor.
Definition: exceptions.hh:78
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Base class for exceptions.
Definition: exceptions.hh:86
ElementNotInDomainOfFormula(const Element< G > &elm, const ElementFormula< F, G > &frm)
Constructor.
Definition: exceptions.hh:28
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Interface for a formula defined element by element.
Exception class to express that the RCP pointer points to 0.
Definition: exceptions.hh:75
Exception class to express that an inquired element is not in the domain.
Definition: exceptions.hh:24
ElementNotInDomainOfFormula(const Element< F > &elm)
Definition: exceptions.hh:36
Exception class to express that the RCP pointer points to 0.
Definition: exceptions.hh:55
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich