<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to MainArguments</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description>Recent changes to MainArguments</description><atom:link href="https://sourceforge.net/p/tsar/wiki/MainArguments/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 30 Aug 2012 13:46:02 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tsar/wiki/MainArguments/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage MainArguments modified by rwaury</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description>&lt;pre&gt;--- v4
+++ v5
@@ -1,9 +1,13 @@
 Allows to easily map flags from command line input to program parameters.
+
+* * *
 
 ## Files ##
 
 MainArguments.cpp
 MainArguments.h
+
+* * *
 
 ## Functions ##
 
@@ -27,6 +31,8 @@
         bool *Specified;
         };
 ~~~~~
+
+* * *
 
 ## Usage ##
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rwaury</dc:creator><pubDate>Thu, 30 Aug 2012 13:46:02 -0000</pubDate><guid>https://sourceforge.net2ed53cff53e4383cc6fc66bc5b8d700289d1bf8a</guid></item><item><title>WikiPage MainArguments modified by rwaury</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description>&lt;pre&gt;--- v3
+++ v4
@@ -1,3 +1,5 @@
+Allows to easily map flags from command line input to program parameters.
+
 ## Files ##
 
 MainArguments.cpp
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rwaury</dc:creator><pubDate>Thu, 30 Aug 2012 12:39:16 -0000</pubDate><guid>https://sourceforge.nete31889b896d790785dd8325f721e45057c1d84ee</guid></item><item><title>WikiPage MainArguments modified by rwaury</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -1,7 +1,61 @@
 ## Files ##
 
-## Classes ##
+MainArguments.cpp
+MainArguments.h
 
 ## Functions ##
 
+###### bool ParseArguments(ParameterList Parameters[], int argc, const char \*argv[], const char \*\*\*argvEnd=NULL) ######
+
+Parameters are filled with associated arguments. 
+                
+The function assumes argv\[0\] is the program name, so it is skipped. If parsing should start from a center argument, (i.e. i &gt;= 1) set &amp;argv\[i-1\] and argc-i+1.
+
+Parsing ends when all the arguments are parsed sucessfully or at the first argument that has no associated parameter.
+
+If argvEnd is not NULL, the argvEnd is set to the argument that didn't parse and the function returns true.
+
+If argvEnd is NULL, the function returns false.
+
+~~~~~
+struct ParameterList
+        {
+        const char *Switch;
+        const char **Value;
+        bool *Specified;
+        };
+~~~~~
+
 ## Usage ##
+
+Example:
+
+~~~~~
+#include "MainArguments.h"
+
+main(int argc, const char* argv[])
+        const char *Filename = NULL;
+        const char *TraceFilename = NULL;
+        const char *ExcludeFilename = NULL;
+        bool WriteExcludeList = false;
+        bool NoExcludeList = false;
+        bool Debug = false;
+        ParameterList Parameters[] =
+                {
+                        {"-f",&amp;Filename,NULL},
+                        {"-tf",&amp;TraceFilename,NULL},
+                        {"-exclude+",&amp;ExcludeFilename,&amp;WriteExcludeList},
+                        {"-exclude-",NULL,&amp;NoExcludeList},
+                        {"-exclude",&amp;ExcludeFilename,NULL},
+                        {"-debug",NULL,&amp;Debug},
+                        {NULL,NULL,NULL}
+                };
+        bool Status = ParseArguments(Parameters,argc,argv);
+        if (!Status)
+                {
+                Help(argv[0]);
+                return 1;
+                }
+        return 0;
+        }
+~~~~~
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rwaury</dc:creator><pubDate>Thu, 30 Aug 2012 12:12:36 -0000</pubDate><guid>https://sourceforge.netc2466275b6be7cf0745f35afede2fe9f8c18fce7</guid></item><item><title>WikiPage MainArguments modified by rwaury</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -0,0 +1,7 @@
+## Files ##
+
+## Classes ##
+
+## Functions ##
+
+## Usage ##
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rwaury</dc:creator><pubDate>Wed, 29 Aug 2012 09:09:04 -0000</pubDate><guid>https://sourceforge.netb22ba2f4c233e222f6ec525d74bb48f565434f4c</guid></item><item><title>WikiPage MainArguments modified by rwaury</title><link>https://sourceforge.net/p/tsar/wiki/MainArguments/</link><description/><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rwaury</dc:creator><pubDate>Wed, 29 Aug 2012 08:30:37 -0000</pubDate><guid>https://sourceforge.netabeff1e0460796ebb98eecf6bfb052ba53ec78bb</guid></item></channel></rss>