Zivid C++ API  1.8.1+6967bc1b-1
Defining the Future of 3D Machine Vision
FrameInfo.h
Go to the documentation of this file.
1 
2 /*******************************************************************************
3  * This file is part of the Zivid 3D Camera API
4  *
5  * Copyright 2015-2020 (C) Zivid AS
6  * All rights reserved.
7  *
8  * Zivid Software License, v1.0
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  *
16  * 2. Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  *
20  * 3. Neither the name of Zivid AS nor the names of its contributors may be used
21  * to endorse or promote products derived from this software without specific
22  * prior written permission.
23  *
24  * 4. This software, with or without modification, must not be used with any
25  * other 3D camera than from Zivid AS.
26  *
27  * 5. Any software provided in binary form under this license must not be
28  * reverse engineered, decompiled, modified and/or disassembled.
29  *
30  * THIS SOFTWARE IS PROVIDED BY ZIVID AS "AS IS" AND ANY EXPRESS OR IMPLIED
31  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
32  * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
33  * DISCLAIMED. IN NO EVENT SHALL ZIVID AS OR CONTRIBUTORS BE LIABLE FOR ANY
34  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
37  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  * Contact: Zivid Support <support@zivid.com>
42  * Info: http://www.zivid.com
43  ******************************************************************************/
44 
45 #pragma once
46 
47 #include <chrono>
48 #include <ctime>
49 #include <iomanip>
50 #include <memory>
51 #include <sstream>
52 #include <string>
53 #include <tuple>
54 #include <utility>
55 #include <vector>
56 
57 #include "Zivid/APIExport.h"
58 #include "Zivid/Range.h"
59 
60 #ifdef _MSC_VER
61 # pragma warning(push)
62 # pragma warning(disable : 4251) // "X needs to have dll-interface to be used by clients of class Y."
63 #endif
64 
65 namespace Zivid
66 {
68  class ZIVID_API_EXPORT FrameInfo
69  {
70  public:
71  static constexpr size_t version{ 1 };
72 
73 #ifndef NO_DOC
74  template<size_t>
75  struct Version;
76 
77  using LatestVersion = Zivid::FrameInfo;
78 #endif
79 
81  ~FrameInfo();
82 
84  FrameInfo(const FrameInfo &other);
85 
87  FrameInfo &operator=(const FrameInfo &other);
88 
90  FrameInfo(FrameInfo &&other) noexcept;
91 
93  FrameInfo &operator=(FrameInfo &&other) noexcept;
94 
96  FrameInfo() = default;
97 
99  static constexpr bool isContainer{ true };
100 
102  static constexpr const char *path{ "" };
103 
105  static constexpr const char *name{ "FrameInfo" };
106 
108  static constexpr const char *description{ R"description(Various information for a frame)description" };
109 
111  void set(const std::string &fullPath, const std::string &value);
112 
114  std::string getString(const std::string &fullPath) const;
115 
117  class ZIVID_API_EXPORT SoftwareVersion
118  {
119  public:
121  SoftwareVersion() = default;
122 
124  static constexpr bool isContainer{ true };
125 
127  static constexpr const char *path{ "SoftwareVersion" };
128 
130  static constexpr const char *name{ "SoftwareVersion" };
131 
133  static constexpr const char *description{
134  R"description(The version information for installed software at the time of image capture)description"
135  };
136 
138  void set(const std::string &fullPath, const std::string &value);
139 
141  std::string getString(const std::string &fullPath) const;
142 
144  class ZIVID_API_EXPORT ZividAPI
145  {
146  public:
148  ZividAPI() = default;
149 
151  static constexpr bool isContainer{ true };
152 
154  static constexpr const char *path{ "SoftwareVersion/ZividAPI" };
155 
157  static constexpr const char *name{ "ZividAPI" };
158 
160  static constexpr const char *description{
161  R"description(Version information for the Zivid API library)description"
162  };
163 
165  void set(const std::string &fullPath, const std::string &value);
166 
168  std::string getString(const std::string &fullPath) const;
169 
171  class ZIVID_API_EXPORT Comments
172  {
173  public:
175  using ValueType = std::string;
176 
178  static constexpr bool isContainer{ false };
179 
181  static constexpr const char *path{ "SoftwareVersion/ZividAPI/Comments" };
182 
184  static constexpr const char *name{ "Comments" };
185 
187  static constexpr const char *description{ R"description(Comments)description" };
188 
190  Comments() = default;
191 
193  explicit Comments(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
194  : m_value{ std::move(value) }
195  {}
196 
198  const ValueType &value() const
199  {
200  return m_value;
201  }
202 
204  void setFromString(const std::string &value)
205  {
206  m_value = value;
207  }
208 
210  std::string toString() const
211  {
212  return m_value;
213  }
214 
216  bool operator==(const Comments &other) const
217  {
218  return m_value == other.m_value;
219  }
220 
222  bool operator!=(const Comments &other) const
223  {
224  return m_value != other.m_value;
225  }
226 
228  bool operator<(const Comments &other) const
229  {
230  return m_value < other.m_value;
231  }
232 
234  bool operator>(const Comments &other) const
235  {
236  return m_value > other.m_value;
237  }
238 
240  friend std::ostream &operator<<(std::ostream &stream, const Comments &value)
241  {
242  return stream << value.toString();
243  }
244 
246  friend std::istream &operator>>(std::istream &stream, Comments &value)
247  {
248  value.setFromString(
249  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
250  return stream;
251  }
252 
253  private:
254  ValueType m_value{ "NA" };
255  };
256 
258  class ZIVID_API_EXPORT FileDescription
259  {
260  public:
262  using ValueType = std::string;
263 
265  static constexpr bool isContainer{ false };
266 
268  static constexpr const char *path{ "SoftwareVersion/ZividAPI/FileDescription" };
269 
271  static constexpr const char *name{ "FileDescription" };
272 
274  static constexpr const char *description{ R"description(File description)description" };
275 
277  FileDescription() = default;
278 
280  explicit FileDescription(ValueType value) noexcept(
281  std::is_nothrow_move_constructible<ValueType>::value)
282  : m_value{ std::move(value) }
283  {}
284 
286  const ValueType &value() const
287  {
288  return m_value;
289  }
290 
292  void setFromString(const std::string &value)
293  {
294  m_value = value;
295  }
296 
298  std::string toString() const
299  {
300  return m_value;
301  }
302 
304  bool operator==(const FileDescription &other) const
305  {
306  return m_value == other.m_value;
307  }
308 
310  bool operator!=(const FileDescription &other) const
311  {
312  return m_value != other.m_value;
313  }
314 
316  bool operator<(const FileDescription &other) const
317  {
318  return m_value < other.m_value;
319  }
320 
322  bool operator>(const FileDescription &other) const
323  {
324  return m_value > other.m_value;
325  }
326 
328  friend std::ostream &operator<<(std::ostream &stream, const FileDescription &value)
329  {
330  return stream << value.toString();
331  }
332 
334  friend std::istream &operator>>(std::istream &stream, FileDescription &value)
335  {
336  value.setFromString(
337  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
338  return stream;
339  }
340 
341  private:
342  ValueType m_value{ "NA" };
343  };
344 
347  {
348  public:
350  using ValueType = std::string;
351 
353  static constexpr bool isContainer{ false };
354 
356  static constexpr const char *path{ "SoftwareVersion/ZividAPI/FileVersion" };
357 
359  static constexpr const char *name{ "FileVersion" };
360 
362  static constexpr const char *description{ R"description(File version)description" };
363 
365  FileVersion() = default;
366 
368  explicit FileVersion(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
369  : m_value{ std::move(value) }
370  {}
371 
373  const ValueType &value() const
374  {
375  return m_value;
376  }
377 
379  void setFromString(const std::string &value)
380  {
381  m_value = value;
382  }
383 
385  std::string toString() const
386  {
387  return m_value;
388  }
389 
391  bool operator==(const FileVersion &other) const
392  {
393  return m_value == other.m_value;
394  }
395 
397  bool operator!=(const FileVersion &other) const
398  {
399  return m_value != other.m_value;
400  }
401 
403  bool operator<(const FileVersion &other) const
404  {
405  return m_value < other.m_value;
406  }
407 
409  bool operator>(const FileVersion &other) const
410  {
411  return m_value > other.m_value;
412  }
413 
415  friend std::ostream &operator<<(std::ostream &stream, const FileVersion &value)
416  {
417  return stream << value.toString();
418  }
419 
421  friend std::istream &operator>>(std::istream &stream, FileVersion &value)
422  {
423  value.setFromString(
424  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
425  return stream;
426  }
427 
428  private:
429  ValueType m_value{ "NA" };
430  };
431 
433  class ZIVID_API_EXPORT ProductVersion
434  {
435  public:
437  using ValueType = std::string;
438 
440  static constexpr bool isContainer{ false };
441 
443  static constexpr const char *path{ "SoftwareVersion/ZividAPI/ProductVersion" };
444 
446  static constexpr const char *name{ "ProductVersion" };
447 
449  static constexpr const char *description{ R"description(Product version)description" };
450 
452  ProductVersion() = default;
453 
455  explicit ProductVersion(ValueType value) noexcept(
456  std::is_nothrow_move_constructible<ValueType>::value)
457  : m_value{ std::move(value) }
458  {}
459 
461  const ValueType &value() const
462  {
463  return m_value;
464  }
465 
467  void setFromString(const std::string &value)
468  {
469  m_value = value;
470  }
471 
473  std::string toString() const
474  {
475  return m_value;
476  }
477 
479  bool operator==(const ProductVersion &other) const
480  {
481  return m_value == other.m_value;
482  }
483 
485  bool operator!=(const ProductVersion &other) const
486  {
487  return m_value != other.m_value;
488  }
489 
491  bool operator<(const ProductVersion &other) const
492  {
493  return m_value < other.m_value;
494  }
495 
497  bool operator>(const ProductVersion &other) const
498  {
499  return m_value > other.m_value;
500  }
501 
503  friend std::ostream &operator<<(std::ostream &stream, const ProductVersion &value)
504  {
505  return stream << value.toString();
506  }
507 
509  friend std::istream &operator>>(std::istream &stream, ProductVersion &value)
510  {
511  value.setFromString(
512  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
513  return stream;
514  }
515 
516  private:
517  ValueType m_value{ "NA" };
518  };
519 
520  template<typename T,
521  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::Comments>::value,
522  int>::type = 0>
524  {
525  return m_comments;
526  }
527 
528  template<typename T,
529  typename std::enable_if<
530  std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileDescription>::value,
531  int>::type = 0>
533  {
534  return m_fileDescription;
535  }
536 
537  template<
538  typename T,
539  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileVersion>::value,
540  int>::type = 0>
542  {
543  return m_fileVersion;
544  }
545 
546  template<typename T,
547  typename std::enable_if<
548  std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::ProductVersion>::value,
549  int>::type = 0>
551  {
552  return m_productVersion;
553  }
554 
555  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
557  {
558  return m_comments;
559  }
560 
561  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
563  {
564  return m_fileDescription;
565  }
566 
567  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
569  {
570  return m_fileVersion;
571  }
572 
573  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
575  {
576  return m_productVersion;
577  }
578 
580  explicit ZividAPI(const Comments &comments,
581  const FileDescription &fileDescription,
582  const FileVersion &fileVersion,
583  const ProductVersion &productVersion);
584 
585  private:
586  Comments m_comments{};
587 
588  public:
590  ZividAPI &set(const Comments &value)
591  {
592  m_comments = value;
593  return *this;
594  }
596  const Comments &comments() const
597  {
598  return m_comments;
599  }
600 
601  private:
602  FileDescription m_fileDescription{};
603 
604  public:
606  ZividAPI &set(const FileDescription &value)
607  {
608  m_fileDescription = value;
609  return *this;
610  }
612  const FileDescription &fileDescription() const
613  {
614  return m_fileDescription;
615  }
616 
617  private:
618  FileVersion m_fileVersion{};
619 
620  public:
622  ZividAPI &set(const FileVersion &value)
623  {
624  m_fileVersion = value;
625  return *this;
626  }
628  const FileVersion &fileVersion() const
629  {
630  return m_fileVersion;
631  }
632 
633  private:
634  ProductVersion m_productVersion{};
635 
636  public:
638  ZividAPI &set(const ProductVersion &value)
639  {
640  m_productVersion = value;
641  return *this;
642  }
644  const ProductVersion &productVersion() const
645  {
646  return m_productVersion;
647  }
648 
650  template<typename F>
651  void forEach(const F &f) const
652  {
653  f(m_comments);
654  f(m_fileDescription);
655  f(m_fileVersion);
656  f(m_productVersion);
657  }
658 
660  template<typename F>
661  void forEach(const F &f)
662  {
663  f(m_comments);
664  f(m_fileDescription);
665  f(m_fileVersion);
666  f(m_productVersion);
667  }
668 
670  template<typename F>
671  void traverseValues(const F &f) const
672  {
673  f(m_comments);
674  f(m_fileDescription);
675  f(m_fileVersion);
676  f(m_productVersion);
677  }
678 
680  template<typename F>
681  void traverseValues(const F &f)
682  {
683  f(m_comments);
684  f(m_fileDescription);
685  f(m_fileVersion);
686  f(m_productVersion);
687  }
688 
690  std::string toString() const;
691 
693  friend std::ostream &operator<<(std::ostream &stream, const ZividAPI &value)
694  {
695  return stream << value.toString();
696  }
697 
699  void setFromString(const std::string &value);
700 
702  friend std::istream &operator>>(std::istream &stream, ZividAPI &value)
703  {
704  value.setFromString(
705  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
706  return stream;
707  }
708 
710  bool operator==(const ZividAPI &other) const;
711 
713  bool operator!=(const ZividAPI &other) const;
714  };
715 
718  {
719  public:
721  ZividCameraFile() = default;
722 
724  static constexpr bool isContainer{ true };
725 
727  static constexpr const char *path{ "SoftwareVersion/ZividCameraFile" };
728 
730  static constexpr const char *name{ "ZividCameraFile" };
731 
733  static constexpr const char *description{
734  R"description(Version information for the ZividCameraFile driver)description"
735  };
736 
738  void set(const std::string &fullPath, const std::string &value);
739 
741  std::string getString(const std::string &fullPath) const;
742 
744  class ZIVID_API_EXPORT Comments
745  {
746  public:
748  using ValueType = std::string;
749 
751  static constexpr bool isContainer{ false };
752 
754  static constexpr const char *path{ "SoftwareVersion/ZividCameraFile/Comments" };
755 
757  static constexpr const char *name{ "Comments" };
758 
760  static constexpr const char *description{ R"description(Comments)description" };
761 
763  Comments() = default;
764 
766  explicit Comments(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
767  : m_value{ std::move(value) }
768  {}
769 
771  const ValueType &value() const
772  {
773  return m_value;
774  }
775 
777  void setFromString(const std::string &value)
778  {
779  m_value = value;
780  }
781 
783  std::string toString() const
784  {
785  return m_value;
786  }
787 
789  bool operator==(const Comments &other) const
790  {
791  return m_value == other.m_value;
792  }
793 
795  bool operator!=(const Comments &other) const
796  {
797  return m_value != other.m_value;
798  }
799 
801  bool operator<(const Comments &other) const
802  {
803  return m_value < other.m_value;
804  }
805 
807  bool operator>(const Comments &other) const
808  {
809  return m_value > other.m_value;
810  }
811 
813  friend std::ostream &operator<<(std::ostream &stream, const Comments &value)
814  {
815  return stream << value.toString();
816  }
817 
819  friend std::istream &operator>>(std::istream &stream, Comments &value)
820  {
821  value.setFromString(
822  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
823  return stream;
824  }
825 
826  private:
827  ValueType m_value{ "NA" };
828  };
829 
831  class ZIVID_API_EXPORT FileDescription
832  {
833  public:
835  using ValueType = std::string;
836 
838  static constexpr bool isContainer{ false };
839 
841  static constexpr const char *path{ "SoftwareVersion/ZividCameraFile/FileDescription" };
842 
844  static constexpr const char *name{ "FileDescription" };
845 
847  static constexpr const char *description{ R"description(File description)description" };
848 
850  FileDescription() = default;
851 
853  explicit FileDescription(ValueType value) noexcept(
854  std::is_nothrow_move_constructible<ValueType>::value)
855  : m_value{ std::move(value) }
856  {}
857 
859  const ValueType &value() const
860  {
861  return m_value;
862  }
863 
865  void setFromString(const std::string &value)
866  {
867  m_value = value;
868  }
869 
871  std::string toString() const
872  {
873  return m_value;
874  }
875 
877  bool operator==(const FileDescription &other) const
878  {
879  return m_value == other.m_value;
880  }
881 
883  bool operator!=(const FileDescription &other) const
884  {
885  return m_value != other.m_value;
886  }
887 
889  bool operator<(const FileDescription &other) const
890  {
891  return m_value < other.m_value;
892  }
893 
895  bool operator>(const FileDescription &other) const
896  {
897  return m_value > other.m_value;
898  }
899 
901  friend std::ostream &operator<<(std::ostream &stream, const FileDescription &value)
902  {
903  return stream << value.toString();
904  }
905 
907  friend std::istream &operator>>(std::istream &stream, FileDescription &value)
908  {
909  value.setFromString(
910  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
911  return stream;
912  }
913 
914  private:
915  ValueType m_value{ "NA" };
916  };
917 
920  {
921  public:
923  using ValueType = std::string;
924 
926  static constexpr bool isContainer{ false };
927 
929  static constexpr const char *path{ "SoftwareVersion/ZividCameraFile/FileVersion" };
930 
932  static constexpr const char *name{ "FileVersion" };
933 
935  static constexpr const char *description{ R"description(File version)description" };
936 
938  FileVersion() = default;
939 
941  explicit FileVersion(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
942  : m_value{ std::move(value) }
943  {}
944 
946  const ValueType &value() const
947  {
948  return m_value;
949  }
950 
952  void setFromString(const std::string &value)
953  {
954  m_value = value;
955  }
956 
958  std::string toString() const
959  {
960  return m_value;
961  }
962 
964  bool operator==(const FileVersion &other) const
965  {
966  return m_value == other.m_value;
967  }
968 
970  bool operator!=(const FileVersion &other) const
971  {
972  return m_value != other.m_value;
973  }
974 
976  bool operator<(const FileVersion &other) const
977  {
978  return m_value < other.m_value;
979  }
980 
982  bool operator>(const FileVersion &other) const
983  {
984  return m_value > other.m_value;
985  }
986 
988  friend std::ostream &operator<<(std::ostream &stream, const FileVersion &value)
989  {
990  return stream << value.toString();
991  }
992 
994  friend std::istream &operator>>(std::istream &stream, FileVersion &value)
995  {
996  value.setFromString(
997  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
998  return stream;
999  }
1000 
1001  private:
1002  ValueType m_value{ "NA" };
1003  };
1004 
1006  class ZIVID_API_EXPORT ProductVersion
1007  {
1008  public:
1010  using ValueType = std::string;
1013  static constexpr bool isContainer{ false };
1016  static constexpr const char *path{ "SoftwareVersion/ZividCameraFile/ProductVersion" };
1017 
1019  static constexpr const char *name{ "ProductVersion" };
1022  static constexpr const char *description{ R"description(Product version)description" };
1023 
1025  ProductVersion() = default;
1026 
1028  explicit ProductVersion(ValueType value) noexcept(
1029  std::is_nothrow_move_constructible<ValueType>::value)
1030  : m_value{ std::move(value) }
1031  {}
1032 
1034  const ValueType &value() const
1035  {
1036  return m_value;
1037  }
1038 
1040  void setFromString(const std::string &value)
1041  {
1042  m_value = value;
1043  }
1044 
1046  std::string toString() const
1047  {
1048  return m_value;
1049  }
1050 
1052  bool operator==(const ProductVersion &other) const
1053  {
1054  return m_value == other.m_value;
1055  }
1056 
1058  bool operator!=(const ProductVersion &other) const
1059  {
1060  return m_value != other.m_value;
1061  }
1062 
1064  bool operator<(const ProductVersion &other) const
1065  {
1066  return m_value < other.m_value;
1067  }
1068 
1070  bool operator>(const ProductVersion &other) const
1071  {
1072  return m_value > other.m_value;
1073  }
1074 
1076  friend std::ostream &operator<<(std::ostream &stream, const ProductVersion &value)
1077  {
1078  return stream << value.toString();
1079  }
1080 
1082  friend std::istream &operator>>(std::istream &stream, ProductVersion &value)
1083  {
1084  value.setFromString(
1085  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1086  return stream;
1087  }
1088 
1089  private:
1090  ValueType m_value{ "NA" };
1091  };
1093  template<typename T,
1094  typename std::enable_if<
1095  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::Comments>::value,
1096  int>::type = 0>
1098  {
1099  return m_comments;
1100  }
1102  template<typename T,
1103  typename std::enable_if<
1104  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription>::value,
1105  int>::type = 0>
1107  {
1108  return m_fileDescription;
1109  }
1110 
1111  template<typename T,
1112  typename std::enable_if<
1113  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion>::value,
1114  int>::type = 0>
1116  {
1117  return m_fileVersion;
1118  }
1120  template<typename T,
1121  typename std::enable_if<
1122  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion>::value,
1123  int>::type = 0>
1125  {
1126  return m_productVersion;
1127  }
1128 
1129  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1131  {
1132  return m_comments;
1133  }
1134 
1135  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1137  {
1138  return m_fileDescription;
1139  }
1140 
1141  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1143  {
1144  return m_fileVersion;
1145  }
1146 
1147  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1149  {
1150  return m_productVersion;
1151  }
1152 
1154  explicit ZividCameraFile(const Comments &comments,
1155  const FileDescription &fileDescription,
1156  const FileVersion &fileVersion,
1157  const ProductVersion &productVersion);
1158 
1159  private:
1160  Comments m_comments{};
1162  public:
1164  ZividCameraFile &set(const Comments &value)
1165  {
1166  m_comments = value;
1167  return *this;
1168  }
1170  const Comments &comments() const
1171  {
1172  return m_comments;
1173  }
1174 
1175  private:
1176  FileDescription m_fileDescription{};
1177 
1178  public:
1180  ZividCameraFile &set(const FileDescription &value)
1181  {
1182  m_fileDescription = value;
1183  return *this;
1184  }
1186  const FileDescription &fileDescription() const
1187  {
1188  return m_fileDescription;
1189  }
1190 
1191  private:
1192  FileVersion m_fileVersion{};
1193 
1194  public:
1196  ZividCameraFile &set(const FileVersion &value)
1197  {
1198  m_fileVersion = value;
1199  return *this;
1200  }
1202  const FileVersion &fileVersion() const
1203  {
1204  return m_fileVersion;
1205  }
1206 
1207  private:
1208  ProductVersion m_productVersion{};
1210  public:
1212  ZividCameraFile &set(const ProductVersion &value)
1213  {
1214  m_productVersion = value;
1215  return *this;
1216  }
1218  const ProductVersion &productVersion() const
1219  {
1220  return m_productVersion;
1221  }
1222 
1224  template<typename F>
1225  void forEach(const F &f) const
1226  {
1227  f(m_comments);
1228  f(m_fileDescription);
1229  f(m_fileVersion);
1230  f(m_productVersion);
1231  }
1232 
1234  template<typename F>
1235  void forEach(const F &f)
1236  {
1237  f(m_comments);
1238  f(m_fileDescription);
1239  f(m_fileVersion);
1240  f(m_productVersion);
1241  }
1242 
1244  template<typename F>
1245  void traverseValues(const F &f) const
1246  {
1247  f(m_comments);
1248  f(m_fileDescription);
1249  f(m_fileVersion);
1250  f(m_productVersion);
1251  }
1252 
1254  template<typename F>
1255  void traverseValues(const F &f)
1256  {
1257  f(m_comments);
1258  f(m_fileDescription);
1259  f(m_fileVersion);
1260  f(m_productVersion);
1261  }
1262 
1264  std::string toString() const;
1267  friend std::ostream &operator<<(std::ostream &stream, const ZividCameraFile &value)
1268  {
1269  return stream << value.toString();
1270  }
1271 
1273  void setFromString(const std::string &value);
1274 
1276  friend std::istream &operator>>(std::istream &stream, ZividCameraFile &value)
1277  {
1278  value.setFromString(
1279  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1280  return stream;
1281  }
1282 
1284  bool operator==(const ZividCameraFile &other) const;
1285 
1287  bool operator!=(const ZividCameraFile &other) const;
1288  };
1289 
1292  {
1293  public:
1295  ZividCameraToshibaTeli() = default;
1296 
1298  static constexpr bool isContainer{ true };
1299 
1301  static constexpr const char *path{ "SoftwareVersion/ZividCameraToshibaTeli" };
1302 
1304  static constexpr const char *name{ "ZividCameraToshibaTeli" };
1305 
1307  static constexpr const char *description{
1308  R"description(Version information for the ZividCameraToshibaTeli driver)description"
1309  };
1310 
1312  void set(const std::string &fullPath, const std::string &value);
1313 
1315  std::string getString(const std::string &fullPath) const;
1316 
1318  class ZIVID_API_EXPORT Comments
1319  {
1320  public:
1322  using ValueType = std::string;
1323 
1325  static constexpr bool isContainer{ false };
1326 
1328  static constexpr const char *path{ "SoftwareVersion/ZividCameraToshibaTeli/Comments" };
1329 
1331  static constexpr const char *name{ "Comments" };
1332 
1334  static constexpr const char *description{ R"description(Comments)description" };
1335 
1337  Comments() = default;
1338 
1340  explicit Comments(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
1341  : m_value{ std::move(value) }
1342  {}
1343 
1345  const ValueType &value() const
1346  {
1347  return m_value;
1348  }
1349 
1351  void setFromString(const std::string &value)
1352  {
1353  m_value = value;
1354  }
1357  std::string toString() const
1358  {
1359  return m_value;
1360  }
1361 
1363  bool operator==(const Comments &other) const
1364  {
1365  return m_value == other.m_value;
1366  }
1367 
1369  bool operator!=(const Comments &other) const
1370  {
1371  return m_value != other.m_value;
1372  }
1373 
1375  bool operator<(const Comments &other) const
1376  {
1377  return m_value < other.m_value;
1378  }
1379 
1381  bool operator>(const Comments &other) const
1382  {
1383  return m_value > other.m_value;
1384  }
1385 
1387  friend std::ostream &operator<<(std::ostream &stream, const Comments &value)
1388  {
1389  return stream << value.toString();
1390  }
1391 
1393  friend std::istream &operator>>(std::istream &stream, Comments &value)
1394  {
1395  value.setFromString(
1396  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1397  return stream;
1398  }
1399 
1400  private:
1401  ValueType m_value{ "NA" };
1402  };
1403 
1405  class ZIVID_API_EXPORT FileDescription
1406  {
1407  public:
1409  using ValueType = std::string;
1412  static constexpr bool isContainer{ false };
1415  static constexpr const char *path{ "SoftwareVersion/ZividCameraToshibaTeli/FileDescription" };
1416 
1418  static constexpr const char *name{ "FileDescription" };
1421  static constexpr const char *description{ R"description(File description)description" };
1422 
1424  FileDescription() = default;
1425 
1427  explicit FileDescription(ValueType value) noexcept(
1428  std::is_nothrow_move_constructible<ValueType>::value)
1429  : m_value{ std::move(value) }
1430  {}
1431 
1433  const ValueType &value() const
1434  {
1435  return m_value;
1436  }
1437 
1439  void setFromString(const std::string &value)
1440  {
1441  m_value = value;
1442  }
1443 
1445  std::string toString() const
1446  {
1447  return m_value;
1448  }
1449 
1451  bool operator==(const FileDescription &other) const
1452  {
1453  return m_value == other.m_value;
1454  }
1455 
1457  bool operator!=(const FileDescription &other) const
1458  {
1459  return m_value != other.m_value;
1460  }
1461 
1463  bool operator<(const FileDescription &other) const
1464  {
1465  return m_value < other.m_value;
1466  }
1467 
1469  bool operator>(const FileDescription &other) const
1470  {
1471  return m_value > other.m_value;
1472  }
1473 
1475  friend std::ostream &operator<<(std::ostream &stream, const FileDescription &value)
1476  {
1477  return stream << value.toString();
1478  }
1479 
1481  friend std::istream &operator>>(std::istream &stream, FileDescription &value)
1482  {
1483  value.setFromString(
1484  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1485  return stream;
1486  }
1487 
1488  private:
1489  ValueType m_value{ "NA" };
1490  };
1494  {
1495  public:
1497  using ValueType = std::string;
1498 
1500  static constexpr bool isContainer{ false };
1501 
1503  static constexpr const char *path{ "SoftwareVersion/ZividCameraToshibaTeli/FileVersion" };
1504 
1506  static constexpr const char *name{ "FileVersion" };
1507 
1509  static constexpr const char *description{ R"description(File version)description" };
1510 
1512  FileVersion() = default;
1513 
1515  explicit FileVersion(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
1516  : m_value{ std::move(value) }
1517  {}
1520  const ValueType &value() const
1521  {
1522  return m_value;
1523  }
1526  void setFromString(const std::string &value)
1527  {
1528  m_value = value;
1529  }
1532  std::string toString() const
1533  {
1534  return m_value;
1535  }
1538  bool operator==(const FileVersion &other) const
1539  {
1540  return m_value == other.m_value;
1541  }
1544  bool operator!=(const FileVersion &other) const
1545  {
1546  return m_value != other.m_value;
1547  }
1550  bool operator<(const FileVersion &other) const
1551  {
1552  return m_value < other.m_value;
1553  }
1556  bool operator>(const FileVersion &other) const
1557  {
1558  return m_value > other.m_value;
1559  }
1562  friend std::ostream &operator<<(std::ostream &stream, const FileVersion &value)
1563  {
1564  return stream << value.toString();
1565  }
1566 
1568  friend std::istream &operator>>(std::istream &stream, FileVersion &value)
1569  {
1570  value.setFromString(
1571  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1572  return stream;
1573  }
1574 
1575  private:
1576  ValueType m_value{ "NA" };
1577  };
1578 
1580  class ZIVID_API_EXPORT ProductVersion
1581  {
1582  public:
1584  using ValueType = std::string;
1587  static constexpr bool isContainer{ false };
1590  static constexpr const char *path{ "SoftwareVersion/ZividCameraToshibaTeli/ProductVersion" };
1591 
1593  static constexpr const char *name{ "ProductVersion" };
1596  static constexpr const char *description{ R"description(Product version)description" };
1597 
1599  ProductVersion() = default;
1600 
1602  explicit ProductVersion(ValueType value) noexcept(
1603  std::is_nothrow_move_constructible<ValueType>::value)
1604  : m_value{ std::move(value) }
1605  {}
1606 
1608  const ValueType &value() const
1609  {
1610  return m_value;
1611  }
1612 
1614  void setFromString(const std::string &value)
1615  {
1616  m_value = value;
1617  }
1618 
1620  std::string toString() const
1621  {
1622  return m_value;
1623  }
1624 
1626  bool operator==(const ProductVersion &other) const
1627  {
1628  return m_value == other.m_value;
1629  }
1630 
1632  bool operator!=(const ProductVersion &other) const
1633  {
1634  return m_value != other.m_value;
1635  }
1636 
1638  bool operator<(const ProductVersion &other) const
1639  {
1640  return m_value < other.m_value;
1641  }
1642 
1644  bool operator>(const ProductVersion &other) const
1645  {
1646  return m_value > other.m_value;
1647  }
1648 
1650  friend std::ostream &operator<<(std::ostream &stream, const ProductVersion &value)
1651  {
1652  return stream << value.toString();
1653  }
1654 
1656  friend std::istream &operator>>(std::istream &stream, ProductVersion &value)
1657  {
1658  value.setFromString(
1659  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1660  return stream;
1661  }
1662 
1663  private:
1664  ValueType m_value{ "NA" };
1665  };
1667  template<typename T,
1668  typename std::enable_if<
1669  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments>::value,
1670  int>::type = 0>
1672  {
1673  return m_comments;
1674  }
1676  template<
1677  typename T,
1678  typename std::enable_if<
1679  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription>::value,
1680  int>::type = 0>
1682  {
1683  return m_fileDescription;
1684  }
1685 
1686  template<typename T,
1687  typename std::enable_if<
1688  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion>::value,
1689  int>::type = 0>
1691  {
1692  return m_fileVersion;
1693  }
1694 
1695  template<typename T,
1696  typename std::enable_if<
1697  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion>::value,
1698  int>::type = 0>
1700  {
1701  return m_productVersion;
1702  }
1703 
1704  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
1706  {
1707  return m_comments;
1708  }
1709 
1710  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
1712  {
1713  return m_fileDescription;
1714  }
1715 
1716  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
1718  {
1719  return m_fileVersion;
1720  }
1721 
1722  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
1724  {
1725  return m_productVersion;
1726  }
1727 
1729  explicit ZividCameraToshibaTeli(const Comments &comments,
1730  const FileDescription &fileDescription,
1731  const FileVersion &fileVersion,
1732  const ProductVersion &productVersion);
1733 
1734  private:
1735  Comments m_comments{};
1736 
1737  public:
1739  ZividCameraToshibaTeli &set(const Comments &value)
1740  {
1741  m_comments = value;
1742  return *this;
1743  }
1745  const Comments &comments() const
1746  {
1747  return m_comments;
1748  }
1749 
1750  private:
1751  FileDescription m_fileDescription{};
1752 
1753  public:
1755  ZividCameraToshibaTeli &set(const FileDescription &value)
1756  {
1757  m_fileDescription = value;
1758  return *this;
1759  }
1761  const FileDescription &fileDescription() const
1762  {
1763  return m_fileDescription;
1764  }
1765 
1766  private:
1767  FileVersion m_fileVersion{};
1768 
1769  public:
1771  ZividCameraToshibaTeli &set(const FileVersion &value)
1772  {
1773  m_fileVersion = value;
1774  return *this;
1775  }
1777  const FileVersion &fileVersion() const
1778  {
1779  return m_fileVersion;
1780  }
1781 
1782  private:
1783  ProductVersion m_productVersion{};
1785  public:
1787  ZividCameraToshibaTeli &set(const ProductVersion &value)
1788  {
1789  m_productVersion = value;
1790  return *this;
1791  }
1793  const ProductVersion &productVersion() const
1794  {
1795  return m_productVersion;
1796  }
1797 
1799  template<typename F>
1800  void forEach(const F &f) const
1801  {
1802  f(m_comments);
1803  f(m_fileDescription);
1804  f(m_fileVersion);
1805  f(m_productVersion);
1806  }
1807 
1809  template<typename F>
1810  void forEach(const F &f)
1811  {
1812  f(m_comments);
1813  f(m_fileDescription);
1814  f(m_fileVersion);
1815  f(m_productVersion);
1816  }
1817 
1819  template<typename F>
1820  void traverseValues(const F &f) const
1821  {
1822  f(m_comments);
1823  f(m_fileDescription);
1824  f(m_fileVersion);
1825  f(m_productVersion);
1826  }
1827 
1829  template<typename F>
1830  void traverseValues(const F &f)
1831  {
1832  f(m_comments);
1833  f(m_fileDescription);
1834  f(m_fileVersion);
1835  f(m_productVersion);
1836  }
1837 
1839  std::string toString() const;
1842  friend std::ostream &operator<<(std::ostream &stream, const ZividCameraToshibaTeli &value)
1843  {
1844  return stream << value.toString();
1845  }
1846 
1848  void setFromString(const std::string &value);
1849 
1851  friend std::istream &operator>>(std::istream &stream, ZividCameraToshibaTeli &value)
1852  {
1853  value.setFromString(
1854  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1855  return stream;
1856  }
1857 
1859  bool operator==(const ZividCameraToshibaTeli &other) const;
1860 
1862  bool operator!=(const ZividCameraToshibaTeli &other) const;
1863  };
1864 
1867  {
1868  public:
1870  ZividStudio() = default;
1871 
1873  static constexpr bool isContainer{ true };
1874 
1876  static constexpr const char *path{ "SoftwareVersion/ZividStudio" };
1877 
1879  static constexpr const char *name{ "ZividStudio" };
1880 
1882  static constexpr const char *description{
1883  R"description(Version information for the ZividStudio applicaton)description"
1884  };
1885 
1887  void set(const std::string &fullPath, const std::string &value);
1888 
1890  std::string getString(const std::string &fullPath) const;
1891 
1893  class ZIVID_API_EXPORT Comments
1894  {
1895  public:
1897  using ValueType = std::string;
1898 
1900  static constexpr bool isContainer{ false };
1901 
1903  static constexpr const char *path{ "SoftwareVersion/ZividStudio/Comments" };
1904 
1906  static constexpr const char *name{ "Comments" };
1907 
1909  static constexpr const char *description{ R"description(Comments)description" };
1910 
1912  Comments() = default;
1913 
1915  explicit Comments(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
1916  : m_value{ std::move(value) }
1917  {}
1918 
1920  const ValueType &value() const
1921  {
1922  return m_value;
1923  }
1924 
1926  void setFromString(const std::string &value)
1927  {
1928  m_value = value;
1929  }
1932  std::string toString() const
1933  {
1934  return m_value;
1935  }
1936 
1938  bool operator==(const Comments &other) const
1939  {
1940  return m_value == other.m_value;
1941  }
1942 
1944  bool operator!=(const Comments &other) const
1945  {
1946  return m_value != other.m_value;
1947  }
1948 
1950  bool operator<(const Comments &other) const
1951  {
1952  return m_value < other.m_value;
1953  }
1954 
1956  bool operator>(const Comments &other) const
1957  {
1958  return m_value > other.m_value;
1959  }
1960 
1962  friend std::ostream &operator<<(std::ostream &stream, const Comments &value)
1963  {
1964  return stream << value.toString();
1965  }
1966 
1968  friend std::istream &operator>>(std::istream &stream, Comments &value)
1969  {
1970  value.setFromString(
1971  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
1972  return stream;
1973  }
1974 
1975  private:
1976  ValueType m_value{ "NA" };
1977  };
1978 
1980  class ZIVID_API_EXPORT FileDescription
1981  {
1982  public:
1984  using ValueType = std::string;
1987  static constexpr bool isContainer{ false };
1990  static constexpr const char *path{ "SoftwareVersion/ZividStudio/FileDescription" };
1991 
1993  static constexpr const char *name{ "FileDescription" };
1996  static constexpr const char *description{ R"description(File description)description" };
1997 
1999  FileDescription() = default;
2000 
2002  explicit FileDescription(ValueType value) noexcept(
2003  std::is_nothrow_move_constructible<ValueType>::value)
2004  : m_value{ std::move(value) }
2005  {}
2006 
2008  const ValueType &value() const
2009  {
2010  return m_value;
2011  }
2012 
2014  void setFromString(const std::string &value)
2015  {
2016  m_value = value;
2017  }
2018 
2020  std::string toString() const
2021  {
2022  return m_value;
2023  }
2024 
2026  bool operator==(const FileDescription &other) const
2027  {
2028  return m_value == other.m_value;
2029  }
2030 
2032  bool operator!=(const FileDescription &other) const
2033  {
2034  return m_value != other.m_value;
2035  }
2036 
2038  bool operator<(const FileDescription &other) const
2039  {
2040  return m_value < other.m_value;
2041  }
2042 
2044  bool operator>(const FileDescription &other) const
2045  {
2046  return m_value > other.m_value;
2047  }
2048 
2050  friend std::ostream &operator<<(std::ostream &stream, const FileDescription &value)
2051  {
2052  return stream << value.toString();
2053  }
2054 
2056  friend std::istream &operator>>(std::istream &stream, FileDescription &value)
2057  {
2058  value.setFromString(
2059  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2060  return stream;
2061  }
2062 
2063  private:
2064  ValueType m_value{ "NA" };
2065  };
2069  {
2070  public:
2072  using ValueType = std::string;
2073 
2075  static constexpr bool isContainer{ false };
2076 
2078  static constexpr const char *path{ "SoftwareVersion/ZividStudio/FileVersion" };
2079 
2081  static constexpr const char *name{ "FileVersion" };
2082 
2084  static constexpr const char *description{ R"description(File version)description" };
2085 
2087  FileVersion() = default;
2088 
2090  explicit FileVersion(ValueType value) noexcept(std::is_nothrow_move_constructible<ValueType>::value)
2091  : m_value{ std::move(value) }
2092  {}
2095  const ValueType &value() const
2096  {
2097  return m_value;
2098  }
2101  void setFromString(const std::string &value)
2102  {
2103  m_value = value;
2104  }
2107  std::string toString() const
2108  {
2109  return m_value;
2110  }
2113  bool operator==(const FileVersion &other) const
2114  {
2115  return m_value == other.m_value;
2116  }
2119  bool operator!=(const FileVersion &other) const
2120  {
2121  return m_value != other.m_value;
2122  }
2125  bool operator<(const FileVersion &other) const
2126  {
2127  return m_value < other.m_value;
2128  }
2131  bool operator>(const FileVersion &other) const
2132  {
2133  return m_value > other.m_value;
2134  }
2137  friend std::ostream &operator<<(std::ostream &stream, const FileVersion &value)
2138  {
2139  return stream << value.toString();
2140  }
2141 
2143  friend std::istream &operator>>(std::istream &stream, FileVersion &value)
2144  {
2145  value.setFromString(
2146  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2147  return stream;
2148  }
2149 
2150  private:
2151  ValueType m_value{ "NA" };
2152  };
2153 
2155  class ZIVID_API_EXPORT ProductVersion
2156  {
2157  public:
2159  using ValueType = std::string;
2162  static constexpr bool isContainer{ false };
2165  static constexpr const char *path{ "SoftwareVersion/ZividStudio/ProductVersion" };
2166 
2168  static constexpr const char *name{ "ProductVersion" };
2171  static constexpr const char *description{ R"description(Product version)description" };
2172 
2174  ProductVersion() = default;
2175 
2177  explicit ProductVersion(ValueType value) noexcept(
2178  std::is_nothrow_move_constructible<ValueType>::value)
2179  : m_value{ std::move(value) }
2180  {}
2181 
2183  const ValueType &value() const
2184  {
2185  return m_value;
2186  }
2187 
2189  void setFromString(const std::string &value)
2190  {
2191  m_value = value;
2192  }
2193 
2195  std::string toString() const
2196  {
2197  return m_value;
2198  }
2199 
2201  bool operator==(const ProductVersion &other) const
2202  {
2203  return m_value == other.m_value;
2204  }
2205 
2207  bool operator!=(const ProductVersion &other) const
2208  {
2209  return m_value != other.m_value;
2210  }
2211 
2213  bool operator<(const ProductVersion &other) const
2214  {
2215  return m_value < other.m_value;
2216  }
2217 
2219  bool operator>(const ProductVersion &other) const
2220  {
2221  return m_value > other.m_value;
2222  }
2223 
2225  friend std::ostream &operator<<(std::ostream &stream, const ProductVersion &value)
2226  {
2227  return stream << value.toString();
2228  }
2229 
2231  friend std::istream &operator>>(std::istream &stream, ProductVersion &value)
2232  {
2233  value.setFromString(
2234  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2235  return stream;
2236  }
2237 
2238  private:
2239  ValueType m_value{ "NA" };
2240  };
2242  template<
2243  typename T,
2244  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::Comments>::value,
2245  int>::type = 0>
2247  {
2248  return m_comments;
2249  }
2251  template<typename T,
2252  typename std::enable_if<
2253  std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileDescription>::value,
2254  int>::type = 0>
2256  {
2257  return m_fileDescription;
2258  }
2259 
2260  template<typename T,
2261  typename std::enable_if<
2262  std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileVersion>::value,
2263  int>::type = 0>
2265  {
2266  return m_fileVersion;
2267  }
2269  template<typename T,
2270  typename std::enable_if<
2271  std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::ProductVersion>::value,
2272  int>::type = 0>
2274  {
2275  return m_productVersion;
2276  }
2277 
2278  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2280  {
2281  return m_comments;
2282  }
2283 
2284  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2286  {
2287  return m_fileDescription;
2288  }
2289 
2290  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2292  {
2293  return m_fileVersion;
2294  }
2295 
2296  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
2298  {
2299  return m_productVersion;
2300  }
2301 
2303  explicit ZividStudio(const Comments &comments,
2304  const FileDescription &fileDescription,
2305  const FileVersion &fileVersion,
2306  const ProductVersion &productVersion);
2307 
2308  private:
2309  Comments m_comments{};
2311  public:
2313  ZividStudio &set(const Comments &value)
2314  {
2315  m_comments = value;
2316  return *this;
2317  }
2319  const Comments &comments() const
2320  {
2321  return m_comments;
2322  }
2323 
2324  private:
2325  FileDescription m_fileDescription{};
2326 
2327  public:
2329  ZividStudio &set(const FileDescription &value)
2330  {
2331  m_fileDescription = value;
2332  return *this;
2333  }
2335  const FileDescription &fileDescription() const
2336  {
2337  return m_fileDescription;
2338  }
2339 
2340  private:
2341  FileVersion m_fileVersion{};
2342 
2343  public:
2345  ZividStudio &set(const FileVersion &value)
2346  {
2347  m_fileVersion = value;
2348  return *this;
2349  }
2351  const FileVersion &fileVersion() const
2352  {
2353  return m_fileVersion;
2354  }
2355 
2356  private:
2357  ProductVersion m_productVersion{};
2359  public:
2361  ZividStudio &set(const ProductVersion &value)
2362  {
2363  m_productVersion = value;
2364  return *this;
2365  }
2367  const ProductVersion &productVersion() const
2368  {
2369  return m_productVersion;
2370  }
2371 
2373  template<typename F>
2374  void forEach(const F &f) const
2375  {
2376  f(m_comments);
2377  f(m_fileDescription);
2378  f(m_fileVersion);
2379  f(m_productVersion);
2380  }
2381 
2383  template<typename F>
2384  void forEach(const F &f)
2385  {
2386  f(m_comments);
2387  f(m_fileDescription);
2388  f(m_fileVersion);
2389  f(m_productVersion);
2390  }
2391 
2393  template<typename F>
2394  void traverseValues(const F &f) const
2395  {
2396  f(m_comments);
2397  f(m_fileDescription);
2398  f(m_fileVersion);
2399  f(m_productVersion);
2400  }
2401 
2403  template<typename F>
2404  void traverseValues(const F &f)
2405  {
2406  f(m_comments);
2407  f(m_fileDescription);
2408  f(m_fileVersion);
2409  f(m_productVersion);
2410  }
2411 
2413  std::string toString() const;
2416  friend std::ostream &operator<<(std::ostream &stream, const ZividStudio &value)
2417  {
2418  return stream << value.toString();
2419  }
2420 
2422  void setFromString(const std::string &value);
2423 
2425  friend std::istream &operator>>(std::istream &stream, ZividStudio &value)
2426  {
2427  value.setFromString(
2428  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2429  return stream;
2430  }
2431 
2433  bool operator==(const ZividStudio &other) const;
2434 
2436  bool operator!=(const ZividStudio &other) const;
2437  };
2438 
2439  template<
2440  typename T,
2441  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI>::value, int>::type = 0>
2442  const FrameInfo::SoftwareVersion::ZividAPI &get() const
2443  {
2444  return m_zividAPI;
2445  }
2447  template<typename T,
2448  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::Comments>::value,
2449  int>::type = 0>
2451  {
2452  return m_zividAPI.get<FrameInfo::SoftwareVersion::ZividAPI::Comments>();
2453  }
2454 
2455  template<
2456  typename T,
2457  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileDescription>::value,
2458  int>::type = 0>
2460  {
2462  }
2464  template<typename T,
2465  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileVersion>::value,
2466  int>::type = 0>
2468  {
2469  return m_zividAPI.get<FrameInfo::SoftwareVersion::ZividAPI::FileVersion>();
2470  }
2471 
2472  template<
2473  typename T,
2474  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::ProductVersion>::value,
2475  int>::type = 0>
2477  {
2479  }
2480 
2481  template<typename T,
2482  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile>::value,
2483  int>::type = 0>
2485  {
2486  return m_zividCameraFile;
2487  }
2488 
2489  template<
2490  typename T,
2491  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::Comments>::value,
2492  int>::type = 0>
2494  {
2496  }
2497 
2498  template<typename T,
2499  typename std::enable_if<
2500  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription>::value,
2501  int>::type = 0>
2503  {
2505  }
2506 
2507  template<typename T,
2508  typename std::enable_if<
2509  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion>::value,
2510  int>::type = 0>
2512  {
2513  return m_zividCameraFile.get<FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion>();
2514  }
2515 
2516  template<typename T,
2517  typename std::enable_if<
2518  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion>::value,
2519  int>::type = 0>
2521  {
2522  return m_zividCameraFile.get<FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion>();
2523  }
2524 
2525  template<typename T,
2526  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli>::value,
2527  int>::type = 0>
2529  {
2530  return m_zividCameraToshibaTeli;
2531  }
2532 
2533  template<typename T,
2534  typename std::enable_if<
2535  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments>::value,
2536  int>::type = 0>
2538  {
2539  return m_zividCameraToshibaTeli.get<FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments>();
2540  }
2541 
2542  template<typename T,
2543  typename std::enable_if<
2544  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription>::value,
2545  int>::type = 0>
2547  {
2548  return m_zividCameraToshibaTeli
2550  }
2551 
2552  template<typename T,
2553  typename std::enable_if<
2554  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion>::value,
2555  int>::type = 0>
2557  {
2558  return m_zividCameraToshibaTeli.get<FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion>();
2559  }
2560 
2561  template<typename T,
2562  typename std::enable_if<
2563  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion>::value,
2564  int>::type = 0>
2566  {
2567  return m_zividCameraToshibaTeli
2569  }
2570 
2571  template<
2572  typename T,
2573  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio>::value, int>::type = 0>
2574  const FrameInfo::SoftwareVersion::ZividStudio &get() const
2575  {
2576  return m_zividStudio;
2577  }
2578 
2579  template<typename T,
2580  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::Comments>::value,
2581  int>::type = 0>
2583  {
2584  return m_zividStudio.get<FrameInfo::SoftwareVersion::ZividStudio::Comments>();
2585  }
2586 
2587  template<typename T,
2588  typename std::enable_if<
2589  std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileDescription>::value,
2590  int>::type = 0>
2592  {
2594  }
2595 
2596  template<
2597  typename T,
2598  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileVersion>::value,
2599  int>::type = 0>
2601  {
2602  return m_zividStudio.get<FrameInfo::SoftwareVersion::ZividStudio::FileVersion>();
2603  }
2604 
2605  template<
2606  typename T,
2607  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::ProductVersion>::value,
2608  int>::type = 0>
2610  {
2611  return m_zividStudio.get<FrameInfo::SoftwareVersion::ZividStudio::ProductVersion>();
2612  }
2613 
2614  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
2615  const FrameInfo::SoftwareVersion::ZividAPI &get() const
2616  {
2617  return m_zividAPI;
2618  }
2619 
2620  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
2622  {
2623  return m_zividCameraFile;
2624  }
2626  template<size_t i, typename std::enable_if<i == 2, int>::type = 0>
2628  {
2629  return m_zividCameraToshibaTeli;
2630  }
2631 
2632  template<size_t i, typename std::enable_if<i == 3, int>::type = 0>
2633  const FrameInfo::SoftwareVersion::ZividStudio &get() const
2634  {
2635  return m_zividStudio;
2636  }
2637 
2639  explicit SoftwareVersion(const ZividAPI &zividAPI,
2640  const ZividCameraFile &zividCameraFile,
2641  const ZividCameraToshibaTeli &zividCameraToshibaTeli,
2642  const ZividStudio &zividStudio);
2643 
2644  private:
2645  ZividAPI m_zividAPI{};
2646 
2647  public:
2649  SoftwareVersion &set(const ZividAPI &value)
2650  {
2651  m_zividAPI = value;
2652  return *this;
2653  }
2655  const ZividAPI &zividAPI() const
2656  {
2657  return m_zividAPI;
2658  }
2659 
2662  {
2663  m_zividAPI.set(value);
2664  return *this;
2665  }
2666 
2668  SoftwareVersion &set(const ZividAPI::FileDescription &value)
2669  {
2670  m_zividAPI.set(value);
2671  return *this;
2672  }
2673 
2675  SoftwareVersion &set(const ZividAPI::FileVersion &value)
2676  {
2677  m_zividAPI.set(value);
2678  return *this;
2679  }
2680 
2682  SoftwareVersion &set(const ZividAPI::ProductVersion &value)
2683  {
2684  m_zividAPI.set(value);
2685  return *this;
2686  }
2687 
2688  private:
2689  ZividCameraFile m_zividCameraFile{};
2690 
2691  public:
2693  SoftwareVersion &set(const ZividCameraFile &value)
2694  {
2695  m_zividCameraFile = value;
2696  return *this;
2697  }
2699  const ZividCameraFile &zividCameraFile() const
2700  {
2701  return m_zividCameraFile;
2702  }
2703 
2705  SoftwareVersion &set(const ZividCameraFile::Comments &value)
2706  {
2707  m_zividCameraFile.set(value);
2708  return *this;
2709  }
2710 
2713  {
2714  m_zividCameraFile.set(value);
2715  return *this;
2716  }
2717 
2719  SoftwareVersion &set(const ZividCameraFile::FileVersion &value)
2720  {
2721  m_zividCameraFile.set(value);
2722  return *this;
2723  }
2724 
2726  SoftwareVersion &set(const ZividCameraFile::ProductVersion &value)
2727  {
2728  m_zividCameraFile.set(value);
2729  return *this;
2730  }
2731 
2732  private:
2733  ZividCameraToshibaTeli m_zividCameraToshibaTeli{};
2735  public:
2737  SoftwareVersion &set(const ZividCameraToshibaTeli &value)
2738  {
2739  m_zividCameraToshibaTeli = value;
2740  return *this;
2741  }
2743  const ZividCameraToshibaTeli &zividCameraToshibaTeli() const
2744  {
2745  return m_zividCameraToshibaTeli;
2746  }
2750  {
2751  m_zividCameraToshibaTeli.set(value);
2752  return *this;
2753  }
2757  {
2758  m_zividCameraToshibaTeli.set(value);
2759  return *this;
2760  }
2764  {
2765  m_zividCameraToshibaTeli.set(value);
2766  return *this;
2767  }
2768 
2770  SoftwareVersion &set(const ZividCameraToshibaTeli::ProductVersion &value)
2771  {
2772  m_zividCameraToshibaTeli.set(value);
2773  return *this;
2774  }
2775 
2776  private:
2777  ZividStudio m_zividStudio{};
2779  public:
2781  SoftwareVersion &set(const ZividStudio &value)
2782  {
2783  m_zividStudio = value;
2784  return *this;
2785  }
2787  const ZividStudio &zividStudio() const
2788  {
2789  return m_zividStudio;
2790  }
2793  SoftwareVersion &set(const ZividStudio::Comments &value)
2794  {
2795  m_zividStudio.set(value);
2796  return *this;
2797  }
2801  {
2802  m_zividStudio.set(value);
2803  return *this;
2804  }
2807  SoftwareVersion &set(const ZividStudio::FileVersion &value)
2808  {
2809  m_zividStudio.set(value);
2810  return *this;
2811  }
2812 
2814  SoftwareVersion &set(const ZividStudio::ProductVersion &value)
2815  {
2816  m_zividStudio.set(value);
2817  return *this;
2818  }
2819 
2821  template<typename F>
2822  void forEach(const F &f) const
2823  {
2824  f(m_zividAPI);
2825  f(m_zividCameraFile);
2826  f(m_zividCameraToshibaTeli);
2827  f(m_zividStudio);
2828  }
2829 
2831  template<typename F>
2832  void forEach(const F &f)
2833  {
2834  f(m_zividAPI);
2835  f(m_zividCameraFile);
2836  f(m_zividCameraToshibaTeli);
2837  f(m_zividStudio);
2838  }
2839 
2841  template<typename F>
2842  void traverseValues(const F &f) const
2843  {
2844  m_zividAPI.traverseValues(f);
2845  m_zividCameraFile.traverseValues(f);
2846  m_zividCameraToshibaTeli.traverseValues(f);
2847  m_zividStudio.traverseValues(f);
2848  }
2851  template<typename F>
2852  void traverseValues(const F &f)
2853  {
2854  m_zividAPI.traverseValues(f);
2855  m_zividCameraFile.traverseValues(f);
2856  m_zividCameraToshibaTeli.traverseValues(f);
2857  m_zividStudio.traverseValues(f);
2858  }
2859 
2861  std::string toString() const;
2862 
2864  friend std::ostream &operator<<(std::ostream &stream, const SoftwareVersion &value)
2865  {
2866  return stream << value.toString();
2867  }
2868 
2870  void setFromString(const std::string &value);
2871 
2873  friend std::istream &operator>>(std::istream &stream, SoftwareVersion &value)
2874  {
2875  value.setFromString(
2876  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2877  return stream;
2878  }
2881  bool operator==(const SoftwareVersion &other) const;
2882 
2884  bool operator!=(const SoftwareVersion &other) const;
2885  };
2889  {
2890  public:
2892  using ValueType = std::chrono::system_clock::time_point;
2895  static constexpr bool isContainer{ false };
2896 
2898  static constexpr const char *path{ "TimeStamp" };
2899 
2901  static constexpr const char *name{ "TimeStamp" };
2902 
2904  static constexpr const char *description{ R"description(The time of frame capture)description" };
2905 
2907  TimeStamp() = default;
2908 
2910  explicit constexpr TimeStamp(ValueType value) noexcept(std::is_nothrow_copy_constructible<ValueType>::value)
2911  : m_value{ value }
2912  {}
2913 
2915  const ValueType &value() const
2916  {
2917  return m_value;
2918  }
2919 
2921  Range<ValueType> range() const
2922  {
2923  return { ValueType::min(), ValueType::max() };
2924  }
2925 
2927  void setFromString(const std::string &value);
2928 
2930  std::string toString() const;
2933  bool operator==(const TimeStamp &other) const
2934  {
2935  return m_value == other.m_value;
2936  }
2937 
2939  bool operator!=(const TimeStamp &other) const
2940  {
2941  return m_value != other.m_value;
2942  }
2945  bool operator<(const TimeStamp &other) const
2946  {
2947  return m_value < other.m_value;
2948  }
2949 
2951  bool operator>(const TimeStamp &other) const
2952  {
2953  return m_value > other.m_value;
2954  }
2955 
2957  friend std::ostream &operator<<(std::ostream &stream, const TimeStamp &value)
2958  {
2959  return stream << value.toString();
2960  }
2961 
2963  friend std::istream &operator>>(std::istream &stream, TimeStamp &value)
2964  {
2965  value.setFromString(
2966  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
2967  return stream;
2968  }
2969 
2970  private:
2971  ValueType m_value{};
2972  };
2973 
2974  template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion>::value, int>::type = 0>
2975  const FrameInfo::SoftwareVersion &get() const
2976  {
2977  return m_softwareVersion;
2978  }
2979 
2980  template<typename T,
2981  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI>::value, int>::type = 0>
2982  const FrameInfo::SoftwareVersion::ZividAPI &get() const
2983  {
2984  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividAPI>();
2985  }
2986 
2987  template<typename T,
2988  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::Comments>::value,
2989  int>::type = 0>
2991  {
2992  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividAPI::Comments>();
2993  }
2995  template<typename T,
2996  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileDescription>::value,
2997  int>::type = 0>
2999  {
3001  }
3002 
3003  template<typename T,
3004  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::FileVersion>::value,
3005  int>::type = 0>
3007  {
3008  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividAPI::FileVersion>();
3009  }
3010 
3011  template<typename T,
3012  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividAPI::ProductVersion>::value,
3013  int>::type = 0>
3015  {
3016  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividAPI::ProductVersion>();
3017  }
3019  template<
3020  typename T,
3021  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile>::value, int>::type = 0>
3023  {
3025  }
3026 
3027  template<typename T,
3028  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::Comments>::value,
3029  int>::type = 0>
3031  {
3032  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraFile::Comments>();
3033  }
3034 
3035  template<typename T,
3036  typename std::enable_if<
3037  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription>::value,
3038  int>::type = 0>
3040  {
3041  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription>();
3042  }
3043 
3044  template<
3045  typename T,
3046  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion>::value,
3047  int>::type = 0>
3049  {
3050  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion>();
3051  }
3052 
3053  template<
3054  typename T,
3055  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion>::value,
3056  int>::type = 0>
3058  {
3059  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion>();
3060  }
3062  template<typename T,
3063  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli>::value,
3064  int>::type = 0>
3066  {
3067  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraToshibaTeli>();
3068  }
3070  template<typename T,
3071  typename std::enable_if<
3072  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments>::value,
3073  int>::type = 0>
3075  {
3076  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments>();
3077  }
3078 
3079  template<typename T,
3080  typename std::enable_if<
3081  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription>::value,
3082  int>::type = 0>
3084  {
3086  }
3087 
3088  template<typename T,
3089  typename std::enable_if<
3090  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion>::value,
3091  int>::type = 0>
3093  {
3095  }
3096 
3097  template<typename T,
3098  typename std::enable_if<
3099  std::is_same<T, FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion>::value,
3100  int>::type = 0>
3102  {
3104  }
3105 
3106  template<
3107  typename T,
3108  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio>::value, int>::type = 0>
3110  {
3111  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividStudio>();
3112  }
3113 
3114  template<typename T,
3115  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::Comments>::value,
3116  int>::type = 0>
3118  {
3119  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividStudio::Comments>();
3120  }
3121 
3122  template<
3123  typename T,
3124  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileDescription>::value,
3125  int>::type = 0>
3127  {
3128  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividStudio::FileDescription>();
3129  }
3130 
3131  template<typename T,
3132  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::FileVersion>::value,
3133  int>::type = 0>
3135  {
3137  }
3138 
3139  template<
3140  typename T,
3141  typename std::enable_if<std::is_same<T, FrameInfo::SoftwareVersion::ZividStudio::ProductVersion>::value,
3142  int>::type = 0>
3144  {
3145  return m_softwareVersion.get<FrameInfo::SoftwareVersion::ZividStudio::ProductVersion>();
3146  }
3147 
3148  template<typename T, typename std::enable_if<std::is_same<T, FrameInfo::TimeStamp>::value, int>::type = 0>
3149  const FrameInfo::TimeStamp &get() const
3150  {
3151  return m_timeStamp;
3152  }
3154  template<size_t i, typename std::enable_if<i == 0, int>::type = 0>
3155  const FrameInfo::SoftwareVersion &get() const
3156  {
3157  return m_softwareVersion;
3158  }
3159 
3160  template<size_t i, typename std::enable_if<i == 1, int>::type = 0>
3161  const FrameInfo::TimeStamp &get() const
3162  {
3163  return m_timeStamp;
3164  }
3165 
3167  explicit FrameInfo(const SoftwareVersion &softwareVersion, const TimeStamp &timeStamp);
3168 
3169  private:
3170  SoftwareVersion m_softwareVersion{};
3172  public:
3174  FrameInfo &set(const SoftwareVersion &value)
3175  {
3176  m_softwareVersion = value;
3177  return *this;
3178  }
3180  const SoftwareVersion &softwareVersion() const
3181  {
3182  return m_softwareVersion;
3183  }
3184 
3186  FrameInfo &set(const SoftwareVersion::ZividAPI &value)
3187  {
3188  m_softwareVersion.set(value);
3189  return *this;
3190  }
3191 
3193  FrameInfo &set(const SoftwareVersion::ZividAPI::Comments &value)
3194  {
3195  m_softwareVersion.set(value);
3196  return *this;
3197  }
3198 
3200  FrameInfo &set(const SoftwareVersion::ZividAPI::FileDescription &value)
3201  {
3202  m_softwareVersion.set(value);
3203  return *this;
3204  }
3208  {
3209  m_softwareVersion.set(value);
3210  return *this;
3211  }
3212 
3214  FrameInfo &set(const SoftwareVersion::ZividAPI::ProductVersion &value)
3215  {
3216  m_softwareVersion.set(value);
3217  return *this;
3218  }
3219 
3221  FrameInfo &set(const SoftwareVersion::ZividCameraFile &value)
3222  {
3223  m_softwareVersion.set(value);
3224  return *this;
3225  }
3226 
3229  {
3230  m_softwareVersion.set(value);
3231  return *this;
3232  }
3233 
3235  FrameInfo &set(const SoftwareVersion::ZividCameraFile::FileDescription &value)
3236  {
3237  m_softwareVersion.set(value);
3238  return *this;
3239  }
3243  {
3244  m_softwareVersion.set(value);
3245  return *this;
3246  }
3247 
3249  FrameInfo &set(const SoftwareVersion::ZividCameraFile::ProductVersion &value)
3250  {
3251  m_softwareVersion.set(value);
3252  return *this;
3253  }
3254 
3256  FrameInfo &set(const SoftwareVersion::ZividCameraToshibaTeli &value)
3257  {
3258  m_softwareVersion.set(value);
3259  return *this;
3260  }
3261 
3263  FrameInfo &set(const SoftwareVersion::ZividCameraToshibaTeli::Comments &value)
3264  {
3265  m_softwareVersion.set(value);
3266  return *this;
3267  }
3268 
3270  FrameInfo &set(const SoftwareVersion::ZividCameraToshibaTeli::FileDescription &value)
3271  {
3272  m_softwareVersion.set(value);
3273  return *this;
3274  }
3275 
3277  FrameInfo &set(const SoftwareVersion::ZividCameraToshibaTeli::FileVersion &value)
3278  {
3279  m_softwareVersion.set(value);
3280  return *this;
3281  }
3282 
3284  FrameInfo &set(const SoftwareVersion::ZividCameraToshibaTeli::ProductVersion &value)
3285  {
3286  m_softwareVersion.set(value);
3287  return *this;
3288  }
3289 
3291  FrameInfo &set(const SoftwareVersion::ZividStudio &value)
3292  {
3293  m_softwareVersion.set(value);
3294  return *this;
3295  }
3296 
3298  FrameInfo &set(const SoftwareVersion::ZividStudio::Comments &value)
3299  {
3300  m_softwareVersion.set(value);
3301  return *this;
3302  }
3303 
3305  FrameInfo &set(const SoftwareVersion::ZividStudio::FileDescription &value)
3306  {
3307  m_softwareVersion.set(value);
3308  return *this;
3309  }
3310 
3312  FrameInfo &set(const SoftwareVersion::ZividStudio::FileVersion &value)
3313  {
3314  m_softwareVersion.set(value);
3315  return *this;
3316  }
3317 
3319  FrameInfo &set(const SoftwareVersion::ZividStudio::ProductVersion &value)
3320  {
3321  m_softwareVersion.set(value);
3322  return *this;
3323  }
3324 
3325  private:
3326  TimeStamp m_timeStamp{};
3327 
3328  public:
3330  FrameInfo &set(const TimeStamp &value)
3331  {
3332  if(value.value().time_since_epoch().count() < value.range().min().time_since_epoch().count()
3333  || value.value().time_since_epoch().count() > value.range().max().time_since_epoch().count())
3334  {
3335  throw std::out_of_range("TimeStamp{ " + std::to_string(value.value().time_since_epoch().count())
3336  + " } is not in range ["
3337  + std::to_string(value.range().min().time_since_epoch().count()) + ", "
3338  + std::to_string(value.range().max().time_since_epoch().count()) + "]");
3339  }
3340 
3341  m_timeStamp = value;
3342  return *this;
3343  }
3345  const TimeStamp &timeStamp() const
3346  {
3347  return m_timeStamp;
3348  }
3351  template<typename F>
3352  void forEach(const F &f) const
3353  {
3354  f(m_softwareVersion);
3355  f(m_timeStamp);
3356  }
3357 
3359  template<typename F>
3360  void forEach(const F &f)
3361  {
3362  f(m_softwareVersion);
3363  f(m_timeStamp);
3364  }
3365 
3367  template<typename F>
3368  void traverseValues(const F &f) const
3369  {
3370  m_softwareVersion.traverseValues(f);
3371  f(m_timeStamp);
3372  }
3373 
3375  template<typename F>
3376  void traverseValues(const F &f)
3377  {
3378  m_softwareVersion.traverseValues(f);
3379  f(m_timeStamp);
3380  }
3381 
3383  std::string toString() const;
3386  friend std::ostream &operator<<(std::ostream &stream, const FrameInfo &value)
3387  {
3388  return stream << value.toString();
3389  }
3390 
3392  void setFromString(const std::string &value);
3393 
3395  friend std::istream &operator>>(std::istream &stream, FrameInfo &value)
3396  {
3397  value.setFromString(
3398  std::string{ std::istreambuf_iterator<char>{ stream }, std::istreambuf_iterator<char>{} });
3399  return stream;
3400  }
3401 
3403  bool operator==(const FrameInfo &other) const;
3404 
3406  bool operator!=(const FrameInfo &other) const;
3407 
3409  explicit FrameInfo(const std::string &fileName);
3410 
3412  void save(const std::string &fileName) const;
3413 
3415  void load(const std::string &fileName);
3416  };
3417 
3418 #ifndef NO_DOC
3419  template<>
3420  struct FrameInfo::Version<1>
3421  {
3422  using Type = FrameInfo;
3423  };
3424 #endif
3425 
3426 } // namespace Zivid
3427 
3428 #ifdef _MSC_VER
3429 # pragma warning(pop)
3430 #endif
3432 #ifndef NO_DOC
3433 # if !(defined(_MSC_VER) && (_MSC_VER <= 1900))
3434 namespace std // NOLINT
3435 {
3436  template<>
3437  struct tuple_size<Zivid::FrameInfo::SoftwareVersion::ZividAPI> : integral_constant<size_t, 4>
3438  {};
3440  template<size_t i>
3441  struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion::ZividAPI>
3442  {
3443  using type // NOLINT
3444  = decltype(declval<Zivid::FrameInfo::SoftwareVersion::ZividAPI>().get<i>());
3445  };
3446 
3447  template<>
3448  struct tuple_size<Zivid::FrameInfo::SoftwareVersion::ZividCameraFile> : integral_constant<size_t, 4>
3449  {};
3450 
3451  template<size_t i>
3452  struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion::ZividCameraFile>
3453  {
3454  using type // NOLINT
3455  = decltype(declval<Zivid::FrameInfo::SoftwareVersion::ZividCameraFile>().get<i>());
3456  };
3457 
3458  template<>
3459  struct tuple_size<Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli> : integral_constant<size_t, 4>
3460  {};
3461 
3462  template<size_t i>
3463  struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli>
3464  {
3465  using type // NOLINT
3466  = decltype(declval<Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli>().get<i>());
3467  };
3468 
3469  template<>
3470  struct tuple_size<Zivid::FrameInfo::SoftwareVersion::ZividStudio> : integral_constant<size_t, 4>
3471  {};
3472 
3473  template<size_t i>
3475  {
3476  using type // NOLINT
3477  = decltype(declval<Zivid::FrameInfo::SoftwareVersion::ZividStudio>().get<i>());
3478  };
3479 
3480  template<>
3481  struct tuple_size<Zivid::FrameInfo::SoftwareVersion> : integral_constant<size_t, 4>
3482  {};
3483 
3484  template<size_t i>
3485  struct tuple_element<i, Zivid::FrameInfo::SoftwareVersion>
3486  {
3487  using type // NOLINT
3488  = decltype(declval<Zivid::FrameInfo::SoftwareVersion>().get<i>());
3489  };
3490 
3491  template<>
3492  struct tuple_size<Zivid::FrameInfo> : integral_constant<size_t, 2>
3493  {};
3494 
3495  template<size_t i>
3496  struct tuple_element<i, Zivid::FrameInfo>
3497  {
3498  using type // NOLINT
3499  = decltype(declval<Zivid::FrameInfo>().get<i>());
3500  };
3501 
3502 } // namespace std
3503 # endif
3504 #endif
Zivid::toString
ZIVID_API_EXPORT std::string toString(const std::exception &exception)
Get string representation of the exception
Zivid::FrameInfo::TimeStamp::range
Range< ValueType > range() const
The range of valid values
Definition: FrameInfo.h:3000
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:1037
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli
Version information for the ZividCameraToshibaTeli driver
Definition: FrameInfo.h:1370
Zivid::FrameInfo::SoftwareVersion::ZividAPI::ProductVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:552
Zivid::FrameInfo::set
void set(const std::string &fullPath, const std::string &value)
Set a value from string by specifying the path
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:1125
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileDescription::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:2063
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:1524
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:950
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1488
Zivid::FrameInfo::SoftwareVersion::ZividStudio
Version information for the ZividStudio applicaton
Definition: FrameInfo.h:1945
Zivid::FrameInfo::TimeStamp
The time of frame capture
Definition: FrameInfo.h:2967
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::Comments::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:827
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1089
Zivid::FrameInfo::SoftwareVersion::ZividAPI::Comments::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:254
Zivid::FrameInfo
Various information for a frame
Definition: FrameInfo.h:107
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::Comments
Comments
Definition: FrameInfo.h:823
Zivid::FrameInfo::get
const FrameInfo::SoftwareVersion::ZividCameraFile::Comments & get() const
Definition: FrameInfo.h:3109
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1663
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1576
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:1611
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1401
Zivid::FrameInfo::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid::FrameInfo::SoftwareVersion::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileDescription
File description
Definition: FrameInfo.h:337
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::get
const FrameInfo::SoftwareVersion::ZividCameraFile::Comments & get() const
Definition: FrameInfo.h:1176
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileVersion::setFromString
void setFromString(const std::string &value)
Set the value from string
Definition: FrameInfo.h:2180
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividAPI::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:2151
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileVersion::setFromString
void setFromString(const std::string &value)
Set the value from string
Definition: FrameInfo.h:458
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:429
Zivid::FrameInfo::SoftwareVersion::ZividStudio::Comments
Comments
Definition: FrameInfo.h:1972
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::ProductVersion
Product version
Definition: FrameInfo.h:1085
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion::setFromString
void setFromString(const std::string &value)
Set the value from string
Definition: FrameInfo.h:1605
Zivid::FrameInfo::SoftwareVersion::ZividAPI
Version information for the Zivid API library
Definition: FrameInfo.h:223
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription
File description
Definition: FrameInfo.h:910
Zivid::FrameInfo::SoftwareVersion::ZividAPI::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:1699
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion
File version
Definition: FrameInfo.h:998
Zivid::FrameInfo::SoftwareVersion::ZividAPI::ProductVersion
Product version
Definition: FrameInfo.h:512
Zivid::FrameInfo::SoftwareVersion::ZividAPI::ProductVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:516
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::ProductVersion
Product version
Definition: FrameInfo.h:1659
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileVersion
File version
Definition: FrameInfo.h:2147
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileVersion
File version
Definition: FrameInfo.h:425
Zivid::FrameInfo::SoftwareVersion::ZividStudio::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:464
Range.h
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileDescription::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:341
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileDescription::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:2099
Zivid::FrameInfo::SoftwareVersion::set
void set(const std::string &fullPath, const std::string &value)
Set a value from string by specifying the path
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileVersion
File version
Definition: FrameInfo.h:1572
Zivid::FrameInfo::SoftwareVersion::ZividStudio::Comments::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1976
APIExport.h
Zivid::FrameInfo::SoftwareVersion::ZividAPI::Comments
Comments
Definition: FrameInfo.h:250
Zivid::FrameInfo::SoftwareVersion::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::FileDescription
File description
Definition: FrameInfo.h:1484
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::get
const FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments & get() const
Definition: FrameInfo.h:1750
Zivid::FrameInfo::SoftwareVersion::ZividAPI::get
const FrameInfo::SoftwareVersion::ZividAPI::Comments & get() const
Definition: FrameInfo.h:602
Zivid::FrameInfo::SoftwareVersion
The version information for installed software at the time of image capture
Definition: FrameInfo.h:196
Zivid::FrameInfo::get
const FrameInfo::SoftwareVersion::ZividCameraFile & get() const
Definition: FrameInfo.h:3101
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileDescription::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:914
Zivid::FrameInfo::SoftwareVersion::get
const FrameInfo::SoftwareVersion::ZividAPI::FileVersion & get() const
Definition: FrameInfo.h:2546
Zivid::FrameInfo::TimeStamp::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividStudio::toString
std::string toString() const
Get the value as string
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::setFromString
void setFromString(const std::string &value)
Set from the given string
Zivid
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:52
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile
Version information for the ZividCameraFile driver
Definition: FrameInfo.h:796
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:2186
ZIVID_API_EXPORT
#define ZIVID_API_EXPORT
Definition: APIExport.h:56
Zivid::FrameInfo::SoftwareVersion::ZividStudio::FileDescription
File description
Definition: FrameInfo.h:2059
Zivid::FrameInfo::TimeStamp::value
const ValueType & value() const
Get the value
Definition: FrameInfo.h:2994
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion::setFromString
void setFromString(const std::string &value)
Set the value from string
Definition: FrameInfo.h:1031
Zivid::FrameInfo::SoftwareVersion::ZividCameraFile::FileVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:1002
Zivid::FrameInfo::SoftwareVersion::ZividStudio::ProductVersion::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:2274
Zivid::FrameInfo::SoftwareVersion::ZividStudio::ProductVersion
Product version
Definition: FrameInfo.h:2234
Zivid::operator<<
ZIVID_API_EXPORT std::ostream & operator<<(std::ostream &stream, const Camera &camera)
Serialize the value to a stream
Zivid::FrameInfo::SoftwareVersion::ZividStudio::ProductVersion::ValueType
std::string ValueType
The type of the underlying value
Definition: FrameInfo.h:2238
Zivid::FrameInfo::FrameInfo
FrameInfo()=default
Default constructor
Zivid::FrameInfo::SoftwareVersion::ZividAPI::FileDescription::toString
std::string toString() const
Get the value as string
Definition: FrameInfo.h:377
Zivid::FrameInfo::SoftwareVersion::ZividCameraToshibaTeli::Comments
Comments
Definition: FrameInfo.h:1397
Zivid::Range
Class describing a range of values for a given type T The range boudaries for both minimum and maximu...
Definition: Range.h:95
Zivid::FrameInfo::TimeStamp::ValueType
std::chrono::system_clock::time_point ValueType
The type of the underlying value
Definition: FrameInfo.h:2971