Cogs.Core
Public Member Functions | Private Attributes | List of all members
Cogs::Core::Features Class Reference

Public Member Functions

bool supported (CPUFeature featureSet) const
 Check if a set of features are currently supported and enabled.
 
bool prefers (PlatformPreference preferenceSet) const
 
void setPlatformPreference (PlatformPreference preferenceSet)
 
void restrictTo (CPUFeature allowedSet)
 Restrict the set of the detected features to the intersection with allowed features.
 
std::string asString () const
 Create a space-seperated list of features.
 

Private Attributes

CPUFeature detectedCPUFeatureSet = CPUFeature::None
 
CPUFeature currentCPUFeatureSet = CPUFeature::None
 
PlatformPreference currentPlatformPreferenceSet = (PlatformPreference)((unsigned)PlatformPreference::BackgroundTasks | (unsigned)PlatformPreference::AsyncFetch)
 

Detailed Description

Definition at line 107 of file Features.h.

Constructor & Destructor Documentation

◆ Features()

Features::Features ( )

Definition at line 54 of file Features.cpp.

◆ ~Features()

Features::~Features ( )

Definition at line 175 of file Features.cpp.

Member Function Documentation

◆ asString()

std::string Features::asString ( ) const

Create a space-seperated list of features.

Definition at line 186 of file Features.cpp.

References supported().

◆ prefers()

bool Cogs::Core::Features::prefers ( PlatformPreference  preferenceSet) const
inline

Definition at line 120 of file Features.h.

◆ restrictTo()

void Features::restrictTo ( CPUFeature  allowedSet)

Restrict the set of the detected features to the intersection with allowed features.

Definition at line 180 of file Features.cpp.

◆ setPlatformPreference()

void Cogs::Core::Features::setPlatformPreference ( PlatformPreference  preferenceSet)
inline

Definition at line 125 of file Features.h.

◆ supported()

bool Cogs::Core::Features::supported ( CPUFeature  featureSet) const
inline

Check if a set of features are currently supported and enabled.

Definition at line 115 of file Features.h.

Referenced by asString().

Member Data Documentation

◆ currentCPUFeatureSet

CPUFeature Cogs::Core::Features::currentCPUFeatureSet = CPUFeature::None
private

Definition at line 138 of file Features.h.

◆ currentPlatformPreferenceSet

PlatformPreference Cogs::Core::Features::currentPlatformPreferenceSet = (PlatformPreference)((unsigned)PlatformPreference::BackgroundTasks | (unsigned)PlatformPreference::AsyncFetch)
private

Definition at line 143 of file Features.h.

◆ detectedCPUFeatureSet

CPUFeature Cogs::Core::Features::detectedCPUFeatureSet = CPUFeature::None
private

Definition at line 137 of file Features.h.


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