Logo Search packages:      
Sourcecode: ddd version File versions  Download package

Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends

Agent Class Reference

Inheritance diagram for Agent:
Inheritance graph
Collaboration diagram for Agent:
Collaboration graph

List of all members.

Public Member Functions

void _hangup ()
void _kill (int sig=SIGKILL)
void _terminate ()
void addHandler (unsigned type, AgentHandlerProc proc, void *client_data=0)
void addHandler (const Agent &a)
 Agent (const Agent &c)
 Agent (FILE *in=stdin, FILE *out=stdout, FILE *err=0, unsigned nTypes=Agent_NTypes)
 Agent (const string &pth, unsigned nTypes=Agent_NTypes)
 Agent (bool, unsigned nTypes=Agent_NTypes)
bool beingTerminated () const
virtual void commit ()
virtual Agentdup () const
FILE * errorfp () const
virtual void handlerChange ()
int & hangupTimeOut ()
int hangupTimeOut () const
bool hasHandler (unsigned type) const
void hasNewStatus (int status)
FILE * inputfp () const
int & killTimeOut ()
int killTimeOut () const
int lastStatus () const
string name () const
virtual bool OK () const
FILE * outputfp () const
const stringpath () const
pid_t pid () const
void removeAllHandlers (unsigned type)
void removeAllHandlers ()
void removeHandler (unsigned type, AgentHandlerProc proc, void *client_data=0)
bool running ()
virtual void shutdown ()
virtual void start ()
virtual void terminate (bool onExit=false)
int terminateTimeOut () const
int & terminateTimeOut ()
virtual void wait ()

Static Public Attributes

static AgentManager runningAgents

Protected Member Functions

virtual void abort ()
virtual void activateIO ()
void addDefaultHandler (unsigned type)
void callHandlers (int type, void *call_data=0)
virtual void callHandlersWhenIdle (int type, void *call_data=0)
virtual void closeChannel (FILE *fp)
virtual void deactivateIO ()
virtual void errorEOF ()
virtual void executeChild ()
virtual void inputEOF ()
bool inputIsTerminal () const
bool onTerminal () const
bool outputIsTerminal () const
virtual void restoreParentIO ()
virtual int setupChildCommunication ()
virtual int setupCommunication ()
virtual int setupParentCommunication ()
virtual void waitToTerminate ()

Static Protected Member Functions

static void defaultHandler (Agent *source, void *client_data, void *call_data)

Protected Attributes

FILE * _errorfp
FILE * _inputfp
FILE * _outputfp
string _path
HandlerList handlers

Private Member Functions

void _raise (const char *msg_, int handler, bool system_error, bool check_if_running)
void checkIfDead ()
Agentoperator= (const Agent &)
void setRunning ()
void startChildProcess ()
void unsetRunning ()

Static Private Member Functions

static void childStatusChange (int sig)

Private Attributes

bool _beingTerminated
int _hangupTimeOut
int _killTimeOut
int _lastStatus
pid_t _pid
bool _running
int _terminateTimeOut
int to_child [2]
int to_parent [2]
int to_parent_error [2]


class AgentManager

Detailed Description

Definition at line 132 of file Agent.h.

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

Generated by  Doxygen 1.6.0   Back to index