Results 1 to 3 of 3

Thread: Is it possible to map coments from slice >> C#?

  1. #1
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40

    Is it possible to map coments from slice >> C#?

    Wondering if its possible to map comments from the slice file into a target language, such as C#.

    It would be nice to be able to generate the following, C# standard comments, even if it was just for intellisense support:

    /// <summary>
    /// Function that does foo.
    /// </summary>
    /// <param name="foo">A fooey parameter.</param>
    /// <param name="boo">A barey parameter.</param>

    Granted, this is not a problem with a simple function - but when you have a complex function with many parameters, it is more elegant to describe the parameters using the docs, rather than long parameter names. This makes coding much easier and quicker, and results in cleaner code.

    And, in addition, the thought of generating a 50 function interface with no comments attached to the interface is just downright scary.
    Last edited by Gravitas; 03-04-2011 at 06:44 AM.

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Yes, it is possible to do this. You just need add comments to your slice files in the proper format.

    Code:
      /**
       * Function description
       *
       * @param p1 A function parameter.
       * @param p2 Another function parameter.
       * @return The function return value.
       * @throws SomeException An exception raised on a certain error.
       **/
      int method(int p1, int p2) throws SomeException;
    You can take a look at the Ice Slice files for examples.

    The generated C# code will then have the proper comments as you desire.
    Dwayne Boone

  3. #3
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40
    Excellent - thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 04-01-2010, 11:36 AM
  2. Replies: 5
    Last Post: 11-05-2007, 11:35 AM
  3. Slice class data members -> private in Java/C++?
    By sasho2 in forum Help Center
    Replies: 3
    Last Post: 04-09-2007, 03:28 PM
  4. Replies: 2
    Last Post: 01-11-2005, 08:57 PM
  5. Replies: 0
    Last Post: 11-30-2004, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •