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