model_stamps.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Software License Agreement (BSD License) *
3  * Copyright (C) 2016 by Horatiu George Todoran <todorangrg@gmail.com> *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions *
7  * are met: *
8  * *
9  * 1. Redistributions of source code must retain the above copyright *
10  * notice, this list of conditions and the following disclaimer. *
11  * 2. Redistributions in binary form must reproduce the above copyright *
12  * notice, this list of conditions and the following disclaimer in *
13  * the documentation and/or other materials provided with the *
14  * distribution. *
15  * 3. Neither the name of the copyright holder nor the names of its *
16  * contributors may be used to endorse or promote products derived *
17  * from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
23  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY *
29  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
30  * POSSIBILITY OF SUCH DAMAGE. *
31  ***************************************************************************/
32 
33 #ifndef MODEL_STAMPS_H
34 #define MODEL_STAMPS_H
35 
36 #include <memory>
37 
38 namespace tuw
39 {
40 class ModelStamps;
41 using ModelStampsPtr = std::shared_ptr<ModelStamps>;
42 using ModelStampsConstPtr = std::shared_ptr<ModelStamps const>;
44 {
45  // enums
47 public:
48  enum class StampType
49  {
50  TIME,
51  DIST
52  };
53 
54  // default class functions
55 public:
56  ModelStamps() : s_(0), t_(0)
57  {
58  }
59 
60 public:
61  virtual ~ModelStamps() = default;
62 
63 public:
64  ModelStamps(const ModelStamps&) = default;
65 
66 public:
67  ModelStamps& operator=(const ModelStamps&) = default;
68 
69 public:
70  ModelStamps(ModelStamps&&) = default;
71 
72 public:
73  ModelStamps& operator=(ModelStamps&&) = default;
74 
76 public:
77  double& s()
78  {
79  return s_;
80  }
82 public:
83  const double& s() const
84  {
85  return s_;
86  }
88 public:
89  double& t()
90  {
91  return t_;
92  }
94 public:
95  const double& t() const
96  {
97  return t_;
98  }
99 
101 protected:
102  double s_;
104 protected:
105  double t_;
106 };
107 }
108 
109 #endif // MODEL_STAMPS_H
double s_
Arc length parameter.
Definition: model_stamps.h:102
ModelStamps & operator=(const ModelStamps &)=default
std::shared_ptr< ModelStamps const > ModelStampsConstPtr
Definition: model_stamps.h:42
StampType
Stamp type.
Definition: model_stamps.h:48
const double & s() const
Const arc length parameter reference.
Definition: model_stamps.h:83
double & t()
Temporal parameter reference.
Definition: model_stamps.h:89
const double & t() const
Const temporal parameter reference.
Definition: model_stamps.h:95
virtual ~ModelStamps()=default
double t_
Temporal parameter.
Definition: model_stamps.h:105
std::shared_ptr< ModelStamps > ModelStampsPtr
Definition: model_stamps.h:41
double & s()
Arc length parameter reference.
Definition: model_stamps.h:77


tuw_control
Author(s): George Todoran
autogenerated on Mon Jun 10 2019 15:27:21