David Reiss | 9a08dc6 | 2008-02-27 01:55:17 +0000 | [diff] [blame] | 1 | namespace cpp yozone |
Mark Slee | a4713ea | 2007-01-05 01:09:04 +0000 | [diff] [blame] | 2 | |
| 3 | struct thing { |
| 4 | 1: i32 hello, |
| 5 | 2: i32 goodbye |
| 6 | } |
| 7 | |
David Reiss | 176ed36 | 2008-06-10 22:56:48 +0000 | [diff] [blame^] | 8 | enum enumconstants { |
Mark Slee | d0767c5 | 2007-07-27 22:14:41 +0000 | [diff] [blame] | 9 | ONE = 1, |
| 10 | TWO = 2 |
| 11 | } |
| 12 | |
David Reiss | 202111d | 2007-08-06 20:38:18 +0000 | [diff] [blame] | 13 | struct thing2 { |
David Reiss | 176ed36 | 2008-06-10 22:56:48 +0000 | [diff] [blame^] | 14 | 1: enumconstants val = TWO |
David Reiss | 202111d | 2007-08-06 20:38:18 +0000 | [diff] [blame] | 15 | } |
| 16 | |
David Reiss | 9a4edfa | 2008-05-01 05:52:50 +0000 | [diff] [blame] | 17 | typedef i32 myIntType |
| 18 | const myIntType myInt = 3 |
| 19 | |
David Reiss | 176ed36 | 2008-06-10 22:56:48 +0000 | [diff] [blame^] | 20 | const map<enumconstants,string> GEN_ENUM_NAMES = {ONE : "HOWDY", TWO: PARTNER} |
Mark Slee | d0767c5 | 2007-07-27 22:14:41 +0000 | [diff] [blame] | 21 | |
Mark Slee | a4713ea | 2007-01-05 01:09:04 +0000 | [diff] [blame] | 22 | const i32 hex_const = 0x0001F |
| 23 | |
| 24 | const i32 GEN_ME = -3523553 |
| 25 | const double GEn_DUB = 325.532 |
| 26 | const double GEn_DU = 085.2355 |
| 27 | const string GEN_STRING = "asldkjasfd" |
| 28 | |
| 29 | const map<i32,i32> GEN_MAP = { 35532 : 233, 43523 : 853 } |
| 30 | const list<i32> GEN_LIST = [ 235235, 23598352, 3253523 ] |
| 31 | |
| 32 | const map<i32, map<i32, i32>> GEN_MAPMAP = { 235 : { 532 : 53255, 235:235}} |
| 33 | |
| 34 | const map<string,i32> GEN_MAP2 = { "hello" : 233, "lkj98d" : 853, 'lkjsdf' : 098325 } |
| 35 | |
| 36 | const thing GEN_THING = { 'hello' : 325, 'goodbye' : 325352 } |
| 37 | |
| 38 | const map<i32,thing> GEN_WHAT = { 35 : { 'hello' : 325, 'goodbye' : 325352 } } |
| 39 | |
| 40 | const set<i32> GEN_SET = [ 235, 235, 53235 ] |
| 41 | |
| 42 | exception Blah { |
| 43 | 1: i32 bing } |
| 44 | |
| 45 | exception Gak {} |
| 46 | |
| 47 | service yowza { |
| 48 | void blingity(), |
| 49 | i32 blangity() throws (1: Blah hoot ) |
| 50 | } |