#include <packageutils.h>
Public Member Functions | |
wxPackageCondition (long plat=0, long formats=0, long buildsys=0, long stages=0) | |
virtual | ~wxPackageCondition () |
bool | operator== (const wxPackageCondition &cond) const |
bool | operator!= (const wxPackageCondition &cond) const |
long | GetFormats () const |
long | GetPlatforms () const |
long | GetBuildSystems () const |
long | GetStages () const |
wxString | GetFormatsStr () const |
wxString | GetBuildSystemsStr () const |
wxString | GetStagesStr () const |
wxString | GetPlatformsStr () const |
void | SetFormats (long fmt) |
void | SetPlatforms (long plat) |
void | SetBuildSystems (long build) |
void | SetStages (long stages) |
bool | IsValidForCurrentPlatform () const |
Returns true if this option is valid for currently-running platform. | |
bool | IsValidForCompiler (wxPackageCompilerFormat fmt) const |
Returns true if this condition is true for given compiler. | |
bool | IsValidForBuildSys (wxPackageBuildSystemType fmt) const |
Returns true if this condition is true for given build system. | |
bool | IsValidForStage (wxPackageBuildSystemStage stage) const |
Returns true if this condition is true for the given stage. | |
bool | IsValidForStages (long stages) const |
bool | IsValidForCompilers (long fmt) const |
bool | IsValidForPackage (const wxPackage &pkg) const |
void | SetAlwaysTrue () |
Resets this condition so that it's always verified. | |
bool | IsAlwaysTrue () const |
Returns true if this condition is always true. | |
bool | IsAlwaysFalse () const |
Returns true if this condition is always false. | |
bool | Matches (const wxPackageCondition &cond) const |
void | IntersecateWith (const wxPackageCondition &cond) |
bool | IsOk () const |
Static Public Member Functions | |
static long | GetCurrentPlatform () |
Protected Attributes | |
long | m_platform |
long | m_format |
long | m_buildSys |
long | m_stages |
Definition at line 221 of file packageutils.h.
bool wxPackageCondition::IsValidForStages | ( | long | stages | ) | const [inline] |
Returns true if this condition is true for the given set of stages (union through ORs of wxPackageBuildSystemStage values).
Definition at line 312 of file packageutils.h.
References m_stages.
bool wxPackageCondition::IsValidForCompilers | ( | long | fmt | ) | const [inline] |
Returns true if this condition is true for the given set of compilers (union through ORs of wxPackageCompilerFormat values).
Definition at line 317 of file packageutils.h.
References m_format.
bool wxPackageCondition::IsValidForPackage | ( | const wxPackage & | pkg | ) | const |
Returns true if this condition is true for the current configuration of the given package.
Definition at line 107 of file packageutils.cpp.
References wxPackageInfo::GetBuildSystemType(), wxPackage::GetCompilerSettings(), wxCompilerSettings::GetSelFormat(), IsValidForBuildSys(), IsValidForCompiler(), and IsValidForCurrentPlatform().
bool wxPackageCondition::Matches | ( | const wxPackageCondition & | cond | ) | const [inline] |
Returns true if this condition and the given one have at least 1 platform, 1 format, 1 build system and 1 stage in common.
Definition at line 348 of file packageutils.h.
References m_buildSys, m_format, m_platform, and m_stages.
void wxPackageCondition::IntersecateWith | ( | const wxPackageCondition & | cond | ) | [inline] |
Removes from *this all compiler formats, all platforms, all build systems and all stages which are NOT matched by the given package condition. Note that *this will be in general different from 'cond' after using this function (since it does _not_ just copy the cond's fields!).
Definition at line 361 of file packageutils.h.
References m_buildSys, m_format, m_platform, and m_stages.
Referenced by wxPackageCommandOptionArray::GetCommonCondition().
long wxPackageCondition::m_platform [protected] |
A combined list of the wxPortID(s) to which the owner of this condition applies. If zero it applies to all ports. NOTE: this info is saved by load functions to allow a perfect save later.
Definition at line 379 of file packageutils.h.
Referenced by GetPlatforms(), GetPlatformsStr(), IntersecateWith(), IsAlwaysFalse(), IsAlwaysTrue(), IsValidForCurrentPlatform(), Matches(), operator==(), SetAlwaysTrue(), and SetPlatforms().
long wxPackageCondition::m_format [protected] |
A combined list of the wxPackageCompilerFormat(s) to which the owner of this condition applies. If zero it applies to all formats.
Definition at line 384 of file packageutils.h.
Referenced by GetFormats(), GetFormatsStr(), IntersecateWith(), IsAlwaysFalse(), IsAlwaysTrue(), IsValidForCompiler(), IsValidForCompilers(), Matches(), operator==(), SetAlwaysTrue(), and SetFormats().
long wxPackageCondition::m_buildSys [protected] |
A combined list of the wxPackageBuildSystemType(s) to which the owner of this condition applies. If zero it applies to all build systems.
Definition at line 389 of file packageutils.h.
Referenced by GetBuildSystems(), GetBuildSystemsStr(), IntersecateWith(), IsAlwaysFalse(), IsAlwaysTrue(), IsValidForBuildSys(), Matches(), operator==(), SetAlwaysTrue(), and SetBuildSystems().
long wxPackageCondition::m_stages [protected] |
A combined list of the wxPackageBuildSystemStage(s) to which the owner of this condition applies. If zero it applies to all stages.
Definition at line 394 of file packageutils.h.
Referenced by GetStages(), GetStagesStr(), IntersecateWith(), IsAlwaysFalse(), IsAlwaysTrue(), IsValidForStage(), IsValidForStages(), Matches(), operator==(), SetAlwaysTrue(), and SetStages().