Back to index

nordugrid-arc-nox  1.1.0~rc6
run_function.h
Go to the documentation of this file.
00001 #ifndef GRID_MANAGER_RUN_FUNCTION_H
00002 #define GRID_MANAGER_RUN_FUNCTION_H
00003 
00004 #include <arc/Run.h>
00005 
00006 #include "../jobs/users.h"
00007 
00008 class RunFunction {
00009  private:
00010   RunFunction(const JobUser& user,const char* cmdname,int (*func)(void*),void* arg):user_(user),cmdname_(cmdname?cmdname:""),func_(func),arg_(arg) { };
00011   ~RunFunction(void) { };
00012   const JobUser& user_;
00013   std::string cmdname_;
00014   int (*func_)(void*);
00015   void* arg_;
00016   static void initializer(void* arg);
00017  public:
00018   operator bool(void) { return true; };
00019   bool operator!(void) { return false; };
00020   static int run(const JobUser& user,const char* cmdname,int (*func)(void*),void* arg,int timeout);
00021 
00022 };
00023 
00024 #endif