Back to index

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Friends
Command Class Reference

#include <actiondb.h>

Inheritance diagram for Command:
Inheritance graph
Collaboration diagram for Command:
Collaboration graph

List of all members.

Public Member Functions

 Command ()
virtual void run ()
virtual const Glib::ustring get_label () const
virtual RModifiers prepare ()

Static Public Member Functions

static RCommand create (const std::string &c)

Public Attributes

std::string cmd

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Command (const std::string &c)


class boost::serialization::access

Detailed Description

Definition at line 64 of file actiondb.h.

Constructor & Destructor Documentation

Command::Command ( const std::string &  c) [inline, private]

Definition at line 67 of file actiondb.h.

: cmd(c) {}
Command::Command ( ) [inline]

Definition at line 70 of file actiondb.h.


Here is the caller graph for this function:

Member Function Documentation

static RCommand Command::create ( const std::string &  c) [inline, static]

Definition at line 71 of file actiondb.h.

{ return RCommand(new Command(c)); }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const Glib::ustring Command::get_label ( ) const [inline, virtual]

Implements Action.

Definition at line 73 of file actiondb.h.

{ return cmd; }
virtual RModifiers Action::prepare ( ) [inline, virtual, inherited]

Reimplemented in SendKey, and ModAction.

Definition at line 60 of file actiondb.h.

{ return RModifiers(); }
void Command::run ( ) [virtual]

Reimplemented from Action.

Definition at line 120 of file

       pid_t pid = fork();
       switch (pid) {
              case 0:
                     execlp("/bin/sh", "sh", "-c", cmd.c_str(), NULL);
              case -1:
                     printf(_("Error: can't execute command \"%s\": fork() failed\n"), cmd.c_str());
template<class Archive >
void Command::serialize ( Archive &  ar,
const unsigned int  version 
) [private]

Reimplemented from Action.

Definition at line 48 of file

       ar & boost::serialization::base_object<Action>(*this);
       ar & cmd;

Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Reimplemented from Action.

Definition at line 65 of file actiondb.h.

Member Data Documentation

std::string Command::cmd

Definition at line 69 of file actiondb.h.

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