File: Overload.sidl

package info (click to toggle)
babel 0.10.2-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 43,932 kB
  • ctags: 29,707
  • sloc: java: 74,695; ansic: 73,142; cpp: 40,649; sh: 18,411; f90: 10,062; fortran: 6,727; python: 6,406; makefile: 3,866; xml: 118; perl: 48
file content (111 lines) | stat: -rw-r--r-- 3,942 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//
// File:        Overload.sidl
// Revision:    $Revision: 4434 $
// Date:        $Date: 2005-03-17 09:05:29 -0800 (Thu, 17 Mar 2005) $
// Description: An IDL design to test sidl overloaded method handling
//
// Copyright (c) 2001, The Regents of the University of Calfornia.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the Components Team <components@llnl.gov>
// UCRL-CODE-2002-054
// All rights reserved.
// 
// This file is part of Babel. For more information, see
// http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
// for Our Notice and the LICENSE file for the GNU Lesser General Public
// License.
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License (as published by
// the Free Software Foundation) version 2.1 dated February 1999.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
// conditions of the GNU Lesser General Public License for more details.
// 
// You should have recieved a copy of the GNU Lesser General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

/**
 * <p>
 * Package <code>Overload</code> tests the overloaded method capabilites of 
 * sidl.  
 * </p>
 */

package Overload version 1.0 {

  /**
   * This exception is passed into the overloaded method as an example
   * of passing classes.
   */
  class AnException extends sidl.SIDLException {
  }

  /**
   * This class is passed into the overloaded method as an example
   * of passing classes.
   */
  class AClass {
    int getValue();
  }

  /**
   * This class is passed into the overloaded method as another example
   * of passing classes.
   */
  class BClass extends AClass {
  }

  /**
   * This class is used as the work-horse, returning the value passed
   * in.
   */
  class ParentTest {
    int      getValue ( );
    int      getValue[Int]( in int v );
    bool     getValue[Bool]( in bool v );
    double   getValue[Double]( in double v );
    dcomplex getValue[Dcomplex]( in dcomplex v );
    float    getValue[Float]( in float v );
    fcomplex getValue[Fcomplex]( in fcomplex v );
    string   getValue[String]( in string v );

    /*
     * The following are quick checks of the parser.  Uncomment each 
     * individual to perform the test.
     */
//    int    getValue ( );	               // Local, same signature
//    float  getValue[Float]( );	       // Local, signature conflict
//    double getValue[Double]( in double v );  // Local, same signature
//    float  getValue[Double]( in double v );  // Local, signature conflict
  }

  /**
   * This class is used as the work-horse, returning the value passed
   * in.
   */
  class Test extends ParentTest {
    double getValue[IntDouble](in int a, in double b);
    double getValue[DoubleInt](in double a, in int b);
    double getValue[IntDoubleFloat](in int a, in double b, in float c);
    double getValue[DoubleIntFloat](in double a, in int b, in float c);
    double getValue[IntFloatDouble](in int a, in float b, in double c);
    double getValue[DoubleFloatInt](in double a, in float b, in int c);
    double getValue[FloatIntDouble](in float a, in int b, in double c);
    double getValue[FloatDoubleInt](in float a, in double b, in int c);

    string getValue[Exception](in AnException v);
    int    getValue[AClass](in AClass v);
    int    getValue[BClass](in BClass v);

    /*
     * The following are quick checks of the parser.  Uncomment each 
     * individual to perform the test.
     */
//    float  getValue[Double]( in double v );  // Parent, signature conflict
//    double getValue[IntDouble](in int a, in double b); // Local, same signature
  }
}