From 038815ae3a019ac56fa1c62e18c5861166d3a975 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 18 Dec 2009 15:32:37 +0000 Subject: Wow, cool, Bu::Formatter can read all the basic types now, (int, float, bool, char, etc.) and OptParser totally works. I have one last change to make to it, which is using the return value of signal type options to determine weather or not the option took a parameter at all, especially in the case of short options. --- src/optparser.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 9 deletions(-) (limited to 'src/optparser.h') diff --git a/src/optparser.h b/src/optparser.h index acfb35d..425bc90 100644 --- a/src/optparser.h +++ b/src/optparser.h @@ -14,7 +14,7 @@ namespace Bu typedef Bu::Array StrArray; class OptParser { - public: + private: class _ValueProxy { public: @@ -54,6 +54,7 @@ namespace Bu ptype &v; }; + public: typedef Signal1 OptionSignal; class Option { @@ -70,6 +71,21 @@ namespace Bu _ValueProxy *pProxy; Bu::FString sOverride; }; + + private: + typedef Bu::List