summaryrefslogtreecommitdiff
path: root/modules/CIAO/ciao/Valuetype_Factories/Cookies.h
blob: 8fd92b348f868237bbde6abe8d8d8ecfceaef1b3 (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
// $Id$

/**
 * @file Cookies.h
 *
 * A CIAO implementation of Cookie valuetype.
 *
 * @author Nanbor Wang <nanbor@cs.wustl.edu>
 */

#ifndef CIAO_COOKIES_H
#define CIAO_COOKIES_H

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

#include "Cookie_Export.h"

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

#include "ccm/CCM_CookieC.h"

#include "ace/Active_Map_Manager.h"

namespace CIAO
{
  /**
   * @class Cookie_Impl
   *
   * @brief A cookie implementation using an unsigned integer
   *  big enough to hold an address, even on a 64-bit machine.
   */
  class Cookie_Factory_Export Cookie_Impl
    : public virtual OBV_Components::Cookie
  {
  public:
    Cookie_Impl (void);
    virtual ~Cookie_Impl (void);

    /// Initialize a @c Cookie with a @c ptrdiff_t
    Cookie_Impl (ptrdiff_t const &key);

    /// Extract the @c CORBA::ULong
    static bool extract (Components::Cookie const * const c,
                         ptrdiff_t &key);
  };

  /**
   * @class Cookie_Impl_init
   *
   * @brief Valuefactory implementation for Cookie_Impl.
   */
  class Cookie_Factory_Export Cookie_Impl_init
    : public virtual Components::Cookie_init
  {
  public:
    virtual ~Cookie_Impl_init (void);

    virtual CORBA::ValueBase *create_for_unmarshal (void);
  };
}

#if defined (__ACE_INLINE__)
#include "Cookies.inl"
#endif /* defined INLINE */

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

#endif /* CIAO_COOKIES_H */