4 //=============================================================================
6 * @file Linear_Priority_Mapping.h
8 * Declares the Linear_Priority_Mapping interface, as defined in the
11 * @author Carlos O'Ryan (coryan@cs.wustl.edu)
13 //=============================================================================
16 #ifndef TAO_LINEAR_PRIORITY_MAPPING_H
17 #define TAO_LINEAR_PRIORITY_MAPPING_H
18 #include /**/ "ace/pre.h"
20 #include "tao/orbconf.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
28 #include "tao/RTCORBA/rtcorba_export.h"
29 #include "tao/RTCORBA/Priority_Mapping.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 * @class TAO_Linear_Priority_Mapping
36 * @brief A simple implementation of the Priority_Mapping interface.
38 * This implementation uses linear mapping between the range of
39 * priorities for a given scheduling class (ACE_SCHED_OTHER,
40 * ACE_SCHED_FIFO, ACE_SCHED_RR) and the valid range of CORBA
41 * priorities (0...32767)
43 class TAO_RTCORBA_Export TAO_Linear_Priority_Mapping
: public TAO_Priority_Mapping
46 /// Default constructor
47 TAO_Linear_Priority_Mapping (long policy
);
50 virtual ~TAO_Linear_Priority_Mapping ();
52 virtual CORBA::Boolean
to_native (RTCORBA::Priority corba_priority
,
53 RTCORBA::NativePriority
&native_priority
);
54 virtual CORBA::Boolean
to_CORBA (RTCORBA::NativePriority native_priority
,
55 RTCORBA::Priority
&corba_priority
);
58 /// The scheduling policy
66 TAO_END_VERSIONED_NAMESPACE_DECL
68 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
70 #include /**/ "ace/post.h"
71 #endif /* TAO_LINEAR_PRIORITY_MAPPING_H */