Dear All,
I have to share an enumerator, but also correspondent string value for 
each enumerator value, between server and client. Client and server are 
implemented in C++ and C#.

Here is my enum in a .thift file:
enum ViewerType {
    ON_BOARD = 0,
    MIRROR
}

I also need the client and server to map ON_BOARD enumerator to a 
"ON_BOARD" string (and similarly for each enum value).

In C++ there is a trick to convert enums to string 
(http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/c_preprocessor_applications_en)
 
but unfortunately I guess this method can not be used when the 
enumerator is in a .thrift file.

So, is there anybody that already solved this case with thrift?

Cheers,
Gianni

Reply via email to