From: g0dil Date: Mon, 16 Nov 2009 11:42:47 +0000 (+0000) Subject: Utils/Console: Document console supported types X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=9465eb3519ce665237bad18498883a436bbe7867;p=senf.git Utils/Console: Document console supported types git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1530 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Console/Mainpage.dox b/senf/Utils/Console/Mainpage.dox index 51b6360..7d7c79b 100644 --- a/senf/Utils/Console/Mainpage.dox +++ b/senf/Utils/Console/Mainpage.dox @@ -1176,11 +1176,64 @@ After this setup, \c varChanged will be called, whenever the value has changed. - \section console_args Special types + \section console_args Console library supported types - By default, types which can be read and written using \c iostreams are automatically - supported. Other types need to be registered explicitly + By default, types which can be read and written using \c iostreams are automatically supported. + This includes all the C++ built-in types as well as user defined streamable types. + An exception is made for all \c char types: These types are by default parsed as \e numeric + values not single-character data. To interpret \c char values as single-char strings, use \ref + senf::console::CharAsString. + + \subsection console_args_stl STL container support + + The %console library contains support for the STL container types: \c std::vector, \c + std::list, \c std::set, \c std::multiset, \c std::map and \c std::multimap. + + All container types are parsed as parenthesized list of elements. Each element is parsed as + defined for the element type: + + \c vector, \c list or \c set of integers +
+    (1 2 3)
+    
+ + \c vector, \c list or \c set of strings +
+    ("String 1" "String 2" "String 3")
+    
+ + \c vector, \c list or \c set of \c pair<\c int,\c string> +
+    ((1 "String 1") (2 "String 2") (3 "String 3"))
+    
+ + Empty collection +
+    ()
+    
+ + Collection's with only one element may skip the parenthesis if and only if the element + type does not need additional parenthesis + + A \c vector, \c list or \c set of integer with one element may be written with or without + parenthesis +
+    (1) 
+    1
+    
+ + \e but a single element \c vector, \c list or \c set of \c pair<\c int,\c string> may \e only be + written +
+    ((1 "String 1"))
+    
+ + In mapping containers, the key and value are separated by \c =: +
+    (foo=1 bar=2 "foo bar"=3)
+    
+ \subsection console_args_bool Boolean arguments and return values