<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to wiki</title><link href="https://sourceforge.net/p/click-lib/wiki/" rel="alternate"/><link href="https://sourceforge.net/p/click-lib/wiki/feed.atom" rel="self"/><id>https://sourceforge.net/p/click-lib/wiki/</id><updated>2017-12-07T14:00:56.148000Z</updated><subtitle>Recent changes to wiki</subtitle><entry><title>Building CLIck modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Building%2520CLIck/" rel="alternate"/><published>2017-12-07T14:00:56.148000Z</published><updated>2017-12-07T14:00:56.148000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net10fee363cffdc34412727e6b7285fe5dedc036ea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -17,7 +17,7 @@

 For more options, please refer to the INSTALL file into the project's main directory
-In case you are building CLIck in a cross environment, this library has to be built for **target** architecture.
+In case you are building CLIck in a cross environment, this library has to be built for **host** architecture.

 **Building CLIck tools**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-15T22:10:27.392000Z</published><updated>2015-10-15T22:10:27.392000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net50bfb22a7215eadc19e738e835453b44cfd1e5cd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -162,5 +162,32 @@
 Parameters
 ----------------

+Structure of *parameters* is very simple:
+
+    &amp;lt;param&amp;gt;
+        &amp;lt;name&amp;gt;paramname&amp;lt;/name&amp;gt;
+        &amp;lt;required&amp;gt;true/false&amp;lt;/required&amp;gt;
+        &amp;lt;numval&amp;gt;num&amp;lt;/numval&amp;gt;
+        &amp;lt;reqval&amp;gt;true/false&amp;lt;/reqval&amp;gt;
+    &amp;lt;/param&amp;gt;
+
+- ***name*** is the parameter's name, that is used at runtime what parameter you want to pass to the callback
+- ***required*** is a boolean value (**true** or **false**) to indicate whether this parameter is mandatory to execute the relevant command
+- **numval** is the number of values expected at runtime after specifying the parameter name
+- **reqval** indicates whether the value is mandatory as well
+
+If a parameter is required does not mean that its value is required as well, and vice versa.
+
+As already mentioned earlier, every command supports one optional default parameter that, differently from all the other parameters, does not have a name, and if defined, the very first word after the command name will be interpreted at runtime as the value of the default parameter. A default parameter is specified by creating a parameter without a name:
+
+    &amp;lt;param&amp;gt;
+        &amp;lt;required&amp;gt;true/false&amp;lt;/required&amp;gt;
+        &amp;lt;numval&amp;gt;num&amp;lt;/numval&amp;gt;
+        &amp;lt;reqval&amp;gt;true/false&amp;lt;/reqval&amp;gt;
+    &amp;lt;/param&amp;gt;
+
+Putting all together
+================
+

 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-15T20:45:48.945000Z</published><updated>2015-10-15T20:45:48.945000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net165b6df879017d54190dee025bf6331e7f4726fb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -54,6 +54,9 @@

 Representing the tree as an XML file
 =============================
+Contexts
+-------------
+
 The structure of a *context* looks like this:

     &amp;lt;context&amp;gt;
@@ -76,6 +79,8 @@

     myprompt&amp;gt; 

+Commands
+----------------

 For commands things are a bit more complicated.

@@ -125,26 +130,37 @@
         &amp;lt;help&amp;gt;cmdhelp&amp;lt;/help&amp;gt;
         &amp;lt;function&amp;gt;cmdfunction&amp;lt;/function&amp;gt;
         &lt;command&gt;&lt;/command&gt;
-            &amp;lt;name&amp;gt;intcmdname&amp;lt;/name&amp;gt;
-            &amp;lt;brief&amp;gt;intcmdbrief&amp;lt;/brief&amp;gt;
-            &amp;lt;help&amp;gt;intcmdhelp&amp;lt;/help&amp;gt;
-            &amp;lt;function&amp;gt;intcmdfunction&amp;lt;/function&amp;gt;
+            &amp;lt;name&amp;gt;subcmd1name&amp;lt;/name&amp;gt;
+            &amp;lt;brief&amp;gt;subcmd1brief&amp;lt;/brief&amp;gt;
+            &amp;lt;help&amp;gt;subcmd1help&amp;lt;/help&amp;gt;
+            &amp;lt;function&amp;gt;subcmd1function&amp;lt;/function&amp;gt;
+        
+        ...
+            &lt;command&gt;&lt;/command&gt;
+            &amp;lt;name&amp;gt;subcmd2name&amp;lt;/name&amp;gt;
+            &amp;lt;brief&amp;gt;subcmd2brief&amp;lt;/brief&amp;gt;
+            &amp;lt;help&amp;gt;subcmd2help&amp;lt;/help&amp;gt;
+            &amp;lt;function&amp;gt;subcmd2function&amp;lt;/function&amp;gt;
         
     

-How many commands do we have here? Easy: two. What is different is HOW I can call these two commands. If I type
+How many commands do we have here? Easy: three. What is different is HOW you can call these two commands. If you type

     myprompt&amp;gt; cmdname 

-I am obviously calling the command ***cmdname***. But I type
+you are obviously calling the command ***cmdname***. But if you type

-    myprompt&amp;gt; cmdname intcmdname
+    myprompt&amp;gt; cmdname subcmd1name

-I am definitely calling ***intcmdname***. That means that, in order to call a subcommand, I have to type both the main *command* name and the internal *command* as well.
+you are calling ***subcmd1name***. That means that, in order to call a subcommand, you have to type both the main *command* name and the internal *command* name as well.
+
+Parameters
+----------------
+

 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-15T14:17:53.993000Z</published><updated>2015-10-15T14:17:53.993000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net3d63df4dc7d0450ec01d1385daa4e1f7b1ed0209</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -124,12 +124,12 @@
         &amp;lt;brief&amp;gt;cmdbrief&amp;lt;/brief&amp;gt;
         &amp;lt;help&amp;gt;cmdhelp&amp;lt;/help&amp;gt;
         &amp;lt;function&amp;gt;cmdfunction&amp;lt;/function&amp;gt;
-            &lt;command&gt;&lt;/command&gt;
-                &amp;lt;name&amp;gt;intcmdname&amp;lt;/name&amp;gt;
-                &amp;lt;brief&amp;gt;intcmdbrief&amp;lt;/brief&amp;gt;
-                &amp;lt;help&amp;gt;intcmdhelp&amp;lt;/help&amp;gt;
-                &amp;lt;function&amp;gt;intcmdfunction&amp;lt;/function&amp;gt;
-            
+        &lt;command&gt;&lt;/command&gt;
+            &amp;lt;name&amp;gt;intcmdname&amp;lt;/name&amp;gt;
+            &amp;lt;brief&amp;gt;intcmdbrief&amp;lt;/brief&amp;gt;
+            &amp;lt;help&amp;gt;intcmdhelp&amp;lt;/help&amp;gt;
+            &amp;lt;function&amp;gt;intcmdfunction&amp;lt;/function&amp;gt;
+        
     

&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-15T14:04:33.569000Z</published><updated>2015-10-15T14:04:33.569000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net457da995f74f6af1747b69600b37511ff7a194c0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -67,6 +67,7 @@
         
     &amp;lt;/context&amp;gt;

+
 The dots (...) are there to show that every context can have one or more commands

 The stars (\*\*\*) are there to show that every command has its own XML internal structure, that we are not showing here
@@ -75,7 +76,75 @@

     myprompt&amp;gt; 

-  
+
+For commands things are a bit more complicated.
+
+Let's start with simple things. The structure of the simplest *command*, that in fact does NOT have any *subcommand* and any *parameter*, looks instead like this:

+    &lt;command&gt;&lt;/command&gt;
+        &amp;lt;name&amp;gt;cmdname&amp;lt;/name&amp;gt;
+        &amp;lt;brief&amp;gt;cmdbrief&amp;lt;/brief&amp;gt;
+        &amp;lt;help&amp;gt;cmdhelp&amp;lt;/help&amp;gt;
+        &amp;lt;function&amp;gt;cmdfunction&amp;lt;/function&amp;gt;
+    
+    
+
+So when we are in the context where this command is defined, to call this command you have to type its name, that is ***cmdname*** in this case. 
+
+
+    myprompt&amp;gt; cmdname 
+    
+
+And, as a result of calling this function, the callback ***cmdfunction*** will be called.
+
+In case the command as some *parameters*, the structure will be very similar:
+
+    &lt;command&gt;&lt;/command&gt;
+        &amp;lt;name&amp;gt;cmdname&amp;lt;/name&amp;gt;
+        &amp;lt;brief&amp;gt;cmdbrief&amp;lt;/brief&amp;gt;
+        &amp;lt;help&amp;gt;cmdhelp&amp;lt;/help&amp;gt;
+        &amp;lt;function&amp;gt;cmdfunction&amp;lt;/function&amp;gt;
+        &amp;lt;param&amp;gt;
+            ***
+        &amp;lt;/param&amp;gt;
+        ...
+        &amp;lt;param&amp;gt;
+            ***
+        &amp;lt;/param&amp;gt;
+    
+
+
+Again, a command may have zero, one or more parameters.
+
+One more step ahead: a *command* with NO *parameters*, but with some *subcommands*.
+
+    &lt;command&gt;&lt;/command&gt;
+        &amp;lt;name&amp;gt;cmdname&amp;lt;/name&amp;gt;
+        &amp;lt;brief&amp;gt;cmdbrief&amp;lt;/brief&amp;gt;
+        &amp;lt;help&amp;gt;cmdhelp&amp;lt;/help&amp;gt;
+        &amp;lt;function&amp;gt;cmdfunction&amp;lt;/function&amp;gt;
+            &lt;command&gt;&lt;/command&gt;
+                &amp;lt;name&amp;gt;intcmdname&amp;lt;/name&amp;gt;
+                &amp;lt;brief&amp;gt;intcmdbrief&amp;lt;/brief&amp;gt;
+                &amp;lt;help&amp;gt;intcmdhelp&amp;lt;/help&amp;gt;
+                &amp;lt;function&amp;gt;intcmdfunction&amp;lt;/function&amp;gt;
+            
+    
+
+
+How many commands do we have here? Easy: two. What is different is HOW I can call these two commands. If I type
+
+
+    myprompt&amp;gt; cmdname 
+    
+
+I am obviously calling the command ***cmdname***. But I type
+
+
+    myprompt&amp;gt; cmdname intcmdname
+    
+    
+I am definitely calling ***intcmdname***. That means that, in order to call a subcommand, I have to type both the main *command* name and the internal *command* as well.
+
 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-15T13:19:58.548000Z</published><updated>2015-10-15T13:19:58.548000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net7ae2e7f8359ff1289132056c7d220619d6360dbf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -51,4 +51,31 @@
 **IMPORTANT NOTE ON PARAMETERS**
 As mentioned, every command could have up to one default parameter. If you want to specify it, you have to create a *parameter* without the ***name*** tag. Please remember that every command can have only one default parameter!

+
+Representing the tree as an XML file
+=============================
+The structure of a *context* looks like this:
+
+    &amp;lt;context&amp;gt;
+        &amp;lt;prompt&amp;gt;myprompt&amp;lt;/prompt&amp;gt;
+        &lt;command&gt;&lt;/command&gt;
+            ***
+        
+        ...
+        &lt;command&gt;&lt;/command&gt;
+            ***
+        
+    &amp;lt;/context&amp;gt;
+
+The dots (...) are there to show that every context can have one or more commands
+
+The stars (\*\*\*) are there to show that every command has its own XML internal structure, that we are not showing here
+ 
+The only attribute defined here is the prompt. When the CLI is running in this context, the prompt that will be shown is ***myprompt***
+
+    myprompt&amp;gt; 
+    
+  
+
+
 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-14T12:39:38.671000Z</published><updated>2015-10-14T12:39:38.671000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.netdbcd4cfd3e4d0a98f892b3fd27b75f1300b562ae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -48,7 +48,7 @@
 - ***numval***: the number of strings, typed aftet the parameter name, to be passed at runtime to the C callback as values of the specific parameter
 - ***reqval***: this attribute indicates whether theparameter's values are mandatory to process the command. Possbile values are "true" or "false"

-**IMPORTANT NOTE ON**
+**IMPORTANT NOTE ON PARAMETERS**
 As mentioned, every command could have up to one default parameter. If you want to specify it, you have to create a *parameter* without the ***name*** tag. Please remember that every command can have only one default parameter!

 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-14T12:37:03.666000Z</published><updated>2015-10-14T12:37:03.666000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.netf9ac32bfa81044e5634827173e57754ee892631a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -18,5 +18,37 @@
 - a *context* is a container of *commands*
 - *commands* can have *parameters*, *subcommands* and *subcontexts*, recursively
 - *parameters* do not have children
+- the root of the tree is the *main context*
+
+Attributes
+========
+
+*Contexts*, *commands* and *parameters* require addtional attributes, that are needed to specify the information about the relevant objects
+
+Attributes for Contexts
+--------------------------------
+
+- ***prompt***: the prompt to be displayed when the CLI is running in this context
+
+
+Attributes for Commands
+------------------------------------
+
+- ***name***: the command name, used to identify the command, and also the string to be used at runtime to call this command
+- ***brief***: a brief one line explanation of the command, to be displayed in the command list view and full help view
+- ***help***: a complete explanation of the command, to be displayed in the full help view only
+- ***function***: the name of the C function that will be called when the command gets executed (user callback)
+
+
+Attributes for Parameters
+------------------------------------
+
+- ***name***: the parameter name, used to identify the parameter, and also the string to be used at runtime to specify this parameter
+- ***required***: this attribute indicates whether this parameter is mandatory to process the command. Possbile values are "true" or "false"
+- ***numval***: the number of strings, typed aftet the parameter name, to be passed at runtime to the C callback as values of the specific parameter
+- ***reqval***: this attribute indicates whether theparameter's values are mandatory to process the command. Possbile values are "true" or "false"
+
+**IMPORTANT NOTE ON**
+As mentioned, every command could have up to one default parameter. If you want to specify it, you have to create a *parameter* without the ***name*** tag. Please remember that every command can have only one default parameter!

 **Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-14T09:30:25.945000Z</published><updated>2015-10-14T09:30:25.945000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.net8d970b4d1e42db39f352614d0b0063eec1a40946</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1 +1,22 @@
-UNDER CONSTRUCTION...
+The XML tree file
+=============
+
+The first step to create your own CLI, is to define the command tree, that represent the relation between the contexts and the available commands in each context.
+The way to to that is to define a XML tree structure file.
+
+The rules to follow are:
+
+- the root of the tree has to be a *context*, that we will call ***main context***. This is indeed the context you enter as soon as you run your CLI application
+- every *context* must be parent of at least one command
+- every *command* can parent of zero or any number of subcommands, that are represented as normal command tags
+- every *command* (or subcommand) can have zero or any number of parameters, but up to only one default parameter
+- a new *context* has to be the child node of a command. This means that, in order to enter the new context, its parent command has to be executed
+- a *parameter* does not have children nodes, and its parent is always a command
+
+In a few words:
+
+- a *context* is a container of *commands*
+- *commands* can have *parameters*, *subcommands* and *subcontexts*, recursively
+- *parameters* do not have children
+
+**Work in progress**
&lt;/pre&gt;
&lt;/div&gt;</summary></entry><entry><title>Defining the command tree: the XML tree file modified by zacmarco</title><link href="https://sourceforge.net/p/click-lib/wiki/Defining%2520the%2520command%2520tree%253A%2520the%2520XML%2520tree%2520file/" rel="alternate"/><published>2015-10-13T14:56:03.213000Z</published><updated>2015-10-13T14:56:03.213000Z</updated><author><name>zacmarco</name><uri>https://sourceforge.net/u/zacmarco/</uri></author><id>https://sourceforge.netdad29f0d6554d69886355b59f69b0d12bf8f0f51</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;UNDER CONSTRUCTION...&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>