My Project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
LibThread::ProcJob Class Reference

Public Member Functions

 ProcJob (const char *procname_init)
 
virtual void execute ()
 
- Public Member Functions inherited from LibThread::Job
 Job ()
 
 ~Job ()
 
void addDep (Job *job)
 
void addDep (vector< Job * > &jobs)
 
void addDep (long ndeps, Job **jobs)
 
void addNotify (vector< Job * > &jobs)
 
void addNotify (Job *job)
 
virtual bool ready ()
 
virtual void execute ()=0
 
void run ()
 
- Public Member Functions inherited from LibThread::SharedObject
 SharedObject ()
 
virtual ~SharedObject ()
 
void set_type (int type_init)
 
int get_type ()
 
void set_name (std::string &name_init)
 
void set_name (const char *s)
 
std::string & get_name ()
 
void incref (int by=1)
 
long decref ()
 
long getref ()
 
virtual BOOLEAN op2 (int op, leftv res, leftv a1, leftv a2)
 
virtual BOOLEAN op3 (int op, leftv res, leftv a1, leftv a2, leftv a3)
 

Private Attributes

string procname
 

Additional Inherited Members

- Data Fields inherited from LibThread::Job
ThreadPoolpool
 
long prio
 
size_t id
 
long pending_index
 
vector< Job * > deps
 
vector< Job * > notify
 
vector< Trigger * > triggers
 
vector< string > args
 
string result
 
void * data
 
bool fast
 
bool done
 
bool queued
 
bool running
 
bool cancelled
 

Detailed Description

Definition at line 2381 of file shared.cc.

Constructor & Destructor Documentation

◆ ProcJob()

LibThread::ProcJob::ProcJob ( const char *  procname_init)
inline

Definition at line 2384 of file shared.cc.

2384 : Job(),
2385 procname(procname_init) {
2386 set_name(procname_init);
2387 }
void set_name(std::string &name_init)
Definition: shared.cc:165

Member Function Documentation

◆ execute()

virtual void LibThread::ProcJob::execute ( )
inlinevirtual

Implements LibThread::Job.

Definition at line 2388 of file shared.cc.

2388 {
2389 vector<leftv> argv;
2390 for (unsigned i = 0; i <args.size(); i++) {
2391 appendArg(argv, args[i]);
2392 }
2393 for (unsigned i = 0; i < deps.size(); i++) {
2394 appendArg(argv, deps[i]->result);
2395 }
2396 sleftv val;
2397 int error = executeProc(val, procname.c_str(), argv);
2398 if (!error) {
2399 result = (LinTree::to_string(&val));
2400 val.CleanUp();
2401 }
2402 }
int i
Definition: cfEzgcd.cc:132
vector< string > args
Definition: shared.cc:1558
vector< Job * > deps
Definition: shared.cc:1555
string result
Definition: shared.cc:1559
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
void CleanUp(ring r=currRing)
Definition: subexpr.cc:348
#define error(a)
Definition: mpr_numeric.cc:966
static void appendArg(vector< leftv > &argv, string &s)
Definition: shared.cc:728
static BOOLEAN executeProc(sleftv &result, const char *procname, const vector< leftv > &argv)
Definition: shared.cc:749
std::string to_string(leftv val)
Definition: lintree.cc:843

Field Documentation

◆ procname

string LibThread::ProcJob::procname
private

Definition at line 2382 of file shared.cc.


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