Go to Overview over all GrAL packages.
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

src/IO/command-line.C

Go to the documentation of this file.
00001 
00002 // $LICENSE
00003 
00004 #include "IO/command-line.h"
00005 
00006 Commandline::Commandline(int argc, char* argv[]) : commands("") {
00007   //  ostringstream cmds;
00008   ostrstream cmds;
00009   for(int i = 1; i < argc; ++i)
00010     cmds << argv[i] << " ";
00011   cmds << '\n' << std::ends;
00012   int n = strlen(cmds.str());
00013   char* copy = new char[n+1];
00014   strcpy(copy,cmds.str());
00015   commands = std::string(copy);
00016 }
00017 
00018 //istringstream Commandline::get() const { return istringstream(commands);}
00019 //strstream Commandline::get() const { return strstream(commands.c_str());}
00020 const char* Commandline::c_str() const { 
00021   char* copy = new char[strlen(commands.c_str())+1];
00022   strcpy(copy,commands.c_str());
00023   return copy;
00024 }

Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 15:57:06 2002 for External control by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000