Posted by
andrea-110 on
Nov 15, 2010; 4:44pm
URL: http://quantlib.414.s1.nabble.com/Enum-Registry-tp731p733.html
Luigi Ballabio <luigi.ballabio <at> gmail.com> writes:
>
> On Fri, 2010-11-12 at 21:45 +0000, Andrea wrote:
> > I've found an enum registry in the object handler to convert strings
> > to "enums" [...] and the registry is populated from an xml file.
> >
> > Is there a way to get the same feature without ObjectHandler? Using
> > only the core QuantLib?
>
> No, there isn't. But I think it should be easy to implement the
> registry with a std::map<std::string, enum> or something like it (I'm
> not sure about the XML part, though---I'm not familiar with XML
> libraries in C++.)
>
> Luigi
>
A little macro will make it simple to register the options.
I was thinking that this is a feature that deserves to be in the core library
and not only in the addins.
Moreover the effort to fill the xml is exactly the same as writing the C++ code
with the registration.
And, all the environments where QL is exposed via SWIG could used it (mind you
in Java one can use relfection).
Almost all clients with user input will need something similar.
What do you think?
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users