http://quantlib.414.s1.nabble.com/LibreOffice-Calc-addin-tp18009p18082.html
I did realize I dont need abstract base classes. I had declared RiskyFixedBond and therefore I needed to have currencies, that went all right. Also I am declaring CDS but I get problems with the type conversion of the protection side and the schedule type (also in the defaultable bond). If I understood your doc I wrote:
("QuantLib::Protection::Side", "std::string", "string", "EnumeratedType", "<<"),
("EnumeratedType", "ql/default.hpp", "QuantLib::Protection::Side", "std::string", "Buyer", "QuantLib::Protection::Buyer"),
("EnumeratedType", "ql/default.hpp", "QuantLib::Protection::Side", "std::string", "Seller", "QuantLib::Protection::Seller"),
is that ok? For the scehdule I will pull your code and figure it out.
Also I have moved the code under "./gensrc/code" to "./gensrc/codesrc" the reason is that if I want to debug the python tools with eclipse or any other debugger it gets confused with /code/ and the python libraries.
Antoher minor point is that the parser is very picky on not having carriage returns on the parameter list of constructors, it fails if theres one.
> Hello,
>
> I have added an example under experimental/credit/riskybond.py and in
> the spreadsheet.
>
> You need not define the base class - except you would like to refer
> to
> member functions of it. I assume that it is not necessary to
> instantiate a base class (like RiskyBond which has virtual
> functions).
>
> I also added code to handle 1D return types of enumeratedobjects
> (ccy()
> function of RiskyBond) in calc.py and for the correct handling of
> std::string input parameters (like 'name' of riskybond - not handled
> like objects) in addinclasses.py.
>
> In some part of the code I have left statements of the type
> --- if __name__ == "__main__": ---. You can ignore them since you
> invoke 'python main.py -o'. The previous statement --- if __name__
> ...
> --- is for debugging since I can execute the file alone without
> executing main.py.
>
>
> Regards,
> Lars Callenbach
>
>
>
>
> Am Montag, den 13.02.2017, 14:20 +0100 schrieb
[hidden email]:
> > Hi again,
> > I am not sure what I was asking makes sense anymore; something is
> > failing when I add some extra functions but not sure where.
> > Some add ok some do not, so it might just be syntax staring in
> > front
> > of my nose.
> >
> > I am looking at the code and some files contain non portable paths
> > like line 275 of enumeratedobjects.py :
> > pmd = ParseMetaData('/work/QuantLib-Addin/gensrc/metadata',
> > 'Calc')
> > this does not prevent things from working on my side however.
> > guess it is not being used?
> >
> > Best
> > PP
> >
> >
> > ----- Original Message -----
> > >
> > > Hi Lars,
> > > How do you declare and use abstract types? Say I want to define a
> > > new
> > > constructor (e.g. riskybond.py) which needs an pointer in its
> > > constructor of a virtual base type (defaulttermstructure) How do
> > > I
> > > declare that type? I see there are methods for the type
> > > (defaulttermstructure.py) so they can be used from all derived
> > > classes but how does one declares the abstract type to be
> > > recognised?
> > > Best
> > > pp
> > >
> > >
> > > ----- Original Message -----
> > > >
> > > > Hi,
> > > > I like its simplicity. It works very well on my mint/ubuntu
> > > > with
> > > > the
> > > > last version of libreoffice + sdk. I can drive the debugger
> > > > directly
> > > > from Calc.
> > > > Too bad the worksheets need to be rewritten but that's a minor
> > > > inconvenience.
> > > > Something I am wondering, what happens now with the
> > > > dependencies?
> > > > Can
> > > > they be forced now?
> > > > Would it be possible to get the doxygen c++ doc for free into
> > > > the
> > > > parameters of the functions? Through an hypothetical
> > > > doxy-c++-py
> > > > module?
> > > > I might pr new functions as I use them.
> > > > Best and thank you
> > > > pp
> > > >
> > > > ----- Original Message -----
> > > > >
> > > > > Hi,
> > > > >
> > > > > it is independent of Reposit and has a modified version of
> > > > > the
> > > > > "old"
> > > > > repository/objecthandler code of the QuantLibAddin in the
> > > > > folder
> > > > > oh.
> > > > >
> > > > > The other code components are generated by python code based
> > > > > on
> > > > > metadata defined under gensrc/metadata (similar to SWIG but
> > > > > without
> > > > > the
> > > > > class hierarchy redefinitions).
> > > > >
> > > > > I assume that Mac-OS is a quick win - but I have had some
> > > > > problems
> > > > > compiling the examples of LibreOffice/SDK under Windows (unix
> > > > > convention of paths in the SDK files which do not work under
> > > > > Windows
> > > > > -
> > > > > help appreciated since my license of VS-C++ is expired).
> > > > >
> > > > >
> > > > > Kind regards,
> > > > > Lars
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Am Donnerstag, den 26.01.2017, 18:50 +0100 schrieb
> > > > >
[hidden email]:
> > > > > >
> > > > > > That's very good news,
> > > > > > I know I could look and I will but, is that working ok for
> > > > > > all
> > > > > > OS?
> > > > > > Is
> > > > > > it based on the previous OH or on the new Reposit
> > > > > > framework?
> > > > > > Thank you
> > > > > > pp
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > >
> > > > > > >
> > > > > > > Good evening,
> > > > > > >
> > > > > > > I have a running version for the addin for
> > > > > > > LibreOffice/Calc.
> > > > > > > On
> > > > > > > GitHub
> > > > > > > I have a first prototype for automatic addin code
> > > > > > > generation
> > > > > > > of
> > > > > > > QuantLib functions and classes for Calc
> > > > > > > (github.com/lcallenbach/quantlibaddin).
> > > > > > >
> > > > > > > Feedback (and testing on other platforms) welcome.
> > > > > > >
> > > > > > >
> > > > > > > Kind regards,
> > > > > > > Lars
> > > > > > >
> > > > > > > ---------------------------------------------------------
> > > > > > > --------
> > > > > > > -------------
> > > > > > > Check out the vibrant tech community on one of the
> > > > > > > world's
> > > > > > > most
> > > > > > > engaging tech sites, SlashDot.org!
> > > > > > >
http://sdm.link/slashdot> > > > > > > _______________________________________________
> > > > > > > QuantLib-dev mailing list
> > > > > > >
[hidden email]
> > > > > > >
https://lists.sourceforge.net/lists/listinfo/quantlib-dev> > > > > > >
> > > > >
> > > >
> > > > ---------------------------------------------------------------
> > > > ---------------
> > > > Check out the vibrant tech community on one of the world's most
> > > > engaging tech sites, SlashDot.org!
http://sdm.link/slashdot> > > > _______________________________________________
> > > > QuantLib-dev mailing list
> > > >
[hidden email]
> > > >
https://lists.sourceforge.net/lists/listinfo/quantlib-dev> > > >
> > >
> > > -----------------------------------------------------------------
> > > -------------
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, SlashDot.org!
http://sdm.link/slashdot> > > _______________________________________________
> > > QuantLib-dev mailing list
> > >
[hidden email]
> > >
https://lists.sourceforge.net/lists/listinfo/quantlib-dev> > >
>