cxxtools::posix::BasicExec< dataSize, maxArgs > Class Template Reference

cxxtools::posix::Exec is a wrapper around the exec?? functions of posix. More...

#include <cxxtools/posix/exec.h>

Inheritance diagram for cxxtools::posix::BasicExec< dataSize, maxArgs >:
cxxtools::NonCopyable

Public Types

typedef const std::string & const_reference
typedef std::string & reference

Public Member Functions

 BasicExec (const std::string &cmd)
BasicExecpush_back (const std::string &arg)
BasicExecarg (const std::string &arg)
void exec ()

Additional Inherited Members

- Private Member Functions inherited from cxxtools::NonCopyable
 NonCopyable ()

Detailed Description

template<unsigned dataSize, unsigned maxArgs>
class cxxtools::posix::BasicExec< dataSize, maxArgs >

cxxtools::posix::Exec is a wrapper around the exec?? functions of posix.

Usage is like this:

e.push_back("-l");
e.exec();

This replaces the current process with the unix command "ls -l".

Member Typedef Documentation

template<unsigned dataSize, unsigned maxArgs>
typedef const std::string& cxxtools::posix::BasicExec< dataSize, maxArgs >::const_reference
template<unsigned dataSize, unsigned maxArgs>
typedef std::string& cxxtools::posix::BasicExec< dataSize, maxArgs >::reference

Constructor & Destructor Documentation

template<unsigned dataSize, unsigned maxArgs>
cxxtools::posix::BasicExec< dataSize, maxArgs >::BasicExec ( const std::string &  cmd)
inlineexplicit

Member Function Documentation

template<unsigned dataSize, unsigned maxArgs>
BasicExec& cxxtools::posix::BasicExec< dataSize, maxArgs >::arg ( const std::string &  arg)
inline
template<unsigned dataSize, unsigned maxArgs>
void cxxtools::posix::BasicExec< dataSize, maxArgs >::exec ( )
inline
template<unsigned dataSize, unsigned maxArgs>
BasicExec& cxxtools::posix::BasicExec< dataSize, maxArgs >::push_back ( const std::string &  arg)
inline

The documentation for this class was generated from the following file:
  • include/cxxtools/posix/exec.h