Changeset 1399:01de1d7cc31d
- Timestamp:
- 11/07/09 21:48:36 (2 years ago)
- Branch:
- default
- Location:
- src/include/libdodo
- Files:
-
- 4 edited
-
pcExecutionJob.h (modified) (1 diff)
-
pcExecutionManager.h (modified) (7 diffs)
-
pcExecutionManager.inline (modified) (1 diff)
-
pcExecutionManagerEx.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/include/libdodo/pcExecutionJob.h
r1386 r1399 97 97 virtual bool isRunning() const = 0; 98 98 99 protected: 100 99 101 mutable bool cloned; ///< true if object was cloned 100 102 }; -
src/include/libdodo/pcExecutionManager.h
r1386 r1399 55 55 * destructor 56 56 */ 57 virtual~manager();57 ~manager(); 58 58 59 59 /** … … 62 62 * @param job defines job for managing 63 63 */ 64 virtualunsigned long add(const T &job);64 unsigned long add(const T &job); 65 65 66 66 /** … … 69 69 * @param terminate defines termination condition 70 70 */ 71 v irtual void remove(unsigned long id,71 void remove(unsigned long id, 72 72 bool terminate = false); 73 73 … … 77 77 * @param force defines run condition; if true and job is running run job anyway 78 78 */ 79 v irtual void run(unsigned long id);79 void run(unsigned long id); 80 80 81 81 /** … … 83 83 * @param id defines job identificator 84 84 */ 85 v irtual void stop(unsigned long id);85 void stop(unsigned long id); 86 86 87 87 /** 88 88 * stop all registered jobs 89 89 */ 90 v irtual void stop();90 void stop(); 91 91 92 92 /** … … 95 95 * @param id defines job identificator 96 96 */ 97 virtualint wait(unsigned long id);97 int wait(unsigned long id); 98 98 99 99 /** 100 100 * wait for all registered jobs termination 101 101 */ 102 v irtual void wait();102 void wait(); 103 103 104 104 /** … … 106 106 * @param id defines job identificator 107 107 */ 108 virtualbool isRunning(unsigned long id) const;108 bool isRunning(unsigned long id) const; 109 109 110 110 /** 111 111 * @return amount of running jobs 112 112 */ 113 virtualunsigned long running() const;113 unsigned long running() const; 114 114 115 115 /** 116 116 * @return list of jobs in object 117 117 */ 118 virtual dodoList<unsigned long> jobs(); 118 dodoList<unsigned long> jobs(); 119 120 /** 121 * @return job object 122 * @param id defines job identificator 123 */ 124 T *job(unsigned long id); 119 125 120 126 protected: -
src/include/libdodo/pcExecutionManager.inline
r1386 r1399 223 223 224 224 //------------------------------------------------------------------- 225 226 template <typename T> 227 T * 228 dodo::pc::execution::manager<T 229 >::job(unsigned long id) 230 { 231 pc::sync::stack tg(keeper); 232 233 typename dodoMap<unsigned long, T>::const_iterator job = handles.find(id); 234 235 if (job == handles.end()) 236 throw exception::basic(exception::MODULE_PCEXECUTIONMANAGER, MANAGEREX_JOB, exception::ERRNO_LIBDODO, MANAGEREX_NOTFOUND, PCEXECUTIONMANAGEREX_NOTFOUND_STR, __LINE__, __FILE__); 237 238 return (T *)&job->second; 239 } 240 241 //------------------------------------------------------------------- -
src/include/libdodo/pcExecutionManagerEx.h
r1386 r1399 57 57 MANAGEREX_STOP, 58 58 MANAGEREX_ISRUNNING, 59 MANAGEREX_JOB, 59 60 }; 60 61 };
Note: See TracChangeset
for help on using the changeset viewer.
