RTXI 1.3
include/cmdline.h
Go to the documentation of this file.
00001 /*
00002  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
00003 
00004  This program is free software: you can redistribute it and/or modify
00005  it under the terms of the GNU General Public License as published by
00006  the Free Software Foundation, either version 3 of the License, or
00007  (at your option) any later version.
00008 
00009  This program is distributed in the hope that it will be useful,
00010  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  GNU General Public License for more details.
00013 
00014  You should have received a copy of the GNU General Public License
00015  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017  */
00018 
00019 #include <mutex.h>
00020 #include <string>
00021 
00022 class CmdLine {
00023 
00024 public:
00025 
00026      int execute(const std::string &);
00027 
00028     static CmdLine *getInstance(void);
00029 
00030 private:
00031 
00032     /*****************************************************************
00033      * The constructor, destructor, and assignment operator are made *
00034      *   private to control instantiation of the class.              *
00035      *****************************************************************/
00036 
00037     CmdLine(void);
00038     ~CmdLine(void);
00039     CmdLine(const CmdLine &) {};
00040     CmdLine &operator=(const CmdLine &) { return *getInstance(); };
00041 
00042     static CmdLine *instance;
00043 
00044     volatile bool done;
00045     pid_t child;
00046 
00047     int fdm[2];
00048     int fds[2];
00049 
00050     Mutex mutex;
00051 
00052 }; // class CmdLine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines