Is there possiblitity to portable way to serialize enum type?

Discussion in 'C++' started by Voronkov Konstantin, Sep 9, 2004.

  1. Hello, All!

    I want to ask question whether there is portable way to serialize
    enum type? Is it safe to threat enum as integer?

    Best Regards,
    Voronkov Konstantin
     
    Voronkov Konstantin, Sep 9, 2004
    #1
    1. Advertising

  2. Voronkov Konstantin wrote:
    > I want to ask question whether there is portable way to serialize
    > enum type? Is it safe to threat enum as integer?


    It is advisable to write conversion functions instead of "treating
    enums" as anything. That's basically what serialisation is about,
    you define the external representation and write functions that
    convert something to it and from it to something.

    V
     
    Victor Bazarov, Sep 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gordz
    Replies:
    3
    Views:
    3,985
    John Oakes
    Jun 7, 2004
  2. Voronkov Konstantin
    Replies:
    2
    Views:
    4,524
    Stephan Br?nnimann
    Sep 10, 2004
  3. Voronkov Konstantin
    Replies:
    0
    Views:
    295
    Voronkov Konstantin
    Sep 10, 2004
  4. Eric Sosman
    Replies:
    3
    Views:
    801
    Mayeul
    Feb 26, 2010
  5. Wojtek
    Replies:
    1
    Views:
    520
Loading...

Share This Page