vcsl_angle_unit.h
Go to the documentation of this file.
1 #ifndef vcsl_angle_unit_h_
2 #define vcsl_angle_unit_h_
3 //:
4 // \file
5 // \brief Abstract unit associated to the angle dimension
6 // \author Francois BERTEL
7 //
8 // \verbatim
9 // Modifications
10 // 2000/06/28 Francois BERTEL Creation. Adapted from IUE
11 // 2004/09/10 Peter Vanroose Inlined all 1-line methods in class decl
12 // 2004/09/17 Peter Vanroose do not pass vcsl_unit objects; use vcsl_unit_sptr instead
13 // \endverbatim
14 
15 #include <vcsl/vcsl_unit.h>
17 #include <vcsl/vcsl_unit_sptr.h>
18 
19 //: Abstract unit associated to the angle dimension
21  : public vcsl_unit
22 {
23  //***************************************************************************
24  // Constructors/Destructor
25  //***************************************************************************
26 
27  protected:
28  // Default constructor
29  vcsl_angle_unit() = default;
30 
31  public:
32  // Destructor
33  ~vcsl_angle_unit() override = default;
34 
35  //***************************************************************************
36  // Status report
37  //***************************************************************************
38 
39  //: Are `this' and `other' compatible units ?
40  // (Are they associated to the same dimension ?)
41  // Pure virtual function of vcsl_unit
42  bool compatible_units(vcsl_unit_sptr const& other) const override;
43 
44  //: Return the standard unit associated to the dimension of `this'
45  // Pure virtual function of vcsl_unit
46  vcsl_unit_sptr standard_unit() const override;
47 
48  //***************************************************************************
49  // Because VXL does not necessarily use dynamic_cast<>
50  //***************************************************************************
51 
52  const vcsl_angle_unit *cast_to_angle_unit() const override { return this; }
53 };
54 
55 #endif // vcsl_angle_unit_h_
vcsl_unit_sptr standard_unit() const override
Return the standard unit associated to the dimension of ‘this’.
vcsl_angle_unit()=default
bool compatible_units(vcsl_unit_sptr const &other) const override
Are ‘this’ and ‘other’ compatible units ?.
Abstract unit associated to the angle dimension.
Abstract unit associated to a dimension.
~vcsl_angle_unit() override=default
Abstract unit associated to a dimension.
Definition: vcsl_unit.h:34
const vcsl_angle_unit * cast_to_angle_unit() const override