summaryrefslogtreecommitdiff
path: root/TAO/tao/Priority_Mapping.h
blob: 16bb22ed8040a09d089ade6417e1f11e0bd9dff8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// $Id$

// ============================================================================
//
// = LIBRARY
//   TAO
//
// = FILENAME
//   Priority_Mapping.h
//
// = DESCRIPTION
//   Declares the Priority_Mapping interface, as defined in the
//   RT-CORBA spec.
//
// = AUTHOR
//   Carlos O'Ryan (coryan@cs.wustl.edu)
//
// ============================================================================

#ifndef TAO_PRIORITY_MAPPING_H
#define TAO_PRIORITY_MAPPING_H

#include "tao/orbconf.h"

#if defined (TAO_HAS_RT_CORBA)

#include "tao/rtcorbafwd.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class TAO_Export TAO_Priority_Mapping
{
  //
  // = TITLE
  //   The interface for priority mapping.
  //
  // = DESCRIPTION
  //   Check the RT-CORBA spec (orbos/99-02-12) secions 4.5.2
  //
public:
  TAO_Priority_Mapping (int policy = ACE_SCHED_OTHER);
  // Default constructor

  virtual ~TAO_Priority_Mapping (void);
  // The destructor

  virtual CORBA::Boolean
      to_native (RTCORBA::Priority corba_priority,
                 RTCORBA::NativePriority &native_priority);
  virtual CORBA::Boolean
      to_CORBA (RTCORBA::NativePriority native_priority,
                RTCORBA::Priority &corba_priority);

private:
  int policy_;
  int min_;
  int max_;
};

#if defined (__ACE_INLINE__)
# include "tao/Priority_Mapping.i"
#endif /* __ACE_INLINE__ */

#endif /* TAO_HAS_RT_CORBA */

#endif /* TAO_PRIORITY_MAPPING_H */