Sched_Params.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Sched_Params.inl
00006  *
00007  *  $Id: Sched_Params.inl 80826 2008-03-04 14:51:23Z wotte $
00008  *
00009  *  @author David Levine
00010  */
00011 //=============================================================================
00012 
00013 
00014 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 ACE_INLINE
00017 ACE_Sched_Params::ACE_Sched_Params (
00018       const Policy policy,
00019       const ACE_Sched_Priority priority,
00020       const int scope,
00021       const ACE_Time_Value &quantum)
00022   : policy_ (policy),
00023     priority_ (priority),
00024     scope_ (scope),
00025     quantum_ (quantum)
00026 {
00027 }
00028 
00029 ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params (void)
00030 {
00031 }
00032 
00033 ACE_INLINE ACE_Sched_Params::Policy
00034 ACE_Sched_Params::policy (void) const
00035 {
00036   return this->policy_;
00037 }
00038 
00039 ACE_INLINE void
00040 ACE_Sched_Params::policy (const ACE_Sched_Params::Policy policy)
00041 {
00042   this->policy_ = policy;
00043 }
00044 
00045 ACE_INLINE ACE_Sched_Priority
00046 ACE_Sched_Params::priority (void) const
00047 {
00048   return this->priority_;
00049 }
00050 
00051 ACE_INLINE void
00052 ACE_Sched_Params::priority (const ACE_Sched_Priority priority)
00053 {
00054   this->priority_ = priority;
00055 }
00056 
00057 ACE_INLINE int
00058 ACE_Sched_Params::scope (void) const
00059 {
00060   return this->scope_;
00061 }
00062 
00063 ACE_INLINE void
00064 ACE_Sched_Params::scope (const int scope)
00065 {
00066   this->scope_ = scope;
00067 }
00068 
00069 ACE_INLINE const ACE_Time_Value &
00070 ACE_Sched_Params::quantum (void) const
00071 {
00072   return this->quantum_;
00073 }
00074 
00075 ACE_INLINE void
00076 ACE_Sched_Params::quantum (const ACE_Time_Value &quant)
00077 {
00078   this->quantum_ = quant;
00079 }
00080 
00081 ACE_INLINE const ACE_Sched_Params::Policy &
00082 ACE_Sched_Priority_Iterator::policy (void) const
00083 {
00084   return this->policy_;
00085 }
00086 
00087 ACE_INLINE int
00088 ACE_Sched_Priority_Iterator::scope (void) const
00089 {
00090   return this->scope_;
00091 }
00092 
00093 ACE_INLINE
00094 ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator (const ACE_Sched_Params::Policy &policy,
00095                                                           int scope)
00096  : policy_ (policy),
00097    scope_ (scope),
00098    priority_ (0),
00099    done_ (0)
00100 {
00101   priority_ = ACE_Sched_Params::priority_min (this->policy (), this->scope ());
00102 }
00103 
00104 ACE_INLINE
00105 ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator (void)
00106 {
00107 }
00108 
00109 ACE_INLINE int
00110 ACE_Sched_Priority_Iterator::more (void) const
00111 {
00112   return !this->done_;
00113 }
00114 
00115 ACE_INLINE int
00116 ACE_Sched_Priority_Iterator::priority (void) const
00117 {
00118   return this->priority_;
00119 }
00120 
00121 ACE_INLINE void
00122 ACE_Sched_Priority_Iterator::next (void)
00123 {
00124   if (this->done_)
00125     return;
00126 
00127   int old_priority = this->priority_;
00128   priority_ = ACE_Sched_Params::next_priority (this->policy (),
00129                                                this->priority (),
00130                                                this->scope ());
00131   this->done_ = old_priority == priority_;
00132 }
00133 
00134 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:18:42 2010 for ACE by  doxygen 1.4.7