ad_physics
DurationSquaredList.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <iostream>
21 #include <sstream>
22 #include <vector>
27 namespace ad {
31 namespace physics {
32 
38 typedef std::vector<::ad::physics::DurationSquared> DurationSquaredList;
39 
40 } // namespace physics
41 } // namespace ad
42 
46 #ifndef GEN_GUARD_VECTOR_AD_PHYSICS_DURATIONSQUARED
47 #define GEN_GUARD_VECTOR_AD_PHYSICS_DURATIONSQUARED
48 namespace std {
58 inline std::ostream &operator<<(std::ostream &os, vector<::ad::physics::DurationSquared> const &_value)
59 {
60  os << "[";
61  for (auto it = _value.begin(); it != _value.end(); it++)
62  {
63  if (it != _value.begin())
64  {
65  os << ",";
66  }
67  os << *it;
68  }
69  os << "]";
70  return os;
71 }
72 } // namespace std
73 
74 namespace std {
78 inline std::string to_string(::ad::physics::DurationSquaredList const &value)
79 {
80  stringstream sstream;
81  sstream << value;
82  return sstream.str();
83 }
84 } // namespace std
85 #endif // GEN_GUARD_VECTOR_AD_PHYSICS_DURATIONSQUARED
ad
namespace ad
Definition: Acceleration.hpp:30
ad::physics::DurationSquaredList
std::vector<::ad::physics::DurationSquared > DurationSquaredList
DataType DurationSquaredList.
Definition: DurationSquaredList.hpp:38
std::to_string
std::string to_string(::ad::physics::Acceleration const &value)
overload of the std::to_string for Acceleration
Definition: Acceleration.hpp:559
DurationSquared.hpp