summaryrefslogtreecommitdiff
path: root/TAO/tao/DynUnion_i_T.h
blob: f4e4e64d5a6eae91c0802f99ecf2b00fe1e587de (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
// $Id$
// ====================================================================
//
// = LIBRARY
//    TAO
//
// = FILENAME
//    DynUnion_i_T.h
//
// = AUTHOR
//    Jeff Parsons <jp4@cs.wustl.edu>
//
// ====================================================================

#if !defined TAO_DYNUNION_I_T_H
#define TAO_DYNUNION_I_T_H

#include "tao/corba.h"

// Template class functor to compare Anys in TAO_DynUnion_i 
// constructor with an Any arg and member function from_any().
// Some compilers won't accept these eclarations inside 
// TAO_DynUnion_i or even at global scope in the same file.
  
class DU_Extractor_base
{
public:
  virtual 
  CORBA::Boolean      check_match     (const CORBA_Any& inside_any,
                                       const CORBA_Any& outside_any) = 0;
};

template <class Type>
class DU_Extractor : public DU_Extractor_base
{
public:
  CORBA::Boolean      check_match     (const CORBA_Any& inside_any,
                                       const CORBA_Any& outside_any);
private:
  Type                arg_index_, 
                      member_index_;
};
  
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "tao/DynUnion_i_T.cpp"
// On Win32 platforms, this code will be included as template source
// code and will not be inlined. Therefore, we first turn off
// ACE_INLINE, set it to be nothing, include the code, and then turn
// ACE_INLINE back to its original setting. All this nonsense is
// necessary, since the generic template code that needs to be
// specialized cannot be inlined, else the compiler will ignore the
// specialization code. Also, the specialization code *must* be
// inlined or the compiler will ignore the specializations.
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("DynUnion_i_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#endif /* TAO_DYNUNION_I_T_H */