On 12/6/2012 1:29 AM, Igor Stasenko wrote:
On 5 December 2012 22:28, Jimmie Houchin <[email protected]> wrote:
Hello,
In one of my callbacks I have an fnSpec with an enum.
^#( void (enum sessionStatus))
from
typedef void (*SESSION_STATUS_CALLBACK)(O2GSessionStatus eSessionStatus);
How are enums handled in NB?
What would be the proper type for the fnSpec and how do I access the values
in an enum in my class?
enums are unsigned integer values , so you must change the signature
to use 'uint'
or 'uint32' type.
Then make a shared pool with constants , initialize them with proper values
and you done.
Thank you very much. You have been a great help. And thank you for
taking on the initiative for this vital infrastructure project.
I think you are very right in your video. It is a lot of fun to do low
level programming in a high level language. Thanks for making this possible.
Jimmie