Conditional Elements

Table of Contents
%If — start of a conditional _block_
%End — Terminate _block_
Version() — Condition function for %If directive
%Version — Define version value(s) and evaluation methods
%PrimaryVersions — Define list of primary versions
%VersionCode — Start of a version code _block_

%If

Name

%If -- start of a conditional _block_

Synopsis

%If condition

Description

The following (conditional) block is evaluated only if condition is true. Currently the only valid type of condition is Version() (see below).


%End

Name

%End -- Terminate _block_

Synopsis

%End

Description

All _block_s must be closed by a matching %End directive.


Version()

Name

Version() -- Condition function for %If directive

Synopsis

Version(version_range);

Parameters

version_range: enclosed in parenthesis one or both of low_Bound and high_bound separated by a '-'

Remarks

This is the only currently available type of condition for %If.

Examples

	    %If Version(- Qt_2_00)
	    %If Version(Qt_1_43 -)
	    %If Version(Qt_2_00 - Qt_2_1_0)
			


%Version

Name

%Version -- Define version value(s) and evaluation methods

Synopsis

%Version name version_get_c version_get_py

Examples

	    %Version WS_WIN "defined(_WS_WIN_)" "libqtc.qtIsWin()"
			


%PrimaryVersions

Name

%PrimaryVersions -- Define list of primary versions

Synopsis

%PrimaryVersions list_of_primary_version

Remarks

The list must be enclosed by braces.

Examples

	    %PrimaryVersions {Qt_1_43 Qt_2_00 Qt_2_1_0 Qt_2_2_0}
			


%VersionCode

Name

%VersionCode -- Start of a version code _block_

Synopsis

%VersionCode

Description

The %VersionCode goes into sip_helper.cpp, which will be compiled into sip_helper.exe, which will produce sip$(module)Version.h which will be included in (almost) all files. It should contain #defines corresponding to each of the different versions. See also Introduction / Files / sip_helper.cpp.