SEScalarTime.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "cdm/properties/SEScalar.h"
6 
7 class CDM_DECL TimeUnit : public CCompoundUnit
8 {
9 public:
10  TimeUnit(const std::string& u) : CCompoundUnit(u) {}
11  virtual ~TimeUnit() {}
12 
13  // Please use static units below
14  TimeUnit(const TimeUnit&) = delete;
15  TimeUnit& operator= (const TimeUnit&) = delete;
16 
17  static bool IsValidUnit(const std::string& unit);
18  static const TimeUnit& GetCompoundUnit(const std::string& unit);
19 
20  static const TimeUnit s;
21  static const TimeUnit min;
22  static const TimeUnit hr;
23  static const TimeUnit day;
24  static const TimeUnit yr;
25 };
26 
27 class CDM_DECL SEScalarTime : public SEScalarQuantity<TimeUnit>
28 {
29 public:
31  virtual ~SEScalarTime() {}
32 };
Definition: CompoundUnit.h:40
CCompoundUnit & operator=(const CCompoundUnit &rhs)
Definition: CompoundUnit.h:132
Definition: SEScalar.h:208
Definition: SEScalarTime.h:28
SEScalarTime()
Definition: SEScalarTime.h:30
virtual ~SEScalarTime()
Definition: SEScalarTime.h:31
Definition: SEScalarTime.h:8
static const TimeUnit min
Definition: SEScalarTime.h:21
TimeUnit(const TimeUnit &)=delete
static const TimeUnit day
Definition: SEScalarTime.h:23
virtual ~TimeUnit()
Definition: SEScalarTime.h:11
static const TimeUnit s
Definition: SEScalarTime.h:20
TimeUnit(const std::string &u)
Definition: SEScalarTime.h:10
static const TimeUnit hr
Definition: SEScalarTime.h:22
static const TimeUnit yr
Definition: SEScalarTime.h:24

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.