Archived

This forum has been archived. Please start a new discussion on GitHub.

getting normal map from freeze map

If I have a freeze map that implements Key,Value as the map pair, is it possible to get out the representative std::map<Key,Value> in an easy way?

As in, if I have a servant method that returns a std::map<Key,Value> and my freeze map was created as "--dict MyFreezeMap,Key,Value", is there a method that returns the underlying data structure outside of the freeze map portion? Or do I just need to loop over the freeze map and create the std::map from the iterated data?

Thanks!

Comments

  • benoit
    benoit Rennes, France
    Hi,

    You need to create a new std::map based on the Freeze map. An easy way to do this is to use the map(InputIterator f, InputIterator l) constructor, for example:
        return std::map<Key, Value>(_freezeDict.begin(), _freezeDict.end()); 
    

    Cheers,
    Benoit.
  • Thank you Benoit - that's exactly what I'm doing! I just wanted to make sure there wasn't a built in convenience method or an automatic conversion that I could make use of.

    Caleb