vcsl_dimension.h
Go to the documentation of this file.
1 #ifndef vcsl_dimension_h_
2 #define vcsl_dimension_h_
3 //:
4 // \file
5 // \brief Abstract 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 <vbl/vbl_ref_count.h>
17 #include <vcsl/vcsl_unit_sptr.h>
18 
19 //: Abstract dimension
20 // A dimension is a type of quantity to be measured
22  : public vbl_ref_count
23 {
24  //***************************************************************************
25  // Constructors/Destructor
26  //***************************************************************************
27 
28  protected:
29  // Default constructor
30  vcsl_dimension() = default;
31 
32  public:
33  // Copy constructor
35 
36  // Destructor
37  ~vcsl_dimension() override = default;
38 
39  //***************************************************************************
40  // Status report
41  //***************************************************************************
42 
43  //: Is `new_unit' a compatible unit for the dimension ?
44  virtual bool compatible_unit(vcsl_unit_sptr const& new_unit) const=0;
45 
46  //: Return the standard unit associated to the dimension
47  virtual vcsl_unit_sptr standard_unit() const=0;
48 };
49 
50 #endif // vcsl_dimension_h_
vcsl_dimension(vcsl_dimension const &)
vcsl_dimension()=default
virtual vcsl_unit_sptr standard_unit() const =0
Return the standard unit associated to the dimension.
~vcsl_dimension() override=default
virtual bool compatible_unit(vcsl_unit_sptr const &new_unit) const =0
Is ‘new_unit’ a compatible unit for the dimension ?.
Abstract dimension.