Difference between revisions of "OldConfigurationConditions"

 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Configuration]]
 +
{{cleanup}}
 +
 
== Current ==
 
== Current ==
 
At the moment conditioning is done like that
 
At the moment conditioning is done like that
Line 29: Line 32:
 
<code>[xml, N]
 
<code>[xml, N]
 
<condition>
 
<condition>
     <platform isnot="windows"/>
+
     <platform excluded_value="windows"/>
     <build is="workbench"/>
+
     <build value="workbench"/>
 
</condition>
 
</condition>
 
</code>
 
</code>
Line 39: Line 42:
 
<code>[xml, N]
 
<code>[xml, N]
 
<condition>
 
<condition>
     <platform is="windows"/>
+
     <multithreaded value="true"/>
     <build is="workbench"/>
+
     <platform value="windows"/>
     <multithreaded is="true"/>
+
     <build value="workbench"/>
 
</condition>
 
</condition>
 
<condition>
 
<condition>
     <platform isnot="windows"/>
+
     <multithreaded value="true"/>
     <platform isnot="macintosh"/>
+
     <platform excluded_value="windows"/>
     <multithreaded is="true"/>
+
     <platform excluded_value="macintosh"/>
     <custom name="somevar" is="true">
+
     <custom name="somevar" value="true">
 
</condition>
 
</condition>
 
</code>
 
</code>
Line 54: Line 57:
  
 
We should have enough flexibility to allow complicated cases as well.
 
We should have enough flexibility to allow complicated cases as well.
 +
 +
=== Internal representation ===
 +
Internally this could be represented by a list of CONF_CONDITIONS where CONF_CONDITIONS could look like this
 +
 +
<code>[eiffel, N]
 +
class
 +
CONF_CONDITION
 +
 +
feature -- Access
 +
 +
platform: ARRAYED_LIST [TUPLE [value: INTEGER; invert: BOOLEAN]]
 +
-- Platform where it is enabled or for which it is disabled (if `invert' is true)
 +
 +
build: ARRAYED_LIST [TUPLE [value: INTEGER; invert: BOOLEAN]]
 +
-- Build where it is is enabled or for which it is disabled (if `invert' is true)
 +
 +
multithreaded: TUPLE [value: BOOLEAN]
 +
-- Enabled for multithreaded?
 +
 +
custom: HASH_TABLE [TUPLE [value: STRING; invert: BOOLEAN], STRING]
 +
-- Custom variables that have to be fullfilled indexed by the variable name..
 +
 +
end
 +
</code>

Latest revision as of 10:35, 9 November 2006

This information is not up to date and needs some cleanup.


Current

At the moment conditioning is done like that

<if platform="windows" build="workbench"/>

Which means enabled for

windows and workbench
<ifnot platform="windows" build="workbench"/>

Which means enabled for

everything but (windows and workbench)
<if platform="windows"/>
<if platform="unix"/>

Which means enabled for

windows or unix

Something a bit more complicated like enabled for workbench on everything but windows is not possible and would have to be expressed as

<if platform="unix" build="workbench"/>
<if platform="macintosh" build="workbench"/>
<if platform="vxworks" build="workbench"/>

Proposal

If the conditioning would be done like this

<condition>
    <platform excluded_value="windows"/>
    <build value="workbench"/>
</condition>

Which would mean

every platform but windows and workbench

Or a more complex example

<condition>
    <multithreaded value="true"/>
    <platform value="windows"/>
    <build value="workbench"/>
</condition>
<condition>
    <multithreaded value="true"/>
    <platform excluded_value="windows"/>
    <platform excluded_value="macintosh"/>
    <custom name="somevar" value="true">
</condition>

Which would mean

(windows and workbench and multithreaded) or (not windows and not macintosh and multithreaded and somevar=true)

We should have enough flexibility to allow complicated cases as well.

Internal representation

Internally this could be represented by a list of CONF_CONDITIONS where CONF_CONDITIONS could look like this

class
	CONF_CONDITION
 
feature -- Access
 
	platform: ARRAYED_LIST [TUPLE [value: INTEGER; invert: BOOLEAN]]
			-- Platform where it is enabled or for which it is disabled (if `invert' is true)
 
	build: ARRAYED_LIST [TUPLE [value: INTEGER; invert: BOOLEAN]]
			-- Build where it is is enabled or for which it is disabled (if `invert' is true)
 
	multithreaded: TUPLE [value: BOOLEAN]
			-- Enabled for multithreaded?
 
	custom: HASH_TABLE [TUPLE [value: STRING; invert: BOOLEAN], STRING]
			-- Custom variables that have to be fullfilled indexed by the variable name..
 
end