summaryrefslogtreecommitdiff
path: root/TAO/tao/GIOP_Message_Version.h
blob: 4605ad57ff4a687159a7dd9fa493bc11f98c0d20 (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
69
70
71
72
73
74
75
76
77
// -*- C++ -*-

//=============================================================================
/**
 *  @file     GIOP_Message_Version.h
 *
 *   GIOP Version utility class definition
 *
 *  @author  Chris Cleeland <cleeland@cs.wustl.edu>
 *  @author  Carlos O' Ryan <coryan@uci.edu>
 */
//=============================================================================

#ifndef TAO_GIOP_MESSAGE_VERSION_H
#define TAO_GIOP_MESSAGE_VERSION_H

#include /**/ "ace/pre.h"

#include /**/ "tao/TAO_Export.h"

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

#include "tao/Basic_Types.h"
#include "tao/orbconf.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class TAO_ORB_Core;

/**
 * @class TAO_GIOP_Message_Version
 *
 * @brief Major and Minor version number of the Inter-ORB Protocol.
 */
class TAO_Export TAO_GIOP_Message_Version
{
public:
  /// Major version number
  CORBA::Octet major;

  /// Get major version number
  CORBA::Octet major_version () const;

  /// Minor version number
  CORBA::Octet minor;

  /// Get minor version number
  CORBA::Octet minor_version () const;

  /// Copy constructor
  TAO_GIOP_Message_Version (const TAO_GIOP_Message_Version &src);

  /// Default constructor.
  TAO_GIOP_Message_Version (CORBA::Octet maj = TAO_DEF_GIOP_MAJOR,
                            CORBA::Octet min = TAO_DEF_GIOP_MINOR);

  /// Explicitly set the major and minor version.
  void set_version (CORBA::Octet maj, CORBA::Octet min);

  /// Copy operator.
  TAO_GIOP_Message_Version &operator= (const TAO_GIOP_Message_Version &src);

  /// Equality operator
  bool operator== (const TAO_GIOP_Message_Version &src) const;
  bool operator!= (const TAO_GIOP_Message_Version &src) const;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#if defined (__ACE_INLINE__)
# include "tao/GIOP_Message_Version.inl"
#endif /* __ACE_INLINE__ */

#include /**/ "ace/post.h"
#endif /*TAO_GIOP_VERSION_H */