Skip to content

TConditionalString

String value with CPU and OS conditions

Declaration

Source position: fpmkunit.pp line 464

type

  TConditionalString = class(TCollectionItem)
  public
    procedure Assign;
    function Match(aCPU: TCpu; aOS: TOS) : Boolean;
    function Match(const aValue: string; aCPU: TCpu; aOS: TOS) : Boolean;
    property Value: string; {rw}
    property OSes: TOSes; {rw}
    property CPUs: TCPUS; {rw}
  end;

Description

TConditionalString represents a string value that can be conditionally applied based on target CPU architecture and operating system. This enables platform-specific configuration in build scripts.

The class provides matching functionality to determine if the string applies to a specific CPU/OS combination, making it the foundation for cross-platform build support.

Properties

Member Visibility Description
CPUs public CPU architectures for which this string applies
OSes public Operating systems for which this string applies
Value public String value for this condition
See all Properties

Methods

Member Visibility Description
Assign public Assign conditional string from another source
Match public Check if string matches given CPU and OS
See all Methods

See also

Name Description
TConditionalStrings Collection of conditional string values
TCpu Supported CPU architectures for compilation
TOS Supported operating systems for compilation