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

Information about the current toolchain and platform. More...

#include <Zivid/Detail/EnvironmentInfo.h>

Classes

class  Platform
 Information about the current platform. More...
 
class  UserToolchain
 Information about the current toolchain. More...
 
class  Wrapper
 The wrapper being used, if any. More...
 

Public Types

using Descendants
 

Public Member Functions

 EnvironmentInfo ()
 Default constructor.
 
 EnvironmentInfo (const std::string &fileName)
 Construct EnvironmentInfo by loading from file.
 
std::string serialize () const
 Serialize to a string.
 
template<typename... Args>
 EnvironmentInfo (Args &&...args)
 Constructor taking variadic number of arguments.
 
template<typename... Args>
void set (Args &&...args)
 Set multiple arguments.
 
template<typename... Args>
EnvironmentInfo copyWith (Args &&...args) const
 Returns a copy of this object with the given argument(s) set to the new value(s)
 
const Platformplatform () const
 Get Platform.
 
Platformplatform ()
 Get Platform.
 
EnvironmentInfoset (const Platform &value)
 Set Platform.
 
EnvironmentInfoset (const Platform::CPU &value)
 Set Platform::CPU.
 
EnvironmentInfoset (const Platform::CPU::Architecture &value)
 Set Platform::CPU::Architecture.
 
EnvironmentInfoset (const Platform::CPU::ModelName &value)
 Set Platform::CPU::ModelName.
 
EnvironmentInfoset (const Platform::OS &value)
 Set Platform::OS.
 
EnvironmentInfoset (const Platform::OS::ID &value)
 Set Platform::OS::ID.
 
EnvironmentInfoset (const Platform::OS::Version &value)
 Set Platform::OS::Version.
 
const UserToolchainuserToolchain () const
 Get UserToolchain.
 
UserToolchainuserToolchain ()
 Get UserToolchain.
 
EnvironmentInfoset (const UserToolchain &value)
 Set UserToolchain.
 
EnvironmentInfoset (const UserToolchain::Compiler &value)
 Set UserToolchain::Compiler.
 
EnvironmentInfoset (const UserToolchain::Compiler::ID &value)
 Set UserToolchain::Compiler::ID.
 
EnvironmentInfoset (const UserToolchain::Compiler::Version &value)
 Set UserToolchain::Compiler::Version.
 
EnvironmentInfoset (const UserToolchain::CxxStandard &value)
 Set UserToolchain::CxxStandard.
 
EnvironmentInfoset (const UserToolchain::StandardLibrary &value)
 Set UserToolchain::StandardLibrary.
 
EnvironmentInfoset (const UserToolchain::StandardLibrary::ID &value)
 Set UserToolchain::StandardLibrary::ID.
 
EnvironmentInfoset (const UserToolchain::StandardLibrary::Version &value)
 Set UserToolchain::StandardLibrary::Version.
 
const Wrapperwrapper () const
 Get Wrapper.
 
Wrapperwrapper ()
 Get Wrapper.
 
EnvironmentInfoset (const Wrapper &value)
 Set Wrapper.
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Platform >::value, int >::type = 0>
const EnvironmentInfo::Platformget () const
 
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<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain >::value, int >::type = 0>
const EnvironmentInfo::UserToolchainget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::Compiler >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::Compilerget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::Compiler::ID >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::Compiler::IDget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::Compiler::Version >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::Compiler::Versionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::CxxStandard >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::CxxStandardget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::StandardLibrary >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::StandardLibraryget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::StandardLibrary::ID >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::StandardLibrary::IDget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::UserToolchain::StandardLibrary::Version >::value, int >::type = 0>
const EnvironmentInfo::UserToolchain::StandardLibrary::Versionget () const
 
template<typename T , typename std::enable_if< std::is_same< T, EnvironmentInfo::Wrapper >::value, int >::type = 0>
const EnvironmentInfo::Wrapperget () const
 
template<size_t i, typename std::enable_if< i==0, int >::type = 0>
const EnvironmentInfo::Platformget () const
 
template<size_t i, typename std::enable_if< i==1, int >::type = 0>
const EnvironmentInfo::UserToolchainget () const
 
template<size_t i, typename std::enable_if< i==2, int >::type = 0>
const EnvironmentInfo::Wrapperget () 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 EnvironmentInfo &other) const
 Equality operator.
 
bool operator!= (const EnvironmentInfo &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 EnvironmentInfo fromSerialized (const std::string &value)
 Construct a new EnvironmentInfo 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 { "EnvironmentInfo" }
 The name of this value.
 
static constexpr const char * description
 The description for this value.
 
static constexpr size_t version { 1 }
 

Friends

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

Detailed Description

Information about the current toolchain and platform.

Member Typedef Documentation

◆ Descendants

Initial value:
std::tuple<
EnvironmentInfo::Platform,
EnvironmentInfo::Platform::CPU,
EnvironmentInfo::Platform::CPU::Architecture,
EnvironmentInfo::Platform::CPU::ModelName,
EnvironmentInfo::Platform::OS,
EnvironmentInfo::Platform::OS::ID,
EnvironmentInfo::Platform::OS::Version,
EnvironmentInfo::UserToolchain,
EnvironmentInfo::UserToolchain::Compiler,
EnvironmentInfo::UserToolchain::Compiler::ID,
EnvironmentInfo::UserToolchain::Compiler::Version,
EnvironmentInfo::UserToolchain::CxxStandard,
EnvironmentInfo::UserToolchain::StandardLibrary,
EnvironmentInfo::UserToolchain::StandardLibrary::ID,
EnvironmentInfo::UserToolchain::StandardLibrary::Version,
EnvironmentInfo::Wrapper>

Constructor & Destructor Documentation

◆ EnvironmentInfo() [1/3]

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

Default constructor.

◆ EnvironmentInfo() [2/3]

Zivid::Detail::EnvironmentInfo::EnvironmentInfo ( const std::string & fileName)
explicit

Construct EnvironmentInfo by loading from file.

◆ EnvironmentInfo() [3/3]

Member Function Documentation

◆ copyWith()

◆ forEach() [1/2]

template<typename F >
void Zivid::Detail::EnvironmentInfo::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::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 EnvironmentInfo Zivid::Detail::EnvironmentInfo::fromSerialized ( const std::string & value)
static

Construct a new EnvironmentInfo instance from a previously serialized string.

See also serialize.

◆ get() [1/19]

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

◆ get() [2/19]

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::get ( ) const
inline

◆ get() [3/19]

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::get ( ) const
inline

◆ get() [4/19]

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::get ( ) const
inline

◆ get() [5/19]

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::get ( ) const
inline

◆ get() [6/19]

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::get ( ) const
inline

◆ get() [7/19]

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::get ( ) const
inline

◆ get() [8/19]

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

◆ get() [9/19]

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

◆ get() [10/19]

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

◆ get() [11/19]

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

◆ get() [12/19]

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

◆ get() [13/19]

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

◆ get() [14/19]

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

◆ get() [15/19]

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

◆ get() [16/19]

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

◆ get() [17/19]

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

◆ get() [18/19]

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

◆ get() [19/19]

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

◆ load()

void Zivid::Detail::EnvironmentInfo::load ( const std::string & fileName)

Load from the given file.

◆ operator!=()

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

Inequality operator.

◆ operator==()

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

Equality operator.

◆ platform() [1/2]

Platform & Zivid::Detail::EnvironmentInfo::platform ( )
inline

Get Platform.

◆ platform() [2/2]

const Platform & Zivid::Detail::EnvironmentInfo::platform ( ) const
inline

Get Platform.

◆ save()

void Zivid::Detail::EnvironmentInfo::save ( const std::string & fileName) const

Save to the given file.

◆ serialize()

std::string Zivid::Detail::EnvironmentInfo::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/17]

◆ set() [2/17]

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

Set Platform.

◆ set() [3/17]

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

◆ set() [4/17]

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

◆ set() [5/17]

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

◆ set() [6/17]

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

◆ set() [7/17]

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

◆ set() [8/17]

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

◆ set() [9/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain & value)
inline

◆ set() [10/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::Compiler & value)
inline

◆ set() [11/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::Compiler::ID & value)
inline

◆ set() [12/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::Compiler::Version & value)
inline

◆ set() [13/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::CxxStandard & value)
inline

◆ set() [14/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::StandardLibrary & value)
inline

◆ set() [15/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::StandardLibrary::ID & value)
inline

◆ set() [16/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const UserToolchain::StandardLibrary::Version & value)
inline

◆ set() [17/17]

EnvironmentInfo & Zivid::Detail::EnvironmentInfo::set ( const Wrapper & value)
inline

Set Wrapper.

◆ toString()

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

Get the value as string.

◆ userToolchain() [1/2]

UserToolchain & Zivid::Detail::EnvironmentInfo::userToolchain ( )
inline

◆ userToolchain() [2/2]

const UserToolchain & Zivid::Detail::EnvironmentInfo::userToolchain ( ) const
inline

◆ wrapper() [1/2]

Wrapper & Zivid::Detail::EnvironmentInfo::wrapper ( )
inline

Get Wrapper.

◆ wrapper() [2/2]

const Wrapper & Zivid::Detail::EnvironmentInfo::wrapper ( ) const
inline

Get Wrapper.

Friends And Related Symbol Documentation

◆ DataModel::Detail::Befriend< EnvironmentInfo >

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

◆ operator<<

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

Operator to send the value as string to a stream.

Member Data Documentation

◆ description

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

The description for this value.

◆ name

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

The name of this value.

◆ nodeType

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

The type of this node.

◆ path

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

The full path for this value.

◆ version

size_t Zivid::Detail::EnvironmentInfo::version { 1 }
staticconstexpr

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