paludis::Command Class Reference
[System]

#include <system.hh>

Inheritance diagram for paludis::Command:

paludis::PrivateImplementationPattern< C_ >

List of all members.

Iterate over our setenvs.

typedef WrappedForwardIterator
< ConstIteratorTag, const
std::pair< const std::string,
std::string > > 
ConstIterator
ConstIterator begin_setenvs () const
ConstIterator end_setenvs () const

Basic operations

 Command (const std::string &)
 Command (const char *const)
 Command (const Command &)
const Commandoperator= (const Command &)
 ~Command ()

Change command execution options

Commandwith_chdir (const FSEntry &)
Commandwith_setenv (const std::string &, const std::string &)
Commandwith_sandbox ()
Commandwith_echo_to_stderr ()
Commandwith_uid_gid (const uid_t, const gid_t)
Commandwith_stdout_prefix (const std::string &)
Commandwith_stderr_prefix (const std::string &)
Commandwith_prefix_discard_blank_output ()
Commandwith_prefix_blank_lines ()
Commandwith_pipe_command_handler (const std::tr1::function< std::string(const std::string &)> &)
Commandwith_captured_stdout_stream (std::ostream *const)
Commandwith_captured_stderr_stream (std::ostream *const)

Fetch command execution options

std::string command () const
std::string chdir () const
void echo_to_stderr () const
std::tr1::shared_ptr< const uid_t > uid () const
std::tr1::shared_ptr< const gid_t > gid () const
std::string stdout_prefix () const
std::string stderr_prefix () const
bool prefix_discard_blank_output () const
bool prefix_blank_lines () const
std::ostream * captured_stdout_stream () const
std::ostream * captured_stderr_stream () const


Detailed Description

A command to be run.

See also:
PStream

run_command


Member Function Documentation

Command& paludis::Command::with_chdir ( const FSEntry  ) 

Include a chdir before we run our command.

Command& paludis::Command::with_setenv ( const std::string &  ,
const std::string &   
)

Add a setenv before we run our command.

Command& paludis::Command::with_sandbox (  ) 

Run our command sandboxed.

Command& paludis::Command::with_echo_to_stderr (  ) 

Echo the command to be run to stderr before running it.

Command& paludis::Command::with_uid_gid ( const   uid_t,
const   gid_t 
)

Add a setuid and setgid before running our command.

Command& paludis::Command::with_stdout_prefix ( const std::string &   ) 

Prefix stdout output with this.

Command& paludis::Command::with_stderr_prefix ( const std::string &   ) 

Prefix stderr output with this.

Command& paludis::Command::with_prefix_discard_blank_output (  ) 

If prefixing, and if the output contains only blanks, don't display any output.

Command& paludis::Command::with_prefix_blank_lines (  ) 

If prefixing, prefix blank lines too.

Command& paludis::Command::with_pipe_command_handler ( const std::tr1::function< std::string(const std::string &)> &   ) 

Specify a pipe command handler.

Command& paludis::Command::with_captured_stdout_stream ( std::ostream *  const  ) 

Specify a stream to which stdout is captured and written.

Command& paludis::Command::with_captured_stderr_stream ( std::ostream *  const  ) 

Specify a stream to which stderr is captured and written.

Since:
0.30

std::string paludis::Command::command (  )  const

Our command, as a string.

std::string paludis::Command::chdir (  )  const

Where to chdir, as a string.

void paludis::Command::echo_to_stderr (  )  const

Echo ourself to stderr.

std::tr1::shared_ptr<const uid_t> paludis::Command::uid (  )  const

The uid for setuid.

std::tr1::shared_ptr<const gid_t> paludis::Command::gid (  )  const

The gid for setgid.

std::string paludis::Command::stdout_prefix (  )  const

The stdout prefix.

std::string paludis::Command::stderr_prefix (  )  const

The stderr prefix.

bool paludis::Command::prefix_discard_blank_output (  )  const

If prefixing, and if the output contains only blanks, don't display any output?

bool paludis::Command::prefix_blank_lines (  )  const

Prefix blank lines?

std::ostream* paludis::Command::captured_stdout_stream (  )  const

The captured stdout stream, or null.

std::ostream* paludis::Command::captured_stderr_stream (  )  const

The captured stderr stream, or null.

Since:
0.30


The documentation for this class was generated from the following file:

Generated on Sun Nov 30 23:01:34 2008 for paludis by  doxygen 1.5.5