Commit fdf0ac23 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge pull request #189 from wtschueller/master

Support more Tcl commands
parents 8389c41f 73e7c340
This diff is collapsed.
......@@ -24,7 +24,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="57" bodyend="59"/>
<location file="057_caller_graphs.tcl" bodystart="59" bodyend="61"/>
</memberdef>
<memberdef kind="function" id="057__caller__graphs_8tcl_1ae4e1c2bb3adfdfbb71f52de84a8285b0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -37,8 +37,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="63" bodyend="65"/>
<referencedby refid="namespace1_1a9722420639306872cea2593b83028a45" compoundref="057__caller__graphs_8tcl" startline="83" endline="86">1::test3</referencedby>
<location file="057_caller_graphs.tcl" bodystart="65" bodyend="67"/>
<referencedby refid="namespace1_1a9722420639306872cea2593b83028a45" compoundref="057__caller__graphs_8tcl" startline="85" endline="88">1::test3</referencedby>
</memberdef>
<memberdef kind="function" id="057__caller__graphs_8tcl_1a3f808a00e1b937978455d707851ab33a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -51,8 +51,36 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="100" bodyend="103"/>
<references refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="104" endline="112">2::next</references>
<location file="057_caller_graphs.tcl" bodystart="102" bodyend="105"/>
<references refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="106" endline="114">2::next</references>
</memberdef>
<memberdef kind="function" id="057__caller__graphs_8tcl_1a12acb916374f925e7b7ba302a1ca4efb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>master</definition>
<argsstring>args</argsstring>
<name>master</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="136" bodyend="140"/>
<references refid="__057__caller__graphs_8tcl_1a7c3c8acee94bf61ba9e911dafe35adac" compoundref="__057__caller__graphs_8tcl" startline="1" endline="4">inFileB</references>
</memberdef>
<memberdef kind="function" id="057__caller__graphs_8tcl_1a7482c00c17357cf4846b0c1bd715979c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>inFileA</definition>
<argsstring>args</argsstring>
<name>inFileA</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="141" bodyend="144"/>
<referencedby refid="__057__caller__graphs_8tcl_1a7c3c8acee94bf61ba9e911dafe35adac" compoundref="__057__caller__graphs_8tcl" startline="1" endline="4">inFileB</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="__057__caller__graphs_8tcl" kind="file">
<compoundname>_057_caller_graphs.tcl</compoundname>
<sectiondef kind="func">
<memberdef kind="function" id="__057__caller__graphs_8tcl_1a7c3c8acee94bf61ba9e911dafe35adac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>inFileB</definition>
<argsstring>args</argsstring>
<name>inFileB</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="_057_caller_graphs.tcl" bodystart="1" bodyend="4"/>
<references refid="057__caller__graphs_8tcl_1a7482c00c17357cf4846b0c1bd715979c" compoundref="057__caller__graphs_8tcl" startline="141" endline="144">inFileA</references>
<referencedby refid="057__caller__graphs_8tcl_1a12acb916374f925e7b7ba302a1ca4efb" compoundref="057__caller__graphs_8tcl" startline="136" endline="140">master</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="_057_caller_graphs.tcl"/>
</compounddef>
</doxygen>
......@@ -15,9 +15,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="60" bodyend="62"/>
<referencedby refid="namespace1_1a4a8285288ee1994ac886e2039777339e" compoundref="057__caller__graphs_8tcl" startline="75" endline="78">test1</referencedby>
<referencedby refid="namespace1_1a11615154d3c207ed4106dd0bcb0639e8" compoundref="057__caller__graphs_8tcl" startline="91" endline="94">test5</referencedby>
<location file="057_caller_graphs.tcl" bodystart="62" bodyend="64"/>
<referencedby refid="namespace1_1a4a8285288ee1994ac886e2039777339e" compoundref="057__caller__graphs_8tcl" startline="77" endline="80">test1</referencedby>
<referencedby refid="namespace1_1a11615154d3c207ed4106dd0bcb0639e8" compoundref="057__caller__graphs_8tcl" startline="93" endline="96">test5</referencedby>
</memberdef>
<memberdef kind="function" id="namespace1_1ad58c8f16ad5f12178c71ca988865bb58" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -30,8 +30,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="66" bodyend="68"/>
<referencedby refid="namespace1_1ae1e88bb7ddd332348d7e29ac4a211b00" compoundref="057__caller__graphs_8tcl" startline="79" endline="82">test2</referencedby>
<location file="057_caller_graphs.tcl" bodystart="68" bodyend="70"/>
<referencedby refid="namespace1_1ae1e88bb7ddd332348d7e29ac4a211b00" compoundref="057__caller__graphs_8tcl" startline="81" endline="84">test2</referencedby>
</memberdef>
<memberdef kind="function" id="namespace1_1a4a8285288ee1994ac886e2039777339e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -44,8 +44,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="75" bodyend="78"/>
<references refid="namespace1_1a5024a7bc323958c7230615f2fcaeaef8" compoundref="057__caller__graphs_8tcl" startline="60" endline="62">baz</references>
<location file="057_caller_graphs.tcl" bodystart="77" bodyend="80"/>
<references refid="namespace1_1a5024a7bc323958c7230615f2fcaeaef8" compoundref="057__caller__graphs_8tcl" startline="62" endline="64">baz</references>
</memberdef>
<memberdef kind="function" id="namespace1_1ae1e88bb7ddd332348d7e29ac4a211b00" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -58,8 +58,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="79" bodyend="82"/>
<references refid="namespace1_1ad58c8f16ad5f12178c71ca988865bb58" compoundref="057__caller__graphs_8tcl" startline="66" endline="68">bar</references>
<location file="057_caller_graphs.tcl" bodystart="81" bodyend="84"/>
<references refid="namespace1_1ad58c8f16ad5f12178c71ca988865bb58" compoundref="057__caller__graphs_8tcl" startline="68" endline="70">bar</references>
</memberdef>
<memberdef kind="function" id="namespace1_1a9722420639306872cea2593b83028a45" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -72,8 +72,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="83" bodyend="86"/>
<references refid="057__caller__graphs_8tcl_1ae4e1c2bb3adfdfbb71f52de84a8285b0" compoundref="057__caller__graphs_8tcl" startline="63" endline="65">bar</references>
<location file="057_caller_graphs.tcl" bodystart="85" bodyend="88"/>
<references refid="057__caller__graphs_8tcl_1ae4e1c2bb3adfdfbb71f52de84a8285b0" compoundref="057__caller__graphs_8tcl" startline="65" endline="67">bar</references>
</memberdef>
<memberdef kind="function" id="namespace1_1addc9b30656419de5e2651e27a013db29" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -86,8 +86,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="87" bodyend="90"/>
<references refid="namespace1_1_11_1acebecc4cb718010d00c3c150158b75ab" compoundref="057__caller__graphs_8tcl" startline="69" endline="71">1::1::bar</references>
<location file="057_caller_graphs.tcl" bodystart="89" bodyend="92"/>
<references refid="namespace1_1_11_1acebecc4cb718010d00c3c150158b75ab" compoundref="057__caller__graphs_8tcl" startline="71" endline="73">1::1::bar</references>
</memberdef>
<memberdef kind="function" id="namespace1_1a11615154d3c207ed4106dd0bcb0639e8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -100,8 +100,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="91" bodyend="94"/>
<references refid="namespace1_1a5024a7bc323958c7230615f2fcaeaef8" compoundref="057__caller__graphs_8tcl" startline="60" endline="62">baz</references>
<location file="057_caller_graphs.tcl" bodystart="93" bodyend="96"/>
<references refid="namespace1_1a5024a7bc323958c7230615f2fcaeaef8" compoundref="057__caller__graphs_8tcl" startline="62" endline="64">baz</references>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -15,8 +15,8 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="69" bodyend="71"/>
<referencedby refid="namespace1_1addc9b30656419de5e2651e27a013db29" compoundref="057__caller__graphs_8tcl" startline="87" endline="90">1::test4</referencedby>
<location file="057_caller_graphs.tcl" bodystart="71" bodyend="73"/>
<referencedby refid="namespace1_1addc9b30656419de5e2651e27a013db29" compoundref="057__caller__graphs_8tcl" startline="89" endline="92">1::test4</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -14,13 +14,13 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="72" bodyend="74"/>
<location file="057_caller_graphs.tcl" bodystart="74" bodyend="76"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="057_caller_graphs.tcl" line="56" column="1"/>
<location file="057_caller_graphs.tcl" line="58" column="1"/>
</compounddef>
</doxygen>
......@@ -15,10 +15,10 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="104" bodyend="112"/>
<references refid="namespace2_1_12_1aceefa876cf364f44da1f523d3f7b0649" compoundref="057__caller__graphs_8tcl" startline="113" endline="116">2::2::next</references>
<referencedby refid="057__caller__graphs_8tcl_1a3f808a00e1b937978455d707851ab33a" compoundref="057__caller__graphs_8tcl" startline="100" endline="103">next</referencedby>
<referencedby refid="namespace2_1_12_1_12_1_12_1_12_1ac07f64c62783fd8b44317389b4a711f8" compoundref="057__caller__graphs_8tcl" startline="125" endline="128">2::2::2::2::2::next</referencedby>
<location file="057_caller_graphs.tcl" bodystart="106" bodyend="114"/>
<references refid="namespace2_1_12_1aceefa876cf364f44da1f523d3f7b0649" compoundref="057__caller__graphs_8tcl" startline="115" endline="118">2::2::next</references>
<referencedby refid="057__caller__graphs_8tcl_1a3f808a00e1b937978455d707851ab33a" compoundref="057__caller__graphs_8tcl" startline="102" endline="105">next</referencedby>
<referencedby refid="namespace2_1_12_1_12_1_12_1_12_1ac07f64c62783fd8b44317389b4a711f8" compoundref="057__caller__graphs_8tcl" startline="127" endline="130">2::2::2::2::2::next</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -15,9 +15,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="113" bodyend="116"/>
<references refid="namespace2_1_12_1_12_1a85524e2015e377d433cd8384335c11d6" compoundref="057__caller__graphs_8tcl" startline="117" endline="120">2::2::2::next</references>
<referencedby refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="104" endline="112">2::next</referencedby>
<location file="057_caller_graphs.tcl" bodystart="115" bodyend="118"/>
<references refid="namespace2_1_12_1_12_1a85524e2015e377d433cd8384335c11d6" compoundref="057__caller__graphs_8tcl" startline="119" endline="122">2::2::2::next</references>
<referencedby refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="106" endline="114">2::next</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -15,9 +15,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="117" bodyend="120"/>
<references refid="namespace2_1_12_1_12_1_12_1a3ea6e2ce66f4a9c30009852e4c7da2fe" compoundref="057__caller__graphs_8tcl" startline="121" endline="124">2::2::2::2::next</references>
<referencedby refid="namespace2_1_12_1aceefa876cf364f44da1f523d3f7b0649" compoundref="057__caller__graphs_8tcl" startline="113" endline="116">2::2::next</referencedby>
<location file="057_caller_graphs.tcl" bodystart="119" bodyend="122"/>
<references refid="namespace2_1_12_1_12_1_12_1a3ea6e2ce66f4a9c30009852e4c7da2fe" compoundref="057__caller__graphs_8tcl" startline="123" endline="126">2::2::2::2::next</references>
<referencedby refid="namespace2_1_12_1aceefa876cf364f44da1f523d3f7b0649" compoundref="057__caller__graphs_8tcl" startline="115" endline="118">2::2::next</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -15,9 +15,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="121" bodyend="124"/>
<references refid="namespace2_1_12_1_12_1_12_1_12_1ac07f64c62783fd8b44317389b4a711f8" compoundref="057__caller__graphs_8tcl" startline="125" endline="128">2::2::2::2::2::next</references>
<referencedby refid="namespace2_1_12_1_12_1a85524e2015e377d433cd8384335c11d6" compoundref="057__caller__graphs_8tcl" startline="117" endline="120">2::2::2::next</referencedby>
<location file="057_caller_graphs.tcl" bodystart="123" bodyend="126"/>
<references refid="namespace2_1_12_1_12_1_12_1_12_1ac07f64c62783fd8b44317389b4a711f8" compoundref="057__caller__graphs_8tcl" startline="127" endline="130">2::2::2::2::2::next</references>
<referencedby refid="namespace2_1_12_1_12_1a85524e2015e377d433cd8384335c11d6" compoundref="057__caller__graphs_8tcl" startline="119" endline="122">2::2::2::next</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
......
......@@ -14,15 +14,15 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="125" bodyend="128"/>
<references refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="104" endline="112">2::next</references>
<referencedby refid="namespace2_1_12_1_12_1_12_1a3ea6e2ce66f4a9c30009852e4c7da2fe" compoundref="057__caller__graphs_8tcl" startline="121" endline="124">2::2::2::2::next</referencedby>
<location file="057_caller_graphs.tcl" bodystart="127" bodyend="130"/>
<references refid="namespace2_1a2839d9dea7f0d08f48958c3fc0cd00d3" compoundref="057__caller__graphs_8tcl" startline="106" endline="114">2::next</references>
<referencedby refid="namespace2_1_12_1_12_1_12_1a3ea6e2ce66f4a9c30009852e4c7da2fe" compoundref="057__caller__graphs_8tcl" startline="123" endline="126">2::2::2::2::next</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="057_caller_graphs.tcl" line="99" column="1"/>
<location file="057_caller_graphs.tcl" line="101" column="1"/>
</compounddef>
</doxygen>
......@@ -14,9 +14,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="27" bodyend="33"/>
<references refid="namespacebar_1a3426cd3a2eebcffa0dc333bcf5e2fe5e" compoundref="057__caller__graphs_8tcl" startline="34" endline="37">baz</references>
<referencedby refid="namespacefoo_1a265acdcaea6da32c3bbd9afb5d0e32a4" compoundref="057__caller__graphs_8tcl" startline="42" endline="46">foo::master</referencedby>
<location file="057_caller_graphs.tcl" bodystart="29" bodyend="35"/>
<references refid="namespacebar_1a3426cd3a2eebcffa0dc333bcf5e2fe5e" compoundref="057__caller__graphs_8tcl" startline="36" endline="39">baz</references>
<referencedby refid="namespacefoo_1a265acdcaea6da32c3bbd9afb5d0e32a4" compoundref="057__caller__graphs_8tcl" startline="44" endline="48">foo::master</referencedby>
</memberdef>
<memberdef kind="function" id="namespacebar_1a3426cd3a2eebcffa0dc333bcf5e2fe5e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -29,9 +29,9 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="34" bodyend="37"/>
<references refid="namespacebar_1a88879545dee287d377e638b87cdf6dd7" compoundref="057__caller__graphs_8tcl" startline="38" endline="40">bazbaz</references>
<referencedby refid="namespacebar_1aa1678a9adb588c0b91b118de7cc38ddb" compoundref="057__caller__graphs_8tcl" startline="27" endline="33">slave</referencedby>
<location file="057_caller_graphs.tcl" bodystart="36" bodyend="39"/>
<references refid="namespacebar_1a88879545dee287d377e638b87cdf6dd7" compoundref="057__caller__graphs_8tcl" startline="40" endline="42">bazbaz</references>
<referencedby refid="namespacebar_1aa1678a9adb588c0b91b118de7cc38ddb" compoundref="057__caller__graphs_8tcl" startline="29" endline="35">slave</referencedby>
</memberdef>
<memberdef kind="function" id="namespacebar_1a88879545dee287d377e638b87cdf6dd7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
......@@ -44,14 +44,14 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="38" bodyend="40"/>
<referencedby refid="namespacebar_1a3426cd3a2eebcffa0dc333bcf5e2fe5e" compoundref="057__caller__graphs_8tcl" startline="34" endline="37">baz</referencedby>
<location file="057_caller_graphs.tcl" bodystart="40" bodyend="42"/>
<referencedby refid="namespacebar_1a3426cd3a2eebcffa0dc333bcf5e2fe5e" compoundref="057__caller__graphs_8tcl" startline="36" endline="39">baz</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="057_caller_graphs.tcl" line="26" column="1"/>
<location file="057_caller_graphs.tcl" line="28" column="1"/>
</compounddef>
</doxygen>
......@@ -14,14 +14,14 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="057_caller_graphs.tcl" bodystart="42" bodyend="46"/>
<references refid="namespacebar_1aa1678a9adb588c0b91b118de7cc38ddb" compoundref="057__caller__graphs_8tcl" startline="27" endline="33">bar::slave</references>
<location file="057_caller_graphs.tcl" bodystart="44" bodyend="48"/>
<references refid="namespacebar_1aa1678a9adb588c0b91b118de7cc38ddb" compoundref="057__caller__graphs_8tcl" startline="29" endline="35">bar::slave</references>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="057_caller_graphs.tcl" line="41" column="1"/>
<location file="057_caller_graphs.tcl" line="43" column="1"/>
</compounddef>
</doxygen>
#// objective: test for completeness and correctness of references/referencedby relations
#// check: 057__caller__graphs_8tcl.xml
#// check: __057__caller__graphs_8tcl.xml
#// check: namespacebar.xml
#// check: namespacefoo.xml
#// check: namespace1.xml
......@@ -14,6 +15,7 @@
#// config: INLINE_SOURCES = no
#// config: REFERENCED_BY_RELATION = yes
#// config: REFERENCES_RELATION = yes
#// config: INPUT = 057_caller_graphs.tcl _057_caller_graphs.tcl
# config: HAVE_DOT = yes
# config: CALLER_GRAPH = yes
# config: CALL_GRAPH = yes
......@@ -126,6 +128,20 @@ proc ::2::2::2::2::2::next args {
array set info [info frame 0]; puts $info(proc)
2::next
}
#
# cross check with two files
# If doxygen did not do two passes, then xrefs would depend on file order
# and would be incomplete.
source _057_caller_graphs.tcl
proc master args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
inFileB
return
}
proc inFileA args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
# now, check with tcl what is called
foo::master
puts ""
......@@ -134,5 +150,6 @@ foreach proc [lsort [info procs ::1::test?]] {
puts ""
}
::next
master
exit
This diff is collapsed.
#// objective: tests processing of catch/eval, only references/referencedby relations are relevant
#// check: 059__command__catch_8tcl.xml
#// config: REFERENCED_BY_RELATION = yes
#// config: REFERENCES_RELATION = yes
#// config: EXTRACT_ALL = yes
#// config: INLINE_SOURCES = no
##
# \brief should be reference by every proc below
proc Invoked args {
puts "Procedure \"Invoked\" is invoked indeed. Ok."
return $args
}
##
# \brief must not be reference by every proc below
proc NotInvoked args {
puts "Procedure \"NotInvoked\" is invoked. Not Ok!"
return $args
}
#
# check if call references work at all
proc a args {
Invoked NotInvoked
return
}
#
# catch command
# Tcl8.5: catch script ?resultVarName? ?optionsVarName?
proc b args {
catch Invoked
return
}
proc c args {
catch Invoked NotInvoked
return
}
proc d args {
catch Invoked NotInvoked NotInvoked
return
}
proc e args {
set r [catch Invoked NotInvoked NotInvoked]
return
}
proc f args {
set r [catch {Invoked} NotInvoked NotInvoked]
return
}
proc g args {
set r [catch {
set x [Invoked]
} NotInvoked NotInvoked]
return
}
# eval arg ?arg ...?
proc h args {
eval Invoked NotInvoked
return
}
proc i args {
eval set NotInvoked [Invoked NotInvoked]
return
}
# This is a striped down example. Original:
#
# jpeg.tcl --
#
# Querying and modifying JPEG image files.
#
# Copyright (c) 2004 Aaron Faupell <afaupell@users.sourceforge.net>
#
# ...
# eval [list addComment $file] [lreplace $com 0 0 $comment]
# ...
proc j args {
eval [list set] [list NotInvoked] [Invoked NotInvoked]
return
}
#
# call all single letter procs
# let tcl check what is called and what is not called
foreach p [info procs ?] {
puts "Check procedure \"$p\""
$p
}
exit
This diff is collapsed.
#// objective: tests processing of switch, only references/referencedby relations are relevant
#// check: 060__command__switch_8tcl.xml
#// config: REFERENCED_BY_RELATION = yes
#// config: REFERENCES_RELATION = yes
#// config: EXTRACT_ALL = yes
#// config: INLINE_SOURCES = no
##
# \brief should be reference by every proc below
proc Invoked args {
puts "Procedure \"Invoked\" is invoked indeed. Ok."
return $args
}
##
# \brief must not be reference by every proc below
proc NotInvoked args {
puts "Procedure \"NotInvoked\" is invoked. Not Ok!"
return $args
}
#
# check if call references work at all
proc a args {
Invoked NotInvoked
return
}
#
# switch command
# switch ?options? string pattern body ?pattern body ...?
proc b args {
switch value NotInvoked {
} NotInvoked {
} default {
Invoked
}
return
}
proc c args {
switch value NotInvoked {
} [Invoked] {
} default {
}
return
}
proc d args {
switch NotInvoked pattern {
} [Invoked] {
} default {
}
return
}
proc e args {
switch [Invoked] pattern {
} NotInvoked {
} default {
}
return
}
proc f args {
switch -exact value pattern {
} NotInvoked {
} default {
Invoked
}
return
}
proc g args {
switch -exact -- value pattern {
} NotInvoked {
} default {
Invoked
}
return
}
proc h args {
switch -exact -- -value pattern {
} NotInvoked {
} default {
Invoked
}
return
}
# switch ?options? string {pattern body ?pattern body ...?}
proc i args {
switch value {
NotInvoked {
}
NotInvoked {
}
default {
Invoked
}
}
return
}
proc j args {
switch vale {
NotInvoked {
}
[NotInvoked] {
}
default {
Invoked
}
}
return
}
proc k args {
switch NotInvoked {
[NotInvoked] {
}
NotInvoked {
Invoked
}
default {
}
}
return
}
proc l args {
switch [Invoked] {
pattern {
}
NotInvoked {
}
default {
}
}
return
}
proc m args {
switch -exact value {
pattern {
}
NotInvoked {
}
default {
Invoked
}
}
return
}
proc n args {
switch -exact -- value {
pattern {
}
NotInvoked {
}
default {
Invoked
}
}
return
}
proc o args {
switch -exact -- -value {
pattern {
}
NotInvoked {
}
default {
Invoked
}
}
return
}
proc p args {
switch -exact -- inquotes {
"inquotes" {
Invoked
}
default {
}
}
return
}
proc q args {
switch -exact -- "in quotes" {
"in quotes" {
Invoked
}
default {
}
}
return
}
proc r args {
switch -exact -- inbraces {
{inbraces} {
Invoked
}
default {
}
}
return
}
proc s args {
switch -exact -- {in braces} {
{in braces} {
Invoked
}
default {
}
}
return
}
# wrong syntax
proc x args {
catch {switch -exact -- [Invoked] pattern1 NotInvoked pattern2}
return
}
# The current version does not check the last argument beforehand.
# Therefore, all script elements are evaluated as scripts before
# the parser detects the dangling pattern. It throws a warning, at the very least.
# Anyway, for working code the documentation will be correct.
proc y args {
catch {switch -exact -- [Invoked] {
pattern {
NotInvoked
}
NotInvoked {
NotInvoked
}
default {
NotInvoked
}
pattern
}}
return
}
#
# call all single letter procs
# let tcl check what is called and what is not called
foreach p [info procs ?] {
puts "Check procedure \"$p\""
$p
}
exit
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="namespacen1" kind="namespace">
<compoundname>n1</compoundname>
<innernamespace refid="namespacen1_1_1n1">n1::n1</innernamespace>
<sectiondef kind="func">
<memberdef kind="function" id="namespacen1_1a9f23d7a7f141915457e8e26023d70cb4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n1::p1</definition>
<argsstring>args</argsstring>
<name>p1</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="12" bodyend="16"/>
<references refid="namespacen1_1a0bff29f718fa43e49b7ca79985afb5fa" compoundref="062__namespace__resolution_8tcl" startline="17" endline="20">p2</references>
</memberdef>
<memberdef kind="function" id="namespacen1_1a0bff29f718fa43e49b7ca79985afb5fa" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n1::p2</definition>
<argsstring>args</argsstring>
<name>p2</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="17" bodyend="20"/>
<referencedby refid="namespacen1_1a9f23d7a7f141915457e8e26023d70cb4" compoundref="062__namespace__resolution_8tcl" startline="12" endline="16">p1</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="062_namespace_resolution.tcl" line="11" column="1"/>
</compounddef>
</doxygen>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="namespacen2" kind="namespace">
<compoundname>n2</compoundname>
<innernamespace refid="namespacen2_1_1n2">n2::n2</innernamespace>
<sectiondef kind="func">
<memberdef kind="function" id="namespacen2_1a74950c0185232e374220a0707b4903c6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n2::p1</definition>
<argsstring>args</argsstring>
<name>p1</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="31" bodyend="35"/>
<references refid="namespacen2_1a49fadfbefa795204a3c566ec76ff632f" compoundref="062__namespace__resolution_8tcl" startline="36" endline="39">p2</references>
</memberdef>
<memberdef kind="function" id="namespacen2_1a49fadfbefa795204a3c566ec76ff632f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n2::p2</definition>
<argsstring>args</argsstring>
<name>p2</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="36" bodyend="39"/>
<referencedby refid="namespacen2_1a74950c0185232e374220a0707b4903c6" compoundref="062__namespace__resolution_8tcl" startline="31" endline="35">p1</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="062_namespace_resolution.tcl" line="29" column="1"/>
</compounddef>
</doxygen>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="namespacen3" kind="namespace">
<compoundname>n3</compoundname>
<innernamespace refid="namespacen3_1_1n3">n3::n3</innernamespace>
<sectiondef kind="func">
<memberdef kind="function" id="namespacen3_1ae7e87e49507bd56dad087cffecd35b29" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n3::p1</definition>
<argsstring>args</argsstring>
<name>p1</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="47" bodyend="51"/>
<references refid="namespacen3_1a14e9fe1b27a6d36db9ace2eef4509979" compoundref="062__namespace__resolution_8tcl" startline="52" endline="55">p2</references>
</memberdef>
<memberdef kind="function" id="namespacen3_1a14e9fe1b27a6d36db9ace2eef4509979" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type/>
<definition>n3::p2</definition>
<argsstring>args</argsstring>
<name>p2</name>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="062_namespace_resolution.tcl" bodystart="52" bodyend="55"/>
<referencedby refid="namespacen3_1ae7e87e49507bd56dad087cffecd35b29" compoundref="062__namespace__resolution_8tcl" startline="47" endline="51">p1</referencedby>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="062_namespace_resolution.tcl" line="45" column="1"/>
</compounddef>
</doxygen>
#// objective: tests correct namespace resolution, only references/referencedby relations are relevant
#// check: namespacen1.xml
#// check: namespacen2.xml
#// check: namespacen3.xml
#// config: REFERENCED_BY_RELATION = yes
#// config: REFERENCES_RELATION = yes
#// config: EXTRACT_ALL = yes
#// config: INLINE_SOURCES = yes
# now: combine namespace eval and qualified names
namespace eval n1 {
proc p1 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
p2
return
}
proc p2 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
namespace eval n1 {
proc p1 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
}
}
# same thing, but fully qualified proc names
namespace eval ::n2 {}
namespace eval ::n2::n2 {}
proc ::n2::p1 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
p2
return
}
proc ::n2::p2 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
proc ::n2::n2::p2 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
# same thing, without leading ::
namespace eval n3 {}
namespace eval n3::n3 {}
proc n3::p1 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
p2
return
}
proc n3::p2 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
proc n3::n3::p2 args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
return
}
# now, check with tcl what is called
n1::p1
puts ""
n2::p1
puts ""
n3::p1
puts ""
exit
proc inFileB args {
array set info [info frame 0]; puts -nonewline ->$info(proc)
inFileA
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment