ISeeML  1.0
Object.hpp
1 //
2 // Definition of iSeeML::geom::Object, superclass of every other
3 // ISeeML 2D geometric objects' classes.
4 //
5 
6 // To only include this definition once
7 #ifndef ISEEML_GEOM_OBJECT_HH
8 #define ISEEML_GEOM_OBJECT_HH
9 
10 
11 // This class needs the definition of iSeeML::Object.
12 #include <iSeeML/Object.hpp>
13 
14 
25  // === Object's Fields ==========================================
26 
31  static const string ClassName;
32 
33 public:
34  // === Constructors and Destructors =============================
35 
36  // None (destructor is already virtual, due to Object).
37 
38 
39  // === Description Methods ======================================
40 
41 
42  // === Modification Methods =====================================
43 
52  (const iSeeML::geom::Vector& v) = 0;
53 
54 
55  // === Operators ================================================
56 
67  virtual bool operator==(const iSeeML::geom::Object& other) const {
68  cerr << ClassName << "::operator==: invalid comparison"
69  << endl << " (" << ClassName << '/'
70  << other.className() << "); returns false!" << endl;
71  return false; }
72 
73 
74  // === Various Methods ==========================================
75 
76 }; // end of class iSeeML::geom::Object
77 
78 #endif // end of definition
79 
This class defines 2D geometric vectors, which can be defined by their Polar or Cartesian coordinates...
Definition: Vector.hpp:34
This class is the base class of ISeeML: every class of ISeeML inherits this one.
Definition: Object.hpp:47
virtual bool operator==(const iSeeML::geom::Object &other) const
Equality operator between geometric objects.
Definition: Object.hpp:67
virtual iSeeML::geom::Object & translate(const iSeeML::geom::Vector &v)=0
Modification method, translating a iSeeML::geom::Object along a vector.
virtual const string className() const
Description method, giving the object&#39;s class name.
Definition: Object.hpp:85
This class is the base class of the 2D geometric namespace of ISeeML: every geometric object inherits...
Definition: Object.hpp:24