Overview
Features
Download
Documentation
Community
Add-Ons & Services

DynamicAny usage

Please post support and help requests here.

DynamicAny usage

Postby WITTROCK » 17 Feb 2009, 17:49

I am interested in using DynamicAny. I understand its usage for types that already have specialization, but was just wondering about its usage with other arbitrary types. If I am not concerned with type conversion on types other than those that are already supported, can I use DynamicAny for insertion/extraction like Poco::Any?

The reason I ask is that I was reading this article http://accu.org/index.php/journals/1502, and noticed the following:
In the manner of boost::any, storage and extraction of an arbitrary user-defined type are supported out-of-the-box. In addition to that, DynamicAny's conversions are fully extensible. In order to provide the support for conversion to other types, the DynamicAnyHolder<Type> must be specialized for the Type with appropriate convert() function overloads being defined.


The problem I am running into is that it looks like the DynamicAnyHolderImpl<> template does not implement any of its own storage and requires a value() member function be defined in the specializations, so I'm not sure how it can support storage and extraction of arbitrary types without specialization. To be fair, the documentation doesn't mention anything about supporting types without creating specialization classes, so maybe the article I reference is talking about a future version of DynamicAny or one in the svn?

Sorry if I'm missing something obvious.

-wittrock
WITTROCK
 
Posts: 4
Joined: 17 Feb 2009, 17:35

Re: DynamicAny usage

Postby WITTROCK » 18 Feb 2009, 15:40

Sorry. I'm just answering my own question.
I am using 1.3.3, but just looked in the trunk, and I can see that the DynamicAnyImpl<> template can now support arbitrary types.

-wittrock
WITTROCK
 
Posts: 4
Joined: 17 Feb 2009, 17:35


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron