summaryrefslogtreecommitdiff
path: root/ACE/TAO/orbsvcs/orbsvcs/IFRService/RecursDef_i.h
blob: 33efa7d12d0c9b02a3a470d854d91e2a1304f896 (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
// -*- C++ -*-


//=============================================================================
/**
 *  @file    RecursDef_i.h
 *
 *  $Id$
 *
 *  StructDef & UnionDef support class.
 *
 *
 *  @author Simon Massey <sma@prismtech.com>
 */
//=============================================================================


#ifndef TAO_RECURSDEF_I_H
#define TAO_RECURSDEF_I_H

#include "orbsvcs/IFRService/TypedefDef_i.h"
#include "ace/SString.h"
#include "ace/OS_NS_stdlib.h"

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

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#endif /* _MSC_VER */


TAO_BEGIN_VERSIONED_NAMESPACE_DECL

//-----------------------------------------------------------------------------
// Class TAO_RecursiveDef_OuterScopes is a support class for StructDef_i.h and
// UnionDef_i.h files. It creates a stack of outer structure definitions, used
// by TAO_StructDef_i::type_i(), and TAO_UnionDef_i::type_i() during nested
// structure processing.
//-----------------------------------------------------------------------------

class TAO_RecursiveDef_OuterScopes
{
public:
  TAO_RecursiveDef_OuterScopes( const ACE_TString &id ); // "Push" scope's ID
  ~TAO_RecursiveDef_OuterScopes(); // "Pop" this scope

  static bool SeenBefore( const ACE_TString &id ); // Check for outer ID

private: // Data
  const ACE_TString id_;
  const TAO_RecursiveDef_OuterScopes *const pNextOuterID_;

  static const TAO_RecursiveDef_OuterScopes *pIDsSeenAlready;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#if defined(_MSC_VER)
#pragma warning(pop)
#endif /* _MSC_VER */

#endif /* TAO_RECURSDEF_I_H */