Archived

This forum has been archived. Please start a new discussion on GitHub.

set string to default in .ice file???

I know this has probably been asked before, so forgive me, but i am unable to find it by searching the forums :confused:

Is there anyway to set a string in a .ice file to a default value like -

string Version = "0.1.023";

I need to version my interfaces using a specific number inside my .ice file.

Comments

  • Yes, Slice supports constants:

    const string Version = "0.1.023";

    See the Slice chapter in the Ice documentation.

    Cheers,

    Michi.
  • marc
    marc Florida
    Ice has also built-in Slice checksums. Have a look at chapters 4.19, 6.16, and 10.18.
  • Some excellent info on the CheckSums... that will be a nice solution for server/client compatibility :)

    For now const string will work great for adding the current SVN revision since i have several clients (C#, java and C++) that are using different versions of the slice definition files. They have yet to actually start referencing my interfaces in SVN but instead choose to implement new changes when they get time :eek:

    Thanks Mitchi and Marc...