| 1 | |
| 2 | |
| 3 | /// A union of two values |
| 4 | union SeparateUnion |
| 5 | { |
| 6 | int size; ///< The size of the thing |
| 7 | float depth; ///< How deep it is |
| 8 | }; |
| 9 | |
| 10 | |
| 11 | namespace foo { |
| 12 | |
| 13 | /// A union of two values |
| 14 | union MyUnion |
| 15 | { |
| 16 | int someInt; ///< The int of it all |
| 17 | float someFloat; ///< The float side of things |
| 18 | }; |
| 19 | |
| 20 | } |
| 21 | |
| 22 | /// A class with a union |
| 23 | class ClassWithUnion |
| 24 | { |
| 25 | /// A union with two values |
| 26 | union UnionInClass |
| 27 | { |
| 28 | int intvalue; ///< An int value |
| 29 | float floatvalue; ///< A float value |
| 30 | }; |
| 31 | |
| 32 | /// Documented class |
| 33 | class ExtraClass |
| 34 | { |
| 35 | int a_member; |
| 36 | float another_member; |
| 37 | }; |
| 38 | }; |