Summary: RFC: specenum bit vectors
                 Project: Freeciv
            Submitted by: sveinung
            Submitted on: Tue 27 Aug 2013 06:28:14 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



Some enums have corresponding bit vectors were the enum values and the bits
have a one to one relationship. This patch makes it possible to specify that
relationship by defining the bit vector in the specenum. To make it easy to
port existing bitvector/specenum pairs the name of the bit vector is specified
as well. I don't mind changing it to generate the name based on a convention
in stead if that is desired.

Full dislosure: I may over estimate how useful this is to Freeciv. I use the
Freeciv source code to auto generate Java code that talk to Freeciv over the
network. By adding this type information to specenum it becomes easy to read
for machines. This makes adding it to the generated Java code in stead of
doing it by hand easier. By making the information part of the Freeciv source
code doing something useful it will also be kept in sync with Freeciv. If this
goes in I hope to add the information to the enum bit vectors used in the
network protocol.


File Attachments:

Date: Tue 27 Aug 2013 06:28:14 PM GMT  Name: specenumbitvector.patch  Size:
2kB   By: sveinung



Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to