Immutable representation of a set of platforms, OS versions, and architectures, used for expressing a module's compatibility with a subset of Vuo's supported targets and checking if the module is compatible with a given target.
Definition at line 17 of file VuoCompilerCompatibility.hh.
Public Member Functions | |
VuoCompilerCompatibility (json_object *json) | |
Returns a representation of a module's compatibility with a subset of Vuo's supported targets. More... | |
VuoCompilerCompatibility (const VuoCompilerCompatibility &other) | |
Copy constructor. More... | |
VuoCompilerCompatibility & | operator= (const VuoCompilerCompatibility &other) |
Overloaded assignment operator. More... | |
~VuoCompilerCompatibility (void) | |
Destructor. More... | |
bool | isCompatibleWith (const VuoCompilerCompatibility &other) |
Returns true if the targets of this are a superset of the targets of other. More... | |
VuoCompilerCompatibility | intersection (const VuoCompilerCompatibility &other) |
Returns the targets that this and other have in common. More... | |
string | toString (void) |
Returns a human-readable description. More... | |
string | toJsonString (void) |
Returns a JSON-formatted string as it would appear in VuoModuleMetadata . More... | |
bool | isCompatibleWithPlatform (const string &platform) |
Returns true if at least one OS version and architecture is compatible on platform. More... | |
string | getMinVersionOnPlatform (const string &platform) |
If only OS versions X and up are compatible on platform, returns X. More... | |
Static Public Member Functions | |
static VuoCompilerCompatibility | compatibilityWithAnySystem (void) |
Returns a representation of compatibility with any target that Vuo supports. More... | |
static VuoCompilerCompatibility | compatibilityWithArchitectures (const set< string > &architectures) |
Returns a representation of compatibility with architectures on each platform that Vuo supports. More... | |
static VuoCompilerCompatibility | compatibilityWithTargetTriple (const string &target) |
Returns a representation of the single platform, OS version, and architecture described by the LLVM target triple target. More... | |
|
explicit |
Returns a representation of a module's compatibility with a subset of Vuo's supported targets.
json | The "compatibility" value from the module's metadata. |
Definition at line 29 of file VuoCompilerCompatibility.cc.
VuoCompilerCompatibility::VuoCompilerCompatibility | ( | const VuoCompilerCompatibility & | other | ) |
Copy constructor.
Definition at line 40 of file VuoCompilerCompatibility.cc.
VuoCompilerCompatibility::~VuoCompilerCompatibility | ( | void | ) |
Destructor.
Definition at line 67 of file VuoCompilerCompatibility.cc.
|
static |
Returns a representation of compatibility with any target that Vuo supports.
Definition at line 420 of file VuoCompilerCompatibility.cc.
|
static |
Returns a representation of compatibility with architectures on each platform that Vuo supports.
Definition at line 428 of file VuoCompilerCompatibility.cc.
|
static |
Returns a representation of the single platform, OS version, and architecture described by the LLVM target triple target.
Definition at line 383 of file VuoCompilerCompatibility.cc.
string VuoCompilerCompatibility::getMinVersionOnPlatform | ( | const string & | platform | ) |
If only OS versions X and up are compatible on platform, returns X.
Otherwise, returns an empty string.
Definition at line 365 of file VuoCompilerCompatibility.cc.
VuoCompilerCompatibility VuoCompilerCompatibility::intersection | ( | const VuoCompilerCompatibility & | other | ) |
Returns the targets that this
and other have in common.
Definition at line 89 of file VuoCompilerCompatibility.cc.
bool VuoCompilerCompatibility::isCompatibleWith | ( | const VuoCompilerCompatibility & | other | ) |
Returns true if the targets of this
are a superset of the targets of other.
Definition at line 76 of file VuoCompilerCompatibility.cc.
bool VuoCompilerCompatibility::isCompatibleWithPlatform | ( | const string & | platform | ) |
Returns true if at least one OS version and architecture is compatible on platform.
Definition at line 355 of file VuoCompilerCompatibility.cc.
VuoCompilerCompatibility & VuoCompilerCompatibility::operator= | ( | const VuoCompilerCompatibility & | other | ) |
Overloaded assignment operator.
Definition at line 51 of file VuoCompilerCompatibility.cc.
string VuoCompilerCompatibility::toJsonString | ( | void | ) |
Returns a JSON-formatted string as it would appear in VuoModuleMetadata
.
Definition at line 347 of file VuoCompilerCompatibility.cc.
string VuoCompilerCompatibility::toString | ( | void | ) |
Returns a human-readable description.
Definition at line 269 of file VuoCompilerCompatibility.cc.