blob: de7d0f56ea3b624ae8cf90d8d7d8cf82823c7279 (
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
71
72
73
74
75
|
//=============================================================================
/**
* @file valuetype.idl
*
* $Id$
*
* 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.
*
*
* @author 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;
private sequence<RecValueType,2> rec_value_types2;
};
// 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;
};
module X
{
abstract valuetype AXXX
{
Object make_object ();
};
abstract valuetype BXXX : AXXX
{
};
typedef sequence<BXXX> BSeq;
};
#endif /* IDL_TEST_VALUETYPE_IDL */
|