Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tests / IDL_Test / enum_in_struct.idl
blobcd0d4ee97f54e881ef4d5d85ba627b09a290e292
2 //=============================================================================
3 /**
4 * @file enum_in_struct.idl
6 * This file contains examples of IDL code that has
7 * caused problems in the past for the TAO IDL
8 * compiler. This test is to make sure the problems
9 * stay fixed.
12 * @author Jeff Parsons <parsons@cs.wustl.edu> and TAO users.
14 //=============================================================================
17 // Tests for correct parsing and code generation for
18 // both named and anonymous enums in a struct.
20 enum UnNamed
22 UNNAMED_FIRST,
23 UNNAMED_SECOND,
24 UNNAMED_THIRD
27 struct HoldsEnum
29 enum Named
31 NAMED_FIRST,
32 NAMED_SECOND,
33 NAMED_THIRD
34 } named_enum;
36 UnNamed unnamed_enum;
39 // Test for anonymous arrays of member declarations
41 struct decl_heavy_struct
43 enum str_en
48 } m_en[10];
50 struct st
52 long a;
53 char b;
54 } m_st[10];
56 union un switch (long)
58 case 1: long a;
59 case 2: char b;
60 } m_un[10];
63 // Similar case for exception included here - no sense
64 // in making a separate file for exceptions, which are
65 // almost the same as structs.
67 exception ErrorException
69 enum ReasonCode
71 RESOURCE,
72 COMMUNICATION,
73 ASSERTION,
74 STATE,
75 ALREADY,
76 OTHER
77 } reason;