The POCO C++ Libraries Blog


Filed under: Uncategorized by alex at 11:34

I have redone some things in DynamicAny:

  • Added support for empty state as default and empty() function to turn it into empty
  • Made DynamicAnyHolder pure virtual functions (clone(), type() and all convert() and is…() overloads) virtual. All convert() overloads throw if reached at runtime, the querying is…() functions all return false. This has provided a much simpler (shorter) way to implement DynamicAnyHolder for an unknown type because only conversions provided by the holder must be overridden. Those not overridden shall throw BadCastException at runtime if attempted.
  • Implemented clone(), type() and value() in DynamicAnyHolder<T>. Now, because of this and the previous item, DynamicAny can store any type out-of-the-box (no more DynamicAnyHolder specialization needed).

Code is in the SVN trunk. The only potentially code breaking change is the first one. If anyone encounters any surprises, please let me know.

No Comments »

No comments yet.

RSS RSS feed for comments on this post. TrackBack URI

Leave a comment