Zivid C++ API 2.13.1+18e79e79-1
Zivid::Detail::EnvironmentInfo::Platform Class Reference

Information about the current platform. More...

#include <Zivid/Detail/EnvironmentInfo.h>

Classes

class  CPU
 Information about the CPU. More...
 
class  OS
 Operation system name and version. More...
 

Public Types

using Descendants
 

Public Member Functions

 Platform ()
 Default constructor.
 
template<typename... Args>
 Platform (Args &&...args)
 Constructor taking variadic number of arguments.
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
 
template<typename... Args>
Platform copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
 
const CPUcpu () const
 Get CPU.
 
CPUcpu ()
 Get CPU.
 
Platformset (const CPU &value)
 Set CPU.
 
Platformset (const CPU::Architecture &value)
 Set CPU::Architecture.
 
Platformset (const CPU::ModelName &value)
 Set CPU::ModelName.
 
const OSos () const
 Get OS.
 
OSos ()
 Get OS.
 
Platformset (const OS &value)
 Set OS.
 
Platformset (const OS::ID &value)
 Set OS::ID.
 
Platformset (const OS::Version &value)
 Set OS::Version.
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::CPU >::value, int >::type = 0>
const EnvironmentInfo::Platform::CPUget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::CPU::Architecture >::value, int >::type = 0>
const EnvironmentInfo::Platform::CPU::Architectureget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::CPU::ModelName >::value, int >::type = 0>
const EnvironmentInfo::Platform::CPU::ModelNameget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS >::value, int >::type = 0>
const EnvironmentInfo::Platform::OSget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS::ID >::value, int >::type = 0>
const EnvironmentInfo::Platform::OS::IDget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS::Version >::value, int >::type = 0>
const EnvironmentInfo::Platform::OS::Versionget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const EnvironmentInfo::Platform::CPUget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const EnvironmentInfo::Platform::OSget () 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 Platform &other) const
 Equality operator.
 
bool operator!= (const Platform &other) const
 Inequality operator.
 
std::string toString () const
 Get the value as string.
 

Static Public Attributes

static constexpr DataModel::NodeType nodeType = DataModel::NodeType::group
 The type of this node.
 
static constexpr const char * path { "Platform" }
 The full path for this value.
 
static constexpr const char * name { "Platform" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 

Friends

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

Detailed Description

Information about the current platform.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
EnvironmentInfo::Platform::CPU,
EnvironmentInfo::Platform::CPU::Architecture,
EnvironmentInfo::Platform::CPU::ModelName,
EnvironmentInfo::Platform::OS,
EnvironmentInfo::Platform::OS::ID,
EnvironmentInfo::Platform::OS::Version>

Constructor & Destructor Documentation

◆ Platform() [1/2]

Zivid::Detail::EnvironmentInfo::Platform::Platform ( )

Default constructor.

◆ Platform() [2/2]

template<typename... Args>
Zivid::Detail::EnvironmentInfo::Platform::Platform ( 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 Platform then invoking set(args).

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

Member Function Documentation

◆ copyWith()

template<typename... Args>
Platform Zivid::Detail::EnvironmentInfo::Platform::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 Platform 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 Platform. These types can be provided:

◆ cpu() [1/2]

CPU & Zivid::Detail::EnvironmentInfo::Platform::cpu ( )
inline

Get CPU.

◆ cpu() [2/2]

const CPU & Zivid::Detail::EnvironmentInfo::Platform::cpu ( ) const
inline

Get CPU.

◆ forEach() [1/2]

template<typename F >
void Zivid::Detail::EnvironmentInfo::Platform::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::Detail::EnvironmentInfo::Platform::forEach ( const F & f) const
inline

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

◆ get() [1/8]

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

◆ get() [2/8]

template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::CPU::Architecture >::value, int >::type = 0>
const EnvironmentInfo::Platform::CPU::Architecture & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [3/8]

template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::CPU::ModelName >::value, int >::type = 0>
const EnvironmentInfo::Platform::CPU::ModelName & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [4/8]

template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS >::value, int >::type = 0>
const EnvironmentInfo::Platform::OS & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [5/8]

template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS::ID >::value, int >::type = 0>
const EnvironmentInfo::Platform::OS::ID & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [6/8]

template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform::OS::Version >::value, int >::type = 0>
const EnvironmentInfo::Platform::OS::Version & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [7/8]

template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const EnvironmentInfo::Platform::CPU & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ get() [8/8]

template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const EnvironmentInfo::Platform::OS & Zivid::Detail::EnvironmentInfo::Platform::get ( ) const
inline

◆ operator!=()

bool Zivid::Detail::EnvironmentInfo::Platform::operator!= ( const Platform & other) const

Inequality operator.

◆ operator==()

bool Zivid::Detail::EnvironmentInfo::Platform::operator== ( const Platform & other) const

Equality operator.

◆ os() [1/2]

OS & Zivid::Detail::EnvironmentInfo::Platform::os ( )
inline

Get OS.

◆ os() [2/2]

const OS & Zivid::Detail::EnvironmentInfo::Platform::os ( ) const
inline

Get OS.

◆ set() [1/7]

template<typename... Args>
void Zivid::Detail::EnvironmentInfo::Platform::set ( Args &&... args)
inline

Set multiple arguments.

The method invokes set(arg) with each of the provided arguments.

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

◆ set() [2/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const CPU & value)
inline

Set CPU.

◆ set() [3/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const CPU::Architecture & value)
inline

◆ set() [4/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const CPU::ModelName & value)
inline

◆ set() [5/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const OS & value)
inline

Set OS.

◆ set() [6/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const OS::ID & value)
inline

Set OS::ID.

◆ set() [7/7]

Platform & Zivid::Detail::EnvironmentInfo::Platform::set ( const OS::Version & value)
inline

◆ toString()

std::string Zivid::Detail::EnvironmentInfo::Platform::toString ( ) const

Get the value as string.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< Platform >

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

◆ operator<<

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

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

const char* Zivid::Detail::EnvironmentInfo::Platform::description
staticconstexpr
Initial value:
{
R"description(Information about the current platform)description"
}

The description for this value.

◆ name

const char* Zivid::Detail::EnvironmentInfo::Platform::name { "Platform" }
staticconstexpr

The name of this value.

◆ nodeType

DataModel::NodeType Zivid::Detail::EnvironmentInfo::Platform::nodeType = DataModel::NodeType::group
staticconstexpr

The type of this node.

◆ path

const char* Zivid::Detail::EnvironmentInfo::Platform::path { "Platform" }
staticconstexpr

The full path for this value.


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