blob: 5249f79cceac4152420a95277fcffa874bd6f20d [file] [log] [blame]
David Reiss9a08dc62008-02-27 01:55:17 +00001namespace cpp yozone
Mark Sleea4713ea2007-01-05 01:09:04 +00002
3struct thing {
4 1: i32 hello,
5 2: i32 goodbye
6}
7
David Reiss176ed362008-06-10 22:56:48 +00008enum enumconstants {
Mark Sleed0767c52007-07-27 22:14:41 +00009 ONE = 1,
10 TWO = 2
11}
12
David Reiss202111d2007-08-06 20:38:18 +000013struct thing2 {
David Reiss176ed362008-06-10 22:56:48 +000014 1: enumconstants val = TWO
David Reiss202111d2007-08-06 20:38:18 +000015}
16
David Reiss9a4edfa2008-05-01 05:52:50 +000017typedef i32 myIntType
18const myIntType myInt = 3
19
David Reiss176ed362008-06-10 22:56:48 +000020const map<enumconstants,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: PARTNER}
Mark Sleed0767c52007-07-27 22:14:41 +000021
Mark Sleea4713ea2007-01-05 01:09:04 +000022const i32 hex_const = 0x0001F
23
24const i32 GEN_ME = -3523553
25const double GEn_DUB = 325.532
26const double GEn_DU = 085.2355
27const string GEN_STRING = "asldkjasfd"
28
29const map<i32,i32> GEN_MAP = { 35532 : 233, 43523 : 853 }
30const list<i32> GEN_LIST = [ 235235, 23598352, 3253523 ]
31
32const map<i32, map<i32, i32>> GEN_MAPMAP = { 235 : { 532 : 53255, 235:235}}
33
34const map<string,i32> GEN_MAP2 = { "hello" : 233, "lkj98d" : 853, 'lkjsdf' : 098325 }
35
36const thing GEN_THING = { 'hello' : 325, 'goodbye' : 325352 }
37
38const map<i32,thing> GEN_WHAT = { 35 : { 'hello' : 325, 'goodbye' : 325352 } }
39
40const set<i32> GEN_SET = [ 235, 235, 53235 ]
41
42exception Blah {
43 1: i32 bing }
44
45exception Gak {}
46
47service yowza {
48 void blingity(),
49 i32 blangity() throws (1: Blah hoot )
50}