~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/test/Ice/defaultValue/Test.ice

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// **********************************************************************
 
2
//
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
4
//
 
5
// This copy of Ice is licensed to you under the terms described in the
 
6
// ICE_LICENSE file included in this distribution.
 
7
//
 
8
// **********************************************************************
 
9
 
 
10
#ifndef TEST_ICE
 
11
#define TEST_ICE
 
12
 
 
13
module Test
 
14
{
 
15
 
 
16
enum Color { red, green, blue };
 
17
 
 
18
struct Struct1
 
19
{
 
20
    bool boolFalse = false;
 
21
    bool boolTrue = true;
 
22
    byte b = 254;
 
23
    short s = 16000;
 
24
    int i = 3;
 
25
    long l = 4;
 
26
    float f = 5.0;
 
27
    double d = 6.0;
 
28
    string str = "foo bar";
 
29
    Color c = red;
 
30
    string noDefault;
 
31
};
 
32
 
 
33
["cpp:class"]
 
34
struct Struct2
 
35
{
 
36
    bool boolFalse = false;
 
37
    bool boolTrue = true;
 
38
    byte b = 1;
 
39
    short s = 2;
 
40
    int i = 3;
 
41
    long l = 4;
 
42
    float f = 5.0;
 
43
    double d = 6.0;
 
44
    string str = "foo bar";
 
45
    Color c = blue;
 
46
    string noDefault;
 
47
};
 
48
 
 
49
class Base
 
50
{
 
51
    bool boolFalse = false;
 
52
    bool boolTrue = true;
 
53
    byte b = 1;
 
54
    short s = 2;
 
55
    int i = 3;
 
56
    long l = 4;
 
57
    float f = 5.0;
 
58
    double d = 6.0;
 
59
    string str = "foo bar";
 
60
    string noDefault;
 
61
};
 
62
 
 
63
class Derived extends Base
 
64
{
 
65
    Color c = green;
 
66
};
 
67
 
 
68
exception BaseEx
 
69
{
 
70
    bool boolFalse = false;
 
71
    bool boolTrue = true;
 
72
    byte b = 1;
 
73
    short s = 2;
 
74
    int i = 3;
 
75
    long l = 4;
 
76
    float f = 5.0;
 
77
    double d = 6.0;
 
78
    string str = "foo bar";
 
79
    string noDefault;
 
80
};
 
81
 
 
82
exception DerivedEx extends BaseEx
 
83
{
 
84
    Color c = green;
 
85
};
 
86
 
 
87
};
 
88
 
 
89
#endif