summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Encoding.hxx.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-20 19:27:36 (GMT)
committerBrad King <brad.king@kitware.com>2013-12-20 19:27:36 (GMT)
commitf4fcfc6ef354c9e56ef054ddf77151627fbea5dc (patch)
tree3e6a00d11508a68dd00e64bb4326e434ae96919c /Source/kwsys/Encoding.hxx.in
parent6820882be57942403fa7eaf706a0169fd2816fc2 (diff)
parent7aa3c2015f773d9b9433ca72242d03470c461c27 (diff)
downloadCMake-f4fcfc6ef354c9e56ef054ddf77151627fbea5dc.zip
CMake-f4fcfc6ef354c9e56ef054ddf77151627fbea5dc.tar.gz
CMake-f4fcfc6ef354c9e56ef054ddf77151627fbea5dc.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/Encoding.hxx.in')
-rw-r--r--Source/kwsys/Encoding.hxx.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/kwsys/Encoding.hxx.in b/Source/kwsys/Encoding.hxx.in
index 60a4a8e..aba4175 100644
--- a/Source/kwsys/Encoding.hxx.in
+++ b/Source/kwsys/Encoding.hxx.in
@@ -14,6 +14,7 @@
#include <@KWSYS_NAMESPACE@/Configure.hxx>
#include <@KWSYS_NAMESPACE@/stl/string>
+#include <@KWSYS_NAMESPACE@/stl/vector>
/* Define these macros temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
@@ -25,6 +26,36 @@ namespace @KWSYS_NAMESPACE@
class @KWSYS_NAMESPACE@_EXPORT Encoding
{
public:
+
+ // Container class for argc/argv.
+ class CommandLineArguments
+ {
+ public:
+ // On Windows, get the program command line arguments
+ // in this Encoding module's 8 bit encoding.
+ // On other platforms the given argc/argv is used, and
+ // to be consistent, should be the argc/argv from main().
+ static CommandLineArguments Main(int argc, char const* const* argv);
+
+ // Construct CommandLineArguments with the given
+ // argc/argv. It is assumed that the string is already
+ // in the encoding used by this module.
+ CommandLineArguments(int argc, char const* const* argv);
+
+ // Construct CommandLineArguments with the given
+ // argc and wide argv. This is useful if wmain() is used.
+ CommandLineArguments(int argc, wchar_t const* const* argv);
+ ~CommandLineArguments();
+ CommandLineArguments(const CommandLineArguments&);
+ CommandLineArguments& operator=(const CommandLineArguments&);
+
+ int argc() const;
+ char const* const* argv() const;
+
+ protected:
+ std::vector<char*> argv_;
+ };
+
/**
* Convert between char and wchar_t
*/