summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/Creation_Time.h
blob: 5fb58f93e72ee8b08abcd075aba91d839e82ed52 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Creation_Time.h
 *
 *  $Id$
 *
 *  Header file for Creation_Time and Temporary_Creation_Time
 *
 *  @author  Irfan Pyarali <irfan@cs.wustl.edu>
 */
//=============================================================================

#ifndef TAO_CREATION_TIME_H
#define TAO_CREATION_TIME_H

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

#include "ace/Time_Value.h"
#include "tao/Basic_Types.h"

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

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  namespace Portable_Server
  {
    class Temporary_Creation_Time;

    class Creation_Time
    {
    public:
      explicit Creation_Time (const ACE_Time_Value &creation_time);

      Creation_Time (void);

      void creation_time (const void *creation_time);

      const void *creation_time (void) const;

      static CORBA::ULong creation_time_length (void);

      bool operator== (const Creation_Time &rhs) const;

      bool operator!= (const Creation_Time &rhs) const;

      bool operator== (const Temporary_Creation_Time &rhs) const;

      bool operator!= (const Temporary_Creation_Time &rhs) const;

    protected:

      enum
      {
        SEC_FIELD = 0,
        USEC_FIELD = 1
      };

      /// Timestamp
      CORBA::ULong time_stamp_[2];

    };

    /**
     * @class Temporary_Creation_Time
     *
     * @brief Special creation time only useful in the lifetime of the
     *        upcall.
     *
     * Special creation time only useful in the lifetime of the upcall.
     */
    class Temporary_Creation_Time
    {
    public:

      Temporary_Creation_Time (void);

      void creation_time (const void *creation_time);

      bool operator== (const Creation_Time &rhs) const;

      bool operator!= (const Creation_Time &rhs) const;

    protected:

      void *time_stamp_;
    };
  }
}

TAO_END_VERSIONED_NAMESPACE_DECL

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

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

#endif /* TAO_CREATION_TIME_H */