Zivid C++ API 2.13.1+18e79e79-1
Zivid::FrameInfo Class Reference

Various information for a frame. More...

#include <Zivid/FrameInfo.h>

Classes

class  SoftwareVersion
 The version information for installed software at the time of image capture. More...
 
class  SystemInfo
 Information about the system that captured this frame. More...
 
class  TimeStamp
 The time of frame capture. More...
 

Public Types

using Descendants
 

Public Member Functions

 FrameInfo ()
 Default constructor.
 
 FrameInfo (const std::string &fileName)
 Construct FrameInfo by loading from file.
 
std::string serialize () const
 Serialize to a string.
 
template<typename... Args>
 FrameInfo (Args &&...args)
 Constructor taking variadic number of arguments.
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
 
template<typename... Args>
FrameInfo copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
 
const SoftwareVersionsoftwareVersion () const
 Get SoftwareVersion.
 
SoftwareVersionsoftwareVersion ()
 Get SoftwareVersion.
 
FrameInfoset (const SoftwareVersion &value)
 Set SoftwareVersion.
 
FrameInfoset (const SoftwareVersion::Core &value)
 Set SoftwareVersion::Core.
 
const SystemInfosystemInfo () const
 Get SystemInfo.
 
SystemInfosystemInfo ()
 Get SystemInfo.
 
FrameInfoset (const SystemInfo &value)
 Set SystemInfo.
 
FrameInfoset (const SystemInfo::CPU &value)
 Set SystemInfo::CPU.
 
FrameInfoset (const SystemInfo::CPU::Model &value)
 Set SystemInfo::CPU::Model.
 
FrameInfoset (const SystemInfo::ComputeDevice &value)
 Set SystemInfo::ComputeDevice.
 
FrameInfoset (const SystemInfo::ComputeDevice::Model &value)
 Set SystemInfo::ComputeDevice::Model.
 
FrameInfoset (const SystemInfo::ComputeDevice::Vendor &value)
 Set SystemInfo::ComputeDevice::Vendor.
 
FrameInfoset (const SystemInfo::OperatingSystem &value)
 Set SystemInfo::OperatingSystem.
 
const TimeStamptimeStamp () const
 Get TimeStamp.
 
TimeStamptimeStamp ()
 Get TimeStamp.
 
FrameInfoset (const TimeStamp &value)
 Set TimeStamp.
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SoftwareVersion >::value, int >::type = 0>
const FrameInfo::SoftwareVersionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SoftwareVersion::Core >::value, int >::type = 0>
const FrameInfo::SoftwareVersion::Coreget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo >::value, int >::type = 0>
const FrameInfo::SystemInfoget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::CPU >::value, int >::type = 0>
const FrameInfo::SystemInfo::CPUget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::CPU::Model >::value, int >::type = 0>
const FrameInfo::SystemInfo::CPU::Modelget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDeviceget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice::Model >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDevice::Modelget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice::Vendor >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDevice::Vendorget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::OperatingSystem >::value, int >::type = 0>
const FrameInfo::SystemInfo::OperatingSystemget () const
 
template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::TimeStamp >::value, int >::type = 0>
const FrameInfo::TimeStampget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const FrameInfo::SoftwareVersionget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const FrameInfo::SystemInfoget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const FrameInfo::TimeStampget () const
 
template<typename F >
void forEach (const F &f) const
 Run the given function on each direct member with the value of the member as parameter.
 
template<typename F >
void forEach (const F &f)
 Run the given function on each direct member with the value of the member as parameter.
 
bool operator== (const FrameInfo &other) const
 Equality operator.
 
bool operator!= (const FrameInfo &other) const
 Inequality operator.
 
std::string toString () const
 Get the value as string.
 
void save (const std::string &fileName) const
 Save to the given file.
 
void load (const std::string &fileName)
 Load from the given file.
 

Static Public Member Functions

static ZIVID_NODISCARD FrameInfo fromSerialized (const std::string &value)
 Construct a new FrameInfo instance from a previously serialized string.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node.
 
static constexpr const char * path { "" }
 The full path for this value.
 
static constexpr const char * name { "FrameInfo" }
 The name of this value.
 
static constexpr const char * description { R"description(Various information for a frame)description" }
 The description for this value.
 
static constexpr size_t version { 3 }
 

Friends

struct DataModel::Detail::Befriend< FrameInfo >
 
std::ostream & operator<< (std::ostream &stream, const FrameInfo &value)
 Operator to send the value as string to a stream.
 

Detailed Description

Various information for a frame.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
FrameInfo::SoftwareVersion,
FrameInfo::SoftwareVersion::Core,
FrameInfo::SystemInfo,
FrameInfo::SystemInfo::CPU,
FrameInfo::SystemInfo::CPU::Model,
FrameInfo::SystemInfo::ComputeDevice,
FrameInfo::SystemInfo::ComputeDevice::Model,
FrameInfo::SystemInfo::ComputeDevice::Vendor,
FrameInfo::SystemInfo::OperatingSystem,
FrameInfo::TimeStamp>

Constructor & Destructor Documentation

◆ FrameInfo() [1/3]

Zivid::FrameInfo::FrameInfo ( )

Default constructor.

◆ FrameInfo() [2/3]

Zivid::FrameInfo::FrameInfo ( const std::string & fileName)
explicit

Construct FrameInfo by loading from file.

◆ FrameInfo() [3/3]

template<typename... Args>
Zivid::FrameInfo::FrameInfo ( Args &&... args)
inlineexplicit

Constructor taking variadic number of arguments.

One or more descendant types can be provided. All types not provided will be set to their default value. The result is the same as default constructing FrameInfo then invoking set(args).

The provided arguments must be descendants of FrameInfo. These types can be provided:

Member Function Documentation

◆ copyWith()

template<typename... Args>
FrameInfo Zivid::FrameInfo::copyWith ( Args &&... args) const
inline

Returns a copy of this object with the given argument(s) set to the new value(s)

Creates a copy of this FrameInfo object, then invokes set(args) on the copy, and finally returns the copy. This method does not modify the original object.

The provided arguments must be descendants of FrameInfo. These types can be provided:

◆ forEach() [1/2]

template<typename F >
void Zivid::FrameInfo::forEach ( const F & f)
inline

Run the given function on each direct member with the value of the member as parameter.

◆ forEach() [2/2]

template<typename F >
void Zivid::FrameInfo::forEach ( const F & f) const
inline

Run the given function on each direct member with the value of the member as parameter.

◆ fromSerialized()

static ZIVID_NODISCARD FrameInfo Zivid::FrameInfo::fromSerialized ( const std::string & value)
static

Construct a new FrameInfo instance from a previously serialized string.

See also serialize.

◆ get() [1/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SoftwareVersion >::value, int >::type = 0>
const FrameInfo::SoftwareVersion & Zivid::FrameInfo::get ( ) const
inline

◆ get() [2/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SoftwareVersion::Core >::value, int >::type = 0>
const FrameInfo::SoftwareVersion::Core & Zivid::FrameInfo::get ( ) const
inline

◆ get() [3/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo >::value, int >::type = 0>
const FrameInfo::SystemInfo & Zivid::FrameInfo::get ( ) const
inline

◆ get() [4/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::CPU >::value, int >::type = 0>
const FrameInfo::SystemInfo::CPU & Zivid::FrameInfo::get ( ) const
inline

◆ get() [5/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::CPU::Model >::value, int >::type = 0>
const FrameInfo::SystemInfo::CPU::Model & Zivid::FrameInfo::get ( ) const
inline

◆ get() [6/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDevice & Zivid::FrameInfo::get ( ) const
inline

◆ get() [7/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice::Model >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDevice::Model & Zivid::FrameInfo::get ( ) const
inline

◆ get() [8/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::ComputeDevice::Vendor >::value, int >::type = 0>
const FrameInfo::SystemInfo::ComputeDevice::Vendor & Zivid::FrameInfo::get ( ) const
inline

◆ get() [9/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::SystemInfo::OperatingSystem >::value, int >::type = 0>
const FrameInfo::SystemInfo::OperatingSystem & Zivid::FrameInfo::get ( ) const
inline

◆ get() [10/13]

template<typename T , typename std::enable_if< std::is_same< T, FrameInfo::TimeStamp >::value, int >::type = 0>
const FrameInfo::TimeStamp & Zivid::FrameInfo::get ( ) const
inline

◆ get() [11/13]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const FrameInfo::SoftwareVersion & Zivid::FrameInfo::get ( ) const
inline

◆ get() [12/13]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const FrameInfo::SystemInfo & Zivid::FrameInfo::get ( ) const
inline

◆ get() [13/13]

template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const FrameInfo::TimeStamp & Zivid::FrameInfo::get ( ) const
inline

◆ load()

void Zivid::FrameInfo::load ( const std::string & fileName)

Load from the given file.

◆ operator!=()

bool Zivid::FrameInfo::operator!= ( const FrameInfo & other) const

Inequality operator.

◆ operator==()

bool Zivid::FrameInfo::operator== ( const FrameInfo & other) const

Equality operator.

◆ save()

void Zivid::FrameInfo::save ( const std::string & fileName) const

Save to the given file.

◆ serialize()

std::string Zivid::FrameInfo::serialize ( ) const

Serialize to a string.

See also fromSerialized. The returned string is formatted in YAML, and is compatible with the contents of files saved using save.

◆ set() [1/11]

template<typename... Args>
void Zivid::FrameInfo::set ( Args &&... args)
inline

◆ set() [2/11]

FrameInfo & Zivid::FrameInfo::set ( const SoftwareVersion & value)
inline

◆ set() [3/11]

FrameInfo & Zivid::FrameInfo::set ( const SoftwareVersion::Core & value)
inline

◆ set() [4/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo & value)
inline

Set SystemInfo.

◆ set() [5/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::ComputeDevice & value)
inline

◆ set() [6/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::ComputeDevice::Model & value)
inline

◆ set() [7/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::ComputeDevice::Vendor & value)
inline

◆ set() [8/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::CPU & value)
inline

◆ set() [9/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::CPU::Model & value)
inline

◆ set() [10/11]

FrameInfo & Zivid::FrameInfo::set ( const SystemInfo::OperatingSystem & value)
inline

◆ set() [11/11]

FrameInfo & Zivid::FrameInfo::set ( const TimeStamp & value)
inline

Set TimeStamp.

◆ softwareVersion() [1/2]

SoftwareVersion & Zivid::FrameInfo::softwareVersion ( )
inline

◆ softwareVersion() [2/2]

const SoftwareVersion & Zivid::FrameInfo::softwareVersion ( ) const
inline

◆ systemInfo() [1/2]

SystemInfo & Zivid::FrameInfo::systemInfo ( )
inline

Get SystemInfo.

◆ systemInfo() [2/2]

const SystemInfo & Zivid::FrameInfo::systemInfo ( ) const
inline

Get SystemInfo.

◆ timeStamp() [1/2]

TimeStamp & Zivid::FrameInfo::timeStamp ( )
inline

Get TimeStamp.

◆ timeStamp() [2/2]

const TimeStamp & Zivid::FrameInfo::timeStamp ( ) const
inline

Get TimeStamp.

◆ toString()

std::string Zivid::FrameInfo::toString ( ) const

Get the value as string.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< FrameInfo >

friend struct DataModel::Detail::Befriend< FrameInfo >
friend

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const FrameInfo & value )
friend

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

const char* Zivid::FrameInfo::description { R"description(Various information for a frame)description" }
staticconstexpr

The description for this value.

◆ name

const char* Zivid::FrameInfo::name { "FrameInfo" }
staticconstexpr

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::FrameInfo::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node.

◆ path

const char* Zivid::FrameInfo::path { "" }
staticconstexpr

The full path for this value.

◆ version

size_t Zivid::FrameInfo::version { 3 }
staticconstexpr

The documentation for this class was generated from the following file: