Login  Register

Re: Enum Registry

Posted by Luigi Ballabio on Nov 18, 2010; 3:47pm
URL: http://quantlib.414.s1.nabble.com/Enum-Registry-tp731p734.html

On Mon, 2010-11-15 at 16:44 +0000, Andrea wrote:

> > 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++.)
> >
> 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.

No, I don't think it belongs to the core library; it's more on the
application level.  And most certainly I wouldn't force XML on anyone :)
I would leave it to the user to choose where and how to store the
information depending on the way her application is built.

Luigi


--

Present to inform, not to impress; if you inform, you will impress.
-- Fred Brooks



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users