blob: 7a53a52193ca5a1e5cc779873d2984ba8aaff37c (
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
|
// $Id$
// ============================================================================
//
// = LIBRARY
// TAO/tests/IDL_Test
//
// = FILENAME
// valuetype.idl
//
// = DESCRIPTION
// This file contains examples of IDL code that has
// caused problems in the past for the TAO IDL
// compiler. This test is to make sure the problems
// stay fixed.
//
// = AUTHORS
// Gary Duzan <gduzan@bbn.com>
// Jeff Parsons <j.parsons@vanderbilt.edu>
//
// ============================================================================
#ifndef IDL_TEST_VALUETYPE_IDL
#define IDL_TEST_VALUETYPE_IDL
#include "included.idl"
// A valuetype factory can have exceptions, so the declaration must pull in
// an #include of SystemException.h.
valuetype MyValueType
{
public string my_string_value;
factory make_one ();
};
enum ValueSort2 {
SYMBOL_TYPE2
};
union MyValueTypeUnion switch (ValueSort2) {
case SYMBOL_TYPE2:
MyValueType symbol_val;
};
// The original bug was caused by the default factory visitor
// constructing a temporary arg of this field type. When the
// arg was then destroyed, it called its base destroyer
// AST_Field::destroy() which in turn destroyed the member
// because it was anonymous. This declaration was copied from
// an unautomated TAO/tests directory and authored by Simon McQueen
// <sm@prismtechnologies>.
valuetype RecValueType
{
private sequence<RecValueType> rec_value_types;
};
// Inherits an anonymous sequence member, which was not named
// correctly in the original bug when used in the arglist for
// this valuetype's constructor from values.
valuetype GetsDeprecatedMember : IncludedBase
{
public string StringMember;
};
#endif /* IDL_TEST_VALUETYPE_IDL */
|