Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / examples / RTScheduling / Job_i.h
blob68976b7d96ba19cb2642e71b816d34e230216b13
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Job_i.h
6 * This file defines the servant for the Job.idl interface
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 */
10 //=============================================================================
11 #ifndef JOB_I_H
12 #define JOB_I_H
14 #include "JobS.h"
15 #include "Task_Stats.h"
16 #include "rtschedtestlib_export.h"
18 #include "ace/SString.h"
19 #include "ace/Arg_Shifter.h"
21 class DT_Creator;
23 /**
24 * @class Job_i
26 * @brief Implements a Job that performs some cpu bound work.
28 class RTSCHEDTESTLIB_Export Job_i : public POA_Job
30 public:
31 /// Constructor
32 Job_i (DT_Creator* dt_creator);
34 ~Job_i (void);
36 /// Init the state of this object.
37 int init (ACE_Arg_Shifter& arg_shifter);
39 /// = Accessors
40 const ACE_CString& name (void);
41 const ACE_CString& poa (void);
43 /// = inteface Job method implementation.
44 virtual void work (CORBA::ULong work,
45 CORBA::Short importance);
47 virtual void post_work (int guid,
48 int importance);
50 void dump_stats (void);
52 virtual void shutdown (void);
54 int guid (void);
56 protected:
57 /// The name of this Job
58 ACE_CString job_name_;
60 /// The name of the POA that we live in.
61 ACE_CString POA_name_;
63 DT_Creator* dt_creator_;
65 Task_Stats *task_stats_;
67 size_t guid_;
70 #endif /* JOB_I_H */