<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="defineparallel" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupparallel" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
            <cd:assignments list="yes">
                <cd:parameter name="setups">
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="start">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="n">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="criterium">
                    <cd:constant type="all"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="placeparallel" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name-list"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupparallel"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelseparallel" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:keywords delimiters="braces" list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifparallelelse" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="argument-name"/>
            <cd:keywords delimiters="braces" list="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetparallel" file="buff-par.mkvi">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="cd:name"/>
                <cd:constant type="all" default="yes"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="parallel" type="environment" generated="yes" variant="example" file="buff-par.mkvi">
        <cd:sequence>
            <cd:variable value="parallel"/>
        </cd:sequence>
    </cd:command>

</cd:interface>
