Re: question regarding ohObjectPropertyValues

Posted by Eric Ehlers-2 on
URL: http://quantlib.414.s1.nabble.com/question-regarding-ohObjectPropertyValues-tp8600p8603.html

Hi Kaifeng,

Quoting kchen <[hidden email]>:
>
> Hi Eric,
>
> Thank you for your reply. Is there a quick way of editing the code so as to
> return the actual values instead of <VECTOR> ?  Where can I find the
> implementation of ohObjectPropertyValues so I can perhaps cast the
> boost::any to double ?  I tried to change the return value type from any to
> double of ohObjectPropertyValues method in file valueobjects.xml, but only
> caused the addin to crash.  Thank you very much.

The implementation of ohObjectPropertyValues is found in file  
ObjectHandler/ohxl/functions/valueobjects.cpp.  I do not think it  
would be a quick fix to change the behavior of the function.  Its  
return value is already a vector, a list of the values of all of the  
object's properties.  You are concerned with the case where one of  
those values is itself a vector, and to extract that would require a  
bit of redesign.

The functionality of ohObjectPropertyValues() was a very early idea in  
the design of ObjectHandler, which was not really developed because it  
was superseded by other techniques, for example just directly  
accessing the underlying object and calling the specific member  
function that returns the data you need.

Kind Regards,
Eric

===================================================
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
* Distributed computing for pricing analytics
* Use Microsoft Excel as a client to the Grid


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users