[Freeciv-Dev] [patch #4122] RFC: specenum bit vectors

2013-08-30 Thread Sveinung Kvilhaugsvik
Update of patch #4122 (project freeciv):

Category:None => general
  Status:None => Ready For Test 
 Assigned to:None => sveinung   


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4122] RFC: specenum bit vectors

2013-08-27 Thread Sveinung Kvilhaugsvik
Follow-up Comment #2, patch #4122 (project freeciv):

Good point

(file #18783)
___

Additional Item Attachment:

File name: specenumbitvector_2.patch  Size:1 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4122] RFC: specenum bit vectors

2013-08-27 Thread Marko Lindqvist
Follow-up Comment #1, patch #4122 (project freeciv):

I'm quite sure you don't need to depend on SPECENUM_COUNT being defined - it's
just the name of the variable to store max value of the specenum. The max
value should be available to you (internally to specenum module) in any case.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4122] RFC: specenum bit vectors

2013-08-27 Thread Sveinung Kvilhaugsvik
URL:
  

 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: 

___

Details:

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!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev