Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / RTCORBA / Linear_Priority_Mapping.h
blobdc8216294f2da6d96f99e38bca1780c0cb33fe4b
1 // -*- C++ -*-
4 //=============================================================================
5 /**
6 * @file Linear_Priority_Mapping.h
8 * Declares the Linear_Priority_Mapping interface, as defined in the
9 * RT-CORBA spec.
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)
23 # 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
33 /**
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
45 public:
46 /// Default constructor
47 TAO_Linear_Priority_Mapping (long policy);
49 /// The destructor
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);
57 private:
58 /// The scheduling policy
59 long policy_;
61 // The range
62 int const min_;
63 int const max_;
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 */