diff options
author | Matthew Newhook <matthew@zeroc.com> | 2015-03-21 15:35:40 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2015-03-21 15:35:40 -0230 |
commit | 630a37d2fe66f24518299e705f958b571803c522 (patch) | |
tree | 969723791bdc4d73bb099c19d45554d0ca241ad9 /csharp/test/Slice/macros/Test.ice | |
parent | Fix some README.md markdown formatting (diff) | |
download | ice-630a37d2fe66f24518299e705f958b571803c522.tar.bz2 ice-630a37d2fe66f24518299e705f958b571803c522.tar.xz ice-630a37d2fe66f24518299e705f958b571803c522.zip |
py -> python
rb -> ruby
objc -> objective-c
cs -> csharp
Diffstat (limited to 'csharp/test/Slice/macros/Test.ice')
-rw-r--r-- | csharp/test/Slice/macros/Test.ice | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/csharp/test/Slice/macros/Test.ice b/csharp/test/Slice/macros/Test.ice new file mode 100644 index 00000000000..bb9acbed05a --- /dev/null +++ b/csharp/test/Slice/macros/Test.ice @@ -0,0 +1,54 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +// +// This macro sets the default value only when compiling with slice2cs. +// +#ifdef __SLICE2CS__ +# define DEFAULT(X) = X +#else +# define DEFAULT(X) /**/ +#endif + +// +// This macro sets the default value only when not compiling with slice2cs. +// +#ifndef __SLICE2CS__ +# define NODEFAULT(X) = X +#else +# define NODEFAULT(X) /**/ +#endif + +module Test +{ + +class Default +{ + int x DEFAULT(10); + int y DEFAULT(10); +}; + +class NoDefault +{ + int x NODEFAULT(10); + int y NODEFAULT(10); +}; + +// +// This class is only defined when compiling with slice2cs. +// +#ifdef __SLICE2CS__ +class CsOnly +{ + string lang DEFAULT("cs"); + int version DEFAULT(ICE_VERSION); +}; +#endif + +}; |