Update of /cvsroot/smartwin/SmartWin/source
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26483
Modified Files:
CommandLine.cpp
Log Message:
Use SmartUtil::tstring not std::string
Index: CommandLine.cpp
===================================================================
RCS file: /cvsroot/smartwin/SmartWin/source/CommandLine.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CommandLine.cpp 5 May 2006 17:21:43 -0000 1.5
+++ CommandLine.cpp 22 Aug 2007 12:04:48 -0000 1.6
@@ -32,21 +32,21 @@
{
// begin namespace SmartWin
-std::vector< std::string > buildCommandLine( const char * cmdLine )
+SmartUtil::tstringcollection buildCommandLine( const SmartUtil::tstring cmdLine )
{
using namespace std;
- vector< string > retVal;
- if ( cmdLine == 0 )
- return std::vector< std::string >( 0 );
- string strCmdLine( cmdLine );
+ SmartUtil::tstringcollection retVal;
+ if ( cmdLine.empty() )
+ return SmartUtil::tstringcollection( 0 );
+ SmartUtil::tstring strCmdLine( cmdLine );
enum POS
{ EMPTY = '\0', STRING = '"', ESCAPED = '~'
};
POS pos = EMPTY;
- string buffer;
+ SmartUtil::tstring buffer;
// Looping over string to parse out Command line Arguments
- for ( std::string::iterator idx = strCmdLine.begin();
+ for ( SmartUtil::tstring::iterator idx = strCmdLine.begin();
idx != strCmdLine.end();
++idx )
{
@@ -97,21 +97,21 @@
}
CommandLine::CommandLine( const char * cmdLine )
- : itsCmdLine( buildCommandLine( cmdLine ) ),
- itsRawCmdLine( cmdLine )
{
+ itsRawCmdLine = SmartUtil::Ascii2CurrentBuild::doConvert( cmdLine, SmartUtil::ConversionCodepage::ANSI );
+ itsCmdLine = buildCommandLine( itsRawCmdLine );
}
CommandLine::~CommandLine()
{
}
-const std::vector< std::string > & CommandLine::getParams() const
+const SmartUtil::tstringcollection & CommandLine::getParams() const
{
return itsCmdLine;
}
-const char * CommandLine::getParamsRaw() const
+const SmartUtil::tstring CommandLine::getParamsRaw() const
{
return itsRawCmdLine;
}
|