core
vcsl
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
>
16
#include <
vcsl/vcsl_dimension_sptr.h
>
17
#include <
vcsl/vcsl_unit_sptr.h
>
18
19
//: Abstract dimension
20
// A dimension is a type of quantity to be measured
21
class
vcsl_dimension
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
34
vcsl_dimension
(
vcsl_dimension
const
&) :
vbl_ref_count
() {}
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
vcsl_dimension(vcsl_dimension const &)
Definition:
vcsl_dimension.h:34
vcsl_dimension_sptr.h
vcsl_dimension::vcsl_dimension
vcsl_dimension()=default
vcsl_dimension::standard_unit
virtual vcsl_unit_sptr standard_unit() const =0
Return the standard unit associated to the dimension.
vbl_smart_ptr
vcsl_dimension::~vcsl_dimension
~vcsl_dimension() override=default
vcsl_dimension::compatible_unit
virtual bool compatible_unit(vcsl_unit_sptr const &new_unit) const =0
Is ‘new_unit’ a compatible unit for the dimension ?.
vcsl_unit_sptr.h
vcsl_dimension
Abstract dimension.
Definition:
vcsl_dimension.h:21
vbl_ref_count.h
vbl_ref_count
Generated by
1.8.15