core/vcsl/vcsl_angle_unit.h
Go to the documentation of this file.
00001 #ifndef vcsl_angle_unit_h_
00002 #define vcsl_angle_unit_h_
00003 //:
00004 // \file
00005 // \brief Abstract unit associated to the angle dimension
00006 // \author François BERTEL
00007 //
00008 // \verbatim
00009 //  Modifications
00010 //   2000/06/28 François BERTEL Creation. Adapted from IUE
00011 //   2004/09/10 Peter Vanroose  Inlined all 1-line methods in class decl
00012 //   2004/09/17 Peter Vanroose  do not pass vcsl_unit objects; use vcsl_unit_sptr instead
00013 // \endverbatim
00014 
00015 #include <vcsl/vcsl_unit.h>
00016 #include <vcsl/vcsl_angle_unit_sptr.h>
00017 #include <vcsl/vcsl_unit_sptr.h>
00018 
00019 //: Abstract unit associated to the angle dimension
00020 class vcsl_angle_unit
00021   : public vcsl_unit
00022 {
00023   //***************************************************************************
00024   // Constructors/Destructor
00025   //***************************************************************************
00026 
00027  protected:
00028   // Default constructor
00029   vcsl_angle_unit() {}
00030 
00031  public:
00032   // Destructor
00033   virtual ~vcsl_angle_unit() {}
00034 
00035   //***************************************************************************
00036   // Status report
00037   //***************************************************************************
00038 
00039   //: Are `this' and `other' compatible units ?
00040   // (Are they associated to the same dimension ?)
00041   // Pure virtual function of vcsl_unit
00042   virtual bool compatible_units(vcsl_unit_sptr const& other) const;
00043 
00044   //: Return the standard unit associated to the dimension of `this'
00045   // Pure virtual function of vcsl_unit
00046   virtual vcsl_unit_sptr standard_unit() const;
00047 
00048   //***************************************************************************
00049   // Because VXL does not necessarily use dynamic_cast<>
00050   //***************************************************************************
00051 
00052   virtual const vcsl_angle_unit *cast_to_angle_unit() const { return this; }
00053 };
00054 
00055 #endif // vcsl_angle_unit_h_