RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cmdline.h
Go to the documentation of this file.
1 /*
2  The Real-Time eXperiment Interface (RTXI)
3  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 
20 #include <mutex.h>
21 #include <string>
22 
23 class CmdLine
24 {
25 
26 public:
27 
28  int execute(const std::string &);
29 
30  static CmdLine *getInstance(void);
31 
32 private:
33 
34  /*****************************************************************
35  * The constructor, destructor, and assignment operator are made *
36  * private to control instantiation of the class. *
37  *****************************************************************/
38 
39  CmdLine(void);
40  ~CmdLine(void);
41  CmdLine(const CmdLine &) {};
43  {
44  return *getInstance();
45  };
46 
47  static CmdLine *instance;
48 
49  volatile bool done;
50  pid_t child;
51 
52  int fdm[2];
53  int fds[2];
54 
56 
57 }; // class CmdLine
volatile bool done
Definition: cmdline.h:49
static CmdLine * getInstance(void)
Definition: cmdline.cpp:79
pid_t child
Definition: cmdline.h:50
Definition: mutex.h:28
static CmdLine * instance
Definition: cmdline.h:45
Mutex mutex
Definition: cmdline.h:55
CmdLine(void)
Definition: cmdline.cpp:27
CmdLine & operator=(const CmdLine &)
Definition: cmdline.h:42
int fds[2]
Definition: cmdline.h:53
~CmdLine(void)
Definition: cmdline.cpp:56
int execute(const std::string &)
Definition: cmdline.cpp:63
int fdm[2]
Definition: cmdline.h:52
CmdLine(const CmdLine &)
Definition: cmdline.h:41