objecthandler-cvs Mailing List for ObjectHandler (Page 9)
Brought to you by:
ericehlers,
nando
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(115) |
Jun
(109) |
Jul
(85) |
Aug
(49) |
Sep
(19) |
Oct
(105) |
Nov
(16) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(63) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric E. <eri...@us...> - 2006-10-04 03:45:05
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/Register In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14291/ohxl/Register Modified Files: .cvsignore Added Files: addin.cpp register_all.hpp Log Message: cleaner processing to register functions with Excel --- NEW FILE: addin.cpp --- /* Copyright (C) 2004, 2005, 2006 Eric Ehlers This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email qua...@li... The license is also available online at http://quantlib.org/html/license.html This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #include <xlsdk/xlsdkdefines.hpp> #include <ohxl/objecthandlerxl.hpp> #include <ohxl/Register/register.hpp> #include <ohxl/export.hpp> #include <ohxl/conversions.hpp> #include <sstream> // instantiate the object handler singleton ObjHandler::ObjectHandlerXL objectHandler; DLLEXPORT int xlAutoOpen() { static XLOPER xDll; try { Excel(xlGetName, &xDll, 0); registerOhFunctions(xDll); Excel(xlFree, 0, 1, &xDll); return 1; } catch (const std::exception &e) { std::ostringstream err; err << "Error loading ObjectHandler: " << e.what(); Excel(xlcAlert, 0, 1, TempStrStl(err.str())); Excel(xlFree, 0, 1, &xDll); return 0; } catch (...) { Excel(xlFree, 0, 1, &xDll); return 0; } } DLLEXPORT int xlAutoClose() { static XLOPER xDll; try { // empty the ObjectHandler repository Excel(xlUDF, 0, 1, TempStrNoSize("\x12""ohDeleteAllObjects")); // unregister the addin functions Excel(xlGetName, &xDll, 0); unregisterOhFunctions(xDll); Excel(xlFree, 0, 1, &xDll); return 1; } catch (...) { Excel(xlFree, 0, 1, &xDll); return 0; } } DLLEXPORT void xlAutoFree(XLOPER *px) { if (px->xltype & xltypeStr && px->val.str) delete [] px->val.str; else if (px->xltype & xltypeMulti && px->val.array.lparray) { int size = px->val.array.rows * px->val.array.columns; for (int i=0; i<size; i++) if (px->val.array.lparray[i].xltype & xltypeStr && px->val.array.lparray[i].val.str) delete [] px->val.array.lparray[i].val.str; delete [] px->val.array.lparray; } } DLLEXPORT XLOPER *xlAddInManagerInfo(XLOPER *xlAction) { XLOPER xlReturn; static XLOPER xlLongName; // Coerce the argument XLOPER to an integer. Excel(xlCoerce, &xlReturn, 2, xlAction, TempInt(xltypeInt)); // The only valid argument value is 1. In this case we return the // long name for the XLL. Any other value should result in the // return of a #VALUE! error. if (1 == xlReturn.val.w) { ObjHandler::scalarToXloper(xlLongName, std::string("ObjectHandler 0.1.4")); } else { xlLongName.xltype = xltypeErr; xlLongName.val.err = xlerrValue; } return &xlLongName; } Index: .cvsignore =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Register/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 3 Oct 2006 09:32:37 -0000 1.2 --- .cvsignore 3 Oct 2006 12:59:24 -0000 1.3 *************** *** 1,3 **** ! addin.cpp ! register_all.hpp register_functions.cpp --- 1,2 ---- ! register_all.cpp register_functions.cpp --- NEW FILE: register_all.hpp --- /* Copyright (C) 2004, 2005, 2006 Eric Ehlers This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email qua...@li... The license is also available online at http://quantlib.org/html/license.html This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ void registerOhFunctions(const XLOPER&); void unregisterOhFunctions(const XLOPER&); |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:04
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/ohxl/ohxll Removed Files: Makefile.am Log Message: linux catching up --- Makefile.am DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:03
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/ohxl Modified Files: Makefile.am Log Message: linux catching up Index: Makefile.am =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 3 Oct 2006 17:42:06 -0000 1.3 --- Makefile.am 3 Oct 2006 18:29:33 -0000 1.4 *************** *** 16,21 **** dist-hook: ! mkdir -p $(distdir)/Functions $(distdir)/Register cp -p $(srcdir)/Functions/*.cpp $(distdir)/Functions cp -p $(srcdir)/Register/*.?pp $(distdir)/Register --- 16,23 ---- dist-hook: ! mkdir -p $(distdir)/Functions $(distdir)/Register $(distdir)/ohxll $(distdir)/ohxllib cp -p $(srcdir)/Functions/*.cpp $(distdir)/Functions cp -p $(srcdir)/Register/*.?pp $(distdir)/Register + cp -p $(srcdir)/ohxll/*.vcproj $(distdir)/ohxll + cp -p $(srcdir)/ohxllib/*.vcproj $(distdir)/ohxllib |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:03
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/ohxl/ohxllib Removed Files: Makefile.am Log Message: linux catching up --- Makefile.am DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:02
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/metadata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/gensrc/metadata Removed Files: .cvsignore Log Message: linux catching up --- .cvsignore DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:02
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/stubs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/gensrc/stubs Removed Files: .cvsignore Log Message: linux catching up --- .cvsignore DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:02
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/gensrc/scripts Removed Files: .cvsignore Log Message: linux catching up --- .cvsignore DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:01
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/C++ In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/Examples/C++ Modified Files: .cvsignore Log Message: linux catching up Index: .cvsignore =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/C++/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 19 May 2006 15:12:41 -0000 1.1 --- .cvsignore 3 Oct 2006 18:29:32 -0000 1.2 *************** *** 8,10 **** Makefile.in ExampleCpp ! ExampleCpp*.vcproj.* \ No newline at end of file --- 8,11 ---- Makefile.in ExampleCpp ! ExampleCpp*.vcproj.* ! |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:01
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14291/gensrc Modified Files: Makefile.vc gensrc.vcproj gensrc_vc8.vcproj Log Message: cleaner processing to register functions with Excel Index: Makefile.vc =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/Makefile.vc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.vc 2 Oct 2006 14:55:44 -0000 1.5 --- Makefile.vc 3 Oct 2006 12:59:24 -0000 1.6 *************** *** 13,17 **** STUBS= stubs\stub.copyright \ - stubs\stub.excel.xladdin \ stubs\stub.excel.exports \ stubs\stub.excel.includes --- 13,16 ---- Index: gensrc_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/gensrc_vc8.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gensrc_vc8.vcproj 2 Oct 2006 14:55:44 -0000 1.3 --- gensrc_vc8.vcproj 3 Oct 2006 12:59:24 -0000 1.4 *************** *** 67,74 **** </File> <File - RelativePath=".\stubs\stub.excel.xladdin" - > - </File> - <File RelativePath="stubs\stub.excel.exports" > --- 67,70 ---- Index: gensrc.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/gensrc.vcproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gensrc.vcproj 2 Oct 2006 14:55:44 -0000 1.5 --- gensrc.vcproj 3 Oct 2006 12:59:24 -0000 1.6 *************** *** 57,63 **** </File> <File - RelativePath=".\stubs\stub.excel.xladdin"> - </File> - <File RelativePath="stubs\stub.excel.exports"> </File> --- 57,60 ---- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:00
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/stubs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14291/gensrc/stubs Removed Files: stub.excel.addin stub.excel.xladdin Log Message: cleaner processing to register functions with Excel --- stub.excel.addin DELETED --- --- stub.excel.xladdin DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:45:00
|
Update of /cvsroot/objecthandler/ObjectHandler/Docs/pages In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/Docs/pages Modified Files: design.docs Log Message: linux catching up Index: design.docs =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Docs/pages/design.docs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** design.docs 19 May 2006 15:12:41 -0000 1.1 --- design.docs 3 Oct 2006 18:29:32 -0000 1.2 *************** *** 23,26 **** --- 23,36 ---- /*! \page design Design + + <table border="1" bgcolor="lightsteelblue"> + <tr> + <td><b>NB:</b> This document is out of date. The ObjectHandler implementation + still reflects the high-level ideas in this document but many of the details + have changed. For further information please refer to the QuantLibAddin source + code or send email to qua...@li....</td> + </tr> + </table> + \section sec_00 Abstract \par |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:59
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/xl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14291/Examples/xl Modified Files: addinstatic.cpp Log Message: cleaner processing to register functions with Excel Index: addinstatic.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Examples/xl/addinstatic.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** addinstatic.cpp 3 Oct 2006 09:32:36 -0000 1.13 --- addinstatic.cpp 3 Oct 2006 12:59:24 -0000 1.14 *************** *** 39,44 **** Excel(xlGetName, &xDll, 0); ! registerFunctions(xDll); ! registerOhManual(xDll); Excel(xlfRegister, 0, 7, &xDll, --- 39,43 ---- Excel(xlGetName, &xDll, 0); ! registerOhFunctions(xDll); Excel(xlfRegister, 0, 7, &xDll, |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:58
|
Update of /cvsroot/objecthandler/ObjectHandler In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940 Modified Files: Makefile.am configure.ac Log Message: linux catching up Index: configure.ac =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure.ac 28 Aug 2006 10:02:09 -0000 1.4 --- configure.ac 3 Oct 2006 18:29:32 -0000 1.5 *************** *** 59,64 **** oh/Makefile ohxl/Makefile - ohxl/ohxllib/Makefile - ohxl/ohxll/Makefile xlsdk/Makefile ]) AC_OUTPUT --- 59,62 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 28 Aug 2006 10:02:08 -0000 1.3 --- Makefile.am 3 Oct 2006 18:29:32 -0000 1.4 *************** *** 4,9 **** oh \ ohxl \ - ohxl/ohxll \ - ohxl/ohxllib \ xlsdk \ Examples/C++ \ --- 4,7 ---- |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:57
|
Update of /cvsroot/objecthandler/ObjectHandler/Docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/Docs Modified Files: Makefile.am Log Message: linux catching up Index: Makefile.am =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/Docs/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 28 Aug 2006 10:02:09 -0000 1.2 --- Makefile.am 3 Oct 2006 18:29:32 -0000 1.3 *************** *** 1,11 **** EXTRA_DIST = \ ! docs.vcproj \ ! docs_vc8.vcproj \ objecthandler.doxy \ oh_footer.html \ oh_header.html \ oh_headeronline.html \ - Makefile.vc \ style.css --- 1,11 ---- EXTRA_DIST = \ ! docs_vc8.vcproj \ ! docs.vcproj \ ! Makefile.vc \ objecthandler.doxy \ oh_footer.html \ oh_header.html \ oh_headeronline.html \ style.css |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:56
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/stubs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26836/gensrc/stubs Added Files: stub.excel.xladdin Log Message: restore ohParseField()/ohPack() --- NEW FILE: stub.excel.xladdin --- #include <xlsdk/xlsdkdefines.hpp> #include <ohxl/objecthandlerxl.hpp> #include <ohxl/Register/register.hpp> #include <ohxl/export.hpp> #include <ohxl/conversions.hpp> #include <sstream> // instantiate the object handler singleton ObjHandler::ObjectHandlerXL objectHandler; DLLEXPORT int xlAutoOpen() { static XLOPER xDll; try { Excel(xlGetName, &xDll, 0); %(registerFunctions)s Excel(xlfRegister, 0, 11, &xDll, TempStrNoSize("\x06""ohPack"), // function code name TempStrNoSize("\x03""RP#"), // parameter codes TempStrNoSize("\x06""ohPack"), // function display name TempStrNoSize("\x10""inputRange"), // comma-delimited list of parameter names TempStrNoSize("\x01""1"), // function type (1 = worksheet function) TempStrNoSize("\x0D""ObjectHandler"), // function category TempStrNoSize("\x00"""), // shortcut text (command macros only) TempStrNoSize("\x00"""), // path to help file TempStrNoSize("\x3D""trim #ERR/empty values from bottom/right edges of input range"), // function description TempStrNoSize("\x1D""range of cells to be packed ")); // description of parameter 1 Excel(xlfRegister, 0, 14, &xDll, TempStrNoSize("\x0C""ohParseField"), // function code name TempStrNoSize("\x06""RCNCP#"), // parameter codes TempStrNoSize("\x0C""ohParseField"), // function display name TempStrNoSize("\x19""line,index,type,delimiter"), // comma-delimited list of parameter names TempStrNoSize("\x01""1"), // function type (1 = worksheet function) TempStrNoSize("\x0D""ObjectHandler"), // function category TempStrNoSize("\x00"""), // shortcut text (command macros only) TempStrNoSize("\x00"""), // path to help file TempStrNoSize("\x41""Extract the ith number from a whitespace-delimited list of fields"), // function description TempStrNoSize("\x11""text to be parsed"), // description of parameter 1 TempStrNoSize("\x20""index (1-based) of desired field"), // description of parameter 2 TempStrNoSize("\x21""required datatype (string/number)"), // description of parameter 3 TempStrNoSize("\x29""field delimiter (default is whitespace) ")); // description of parameter 3 Excel(xlFree, 0, 1, &xDll); return 1; } catch (const std::exception &e) { std::ostringstream err; err << "Error loading ObjectHandler: " << e.what(); Excel(xlcAlert, 0, 1, TempStrStl(err.str())); Excel(xlFree, 0, 1, &xDll); return 0; } catch (...) { Excel(xlFree, 0, 1, &xDll); return 0; } } DLLEXPORT int xlAutoClose() { static XLOPER xDll; try { // empty the ObjectHandler repository Excel(xlUDF, 0, 1, TempStrNoSize("\x12""ohDeleteAllObjects")); // unregister the addin functions Excel(xlGetName, &xDll, 0); %(registerFunctions)s Excel(xlfRegister, 0, 11, &xDll, TempStrNoSize("\x06""ohPack"), // function code name TempStrNoSize("\x03""RP#"), // parameter codes TempStrNoSize("\x06""ohPack"), // function display name TempStrNoSize("\x10""inputRange"), // comma-delimited list of parameter names TempStrNoSize("\x01""0"), // function type (0 = hidden function) TempStrNoSize("\x0D""ObjectHandler"), // function category TempStrNoSize("\x00"""), // shortcut text (command macros only) TempStrNoSize("\x00"""), // path to help file TempStrNoSize("\x3D""trim #ERR/empty values from bottom/right edges of input range"), // function description TempStrNoSize("\x1D""range of cells to be packed ")); // description of parameter 1 Excel4(xlfRegisterId, &xlRegID, 2, &xDll, TempStrNoSize("\x06""ohPack")); // function code name Excel4(xlfUnregister, 0, 1, &xlRegID); Excel(xlfRegister, 0, 14, &xDll, TempStrNoSize("\x0C""ohParseField"), // function code name TempStrNoSize("\x06""RCNCP#"), // parameter codes TempStrNoSize("\x0C""ohParseField"), // function display name TempStrNoSize("\x19""line,index,type,delimiter"), // comma-delimited list of parameter names TempStrNoSize("\x01""0"), // function type (0 = hidden function) TempStrNoSize("\x0D""ObjectHandler"), // function category TempStrNoSize("\x00"""), // shortcut text (command macros only) TempStrNoSize("\x00"""), // path to help file TempStrNoSize("\x41""Extract the ith number from a whitespace-delimited list of fields"), // function description TempStrNoSize("\x11""text to be parsed"), // description of parameter 1 TempStrNoSize("\x20""index (1-based) of desired field"), // description of parameter 2 TempStrNoSize("\x21""required datatype (string/number)"), // description of parameter 3 TempStrNoSize("\x29""field delimiter (default is whitespace) ")); // description of parameter 3 Excel4(xlfRegisterId, &xlRegID, 2, &xDll, TempStrNoSize("\x0C""ohParseField")); // function code name Excel4(xlfUnregister, 0, 1, &xlRegID); Excel(xlFree, 0, 1, &xDll); return 1; } catch (...) { Excel(xlFree, 0, 1, &xDll); return 0; } } DLLEXPORT void xlAutoFree(XLOPER *px) { if (px->xltype & xltypeStr && px->val.str) delete [] px->val.str; else if (px->xltype & xltypeMulti && px->val.array.lparray) { int size = px->val.array.rows * px->val.array.columns; for (int i=0; i<size; i++) if (px->val.array.lparray[i].xltype & xltypeStr && px->val.array.lparray[i].val.str) delete [] px->val.array.lparray[i].val.str; delete [] px->val.array.lparray; } } DLLEXPORT XLOPER *xlAddInManagerInfo(XLOPER *xlAction) { XLOPER xlReturn; static XLOPER xlLongName; // Coerce the argument XLOPER to an integer. Excel(xlCoerce, &xlReturn, 2, xlAction, TempInt(xltypeInt)); // The only valid argument value is 1. In this case we return the // long name for the XLL. Any other value should result in the // return of a #VALUE! error. if (1 == xlReturn.val.w) { ObjHandler::scalarToXloper(xlLongName, std::string("ObjectHandler 0.1.4")); } else { xlLongName.xltype = xltypeErr; xlLongName.val.err = xlerrValue; } return &xlLongName; } |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:55
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9167/gensrc Modified Files: Makefile.vc gensrc.vcproj gensrc_vc8.vcproj Log Message: restore ohParseField()/ohPack() Index: Makefile.vc =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/Makefile.vc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.vc 2 Oct 2006 12:31:16 -0000 1.4 --- Makefile.vc 2 Oct 2006 14:55:44 -0000 1.5 *************** *** 13,17 **** STUBS= stubs\stub.copyright \ ! stubs\stub.excel.addin \ stubs\stub.excel.exports \ stubs\stub.excel.includes --- 13,17 ---- STUBS= stubs\stub.copyright \ ! stubs\stub.excel.xladdin \ stubs\stub.excel.exports \ stubs\stub.excel.includes Index: gensrc_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/gensrc_vc8.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gensrc_vc8.vcproj 2 Oct 2006 12:31:16 -0000 1.2 --- gensrc_vc8.vcproj 2 Oct 2006 14:55:44 -0000 1.3 *************** *** 67,71 **** </File> <File ! RelativePath=".\stubs\stub.excel.addin" > </File> --- 67,71 ---- </File> <File ! RelativePath=".\stubs\stub.excel.xladdin" > </File> Index: gensrc.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/gensrc.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gensrc.vcproj 2 Oct 2006 12:31:16 -0000 1.4 --- gensrc.vcproj 2 Oct 2006 14:55:44 -0000 1.5 *************** *** 57,61 **** </File> <File ! RelativePath=".\stubs\stub.excel.addin"> </File> <File --- 57,61 ---- </File> <File ! RelativePath=".\stubs\stub.excel.xladdin"> </File> <File |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:53
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14931/ohxl/ohxll Modified Files: ohxll.vcproj ohxll_vc8.vcproj Log Message: bring ohxll up to date Index: ohxll_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll/ohxll_vc8.vcproj,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ohxll_vc8.vcproj 2 Oct 2006 12:31:17 -0000 1.12 --- ohxll_vc8.vcproj 3 Oct 2006 14:20:12 -0000 1.13 *************** *** 309,312 **** --- 309,316 ---- </File> <File + RelativePath="..\Functions\manual.cpp" + > + </File> + <File RelativePath="..\objecthandlerxl.cpp" > *************** *** 329,332 **** --- 333,340 ---- </File> <File + RelativePath="..\Register\register_all.cpp" + > + </File> + <File RelativePath="..\Register\register_all.hpp" > *************** *** 336,339 **** --- 344,351 ---- > </File> + <File + RelativePath="..\Register\register_manual.cpp" + > + </File> </Filter> <Filter Index: ohxll.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll/ohxll.vcproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ohxll.vcproj 2 Oct 2006 12:31:17 -0000 1.7 --- ohxll.vcproj 3 Oct 2006 14:20:12 -0000 1.8 *************** *** 227,230 **** --- 227,233 ---- </File> <File + RelativePath="..\Functions\manual.cpp"> + </File> + <File RelativePath="..\objecthandlerxl.cpp"> </File> *************** *** 239,242 **** --- 242,248 ---- </File> <File + RelativePath="..\Register\register_all.cpp"> + </File> + <File RelativePath="..\Register\register_all.hpp"> </File> *************** *** 244,247 **** --- 250,256 ---- RelativePath="..\Register\register_functions.cpp"> </File> + <File + RelativePath="..\Register\register_manual.cpp"> + </File> </Filter> <Filter |
From: Eric E. <eri...@us...> - 2006-10-04 03:44:52
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/Register In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14931/ohxl/Register Modified Files: addin.cpp Log Message: bring ohxll up to date Index: addin.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Register/addin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** addin.cpp 3 Oct 2006 12:59:24 -0000 1.1 --- addin.cpp 3 Oct 2006 14:20:12 -0000 1.2 *************** *** 3,7 **** Copyright (C) 2004, 2005, 2006 Eric Ehlers - This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ --- 3,6 ---- *************** *** 19,23 **** #include <xlsdk/xlsdkdefines.hpp> #include <ohxl/objecthandlerxl.hpp> ! #include <ohxl/Register/register.hpp> #include <ohxl/export.hpp> #include <ohxl/conversions.hpp> --- 18,22 ---- #include <xlsdk/xlsdkdefines.hpp> #include <ohxl/objecthandlerxl.hpp> ! #include <ohxl/Register/register_all.hpp> #include <ohxl/export.hpp> #include <ohxl/conversions.hpp> |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:35
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32753 Modified Files: ohxllib.vcproj Log Message: add new files Index: ohxllib.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ohxllib.vcproj 3 Oct 2006 12:59:24 -0000 1.8 --- ohxllib.vcproj 3 Oct 2006 17:50:21 -0000 1.9 *************** *** 404,407 **** --- 404,410 ---- </File> <File + RelativePath="..\functioncount.hpp"> + </File> + <File RelativePath="..\Functions\functions.cpp"> </File> *************** *** 416,419 **** --- 419,425 ---- </File> <File + RelativePath="..\objhandlerxl.hpp"> + </File> + <File RelativePath="..\rangereference.cpp"> </File> |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:33
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29590 Modified Files: Makefile.am Log Message: add new files Index: Makefile.am =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 26 Jul 2006 09:36:15 -0000 1.2 --- Makefile.am 3 Oct 2006 17:42:06 -0000 1.3 *************** *** 5,14 **** conversions.cpp \ conversions.hpp \ functioncall.cpp \ functioncall.hpp \ objecthandlerxl.cpp \ objecthandlerxl.hpp \ objhandlerxl.hpp \ ! register.hpp \ ! unregister.hpp --- 5,21 ---- conversions.cpp \ conversions.hpp \ + export.hpp \ functioncall.cpp \ functioncall.hpp \ + functioncount.hpp \ objecthandlerxl.cpp \ objecthandlerxl.hpp \ objhandlerxl.hpp \ ! rangereference.cpp \ ! rangereference.hpp ! ! dist-hook: ! mkdir -p $(distdir)/Functions $(distdir)/Register ! cp -p $(srcdir)/Functions/*.cpp $(distdir)/Functions ! cp -p $(srcdir)/Register/*.?pp $(distdir)/Register |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:31
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/config In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15940/gensrc/config Removed Files: .cvsignore Log Message: linux catching up --- .cvsignore DELETED --- |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:29
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/metadata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31124/gensrc/metadata Modified Files: functions.xml Log Message: cleaner implementation for ohPack/ohParseFields Index: functions.xml =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/metadata/functions.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** functions.xml 22 Sep 2006 15:20:52 -0000 1.18 --- functions.xml 3 Oct 2006 09:32:37 -0000 1.19 *************** *** 145,148 **** --- 145,149 ---- <description>forces a dependency between two functions and returns the update counter</description> <alias>ObjHandler::dependsOn</alias> + <documentationOnly>true</documentationOnly> <supportedPlatforms> <supportedPlatform>excel</supportedPlatform> *************** *** 415,421 **** </Procedure> ! <!--Procedure name='ohPack'> <description>trim error values from bottom/right of matrix/vector</description> <alias>ObjHandler::ObjectHandlerXL::instance().packMatrix</alias> <ParameterList> <Parameters> --- 416,426 ---- </Procedure> ! <Procedure name='ohPack'> <description>trim error values from bottom/right of matrix/vector</description> <alias>ObjHandler::ObjectHandlerXL::instance().packMatrix</alias> + <documentationOnly>true</documentationOnly> + <supportedPlatforms> + <supportedPlatform>excel</supportedPlatform> + </supportedPlatforms> <ParameterList> <Parameters> *************** *** 431,439 **** <tensorRank>matrix</tensorRank> </ReturnValue> ! </Procedure--> ! <!--Procedure name='ohParseField'> <description>Extract the ith number from a whitespace-delimited list of fields</description> <alias>ObjHandler::parseField</alias> <ParameterList> <Parameters> --- 436,448 ---- <tensorRank>matrix</tensorRank> </ReturnValue> ! </Procedure> ! <Procedure name='ohParseField'> <description>Extract the ith number from a whitespace-delimited list of fields</description> <alias>ObjHandler::parseField</alias> + <documentationOnly>true</documentationOnly> + <supportedPlatforms> + <supportedPlatform>excel</supportedPlatform> + </supportedPlatforms> <ParameterList> <Parameters> *************** *** 454,459 **** <tensorRank>scalar</tensorRank> </ReturnValue> ! </Procedure--> </Functions> </Category> --- 463,484 ---- <tensorRank>scalar</tensorRank> </ReturnValue> ! </Procedure> + <Procedure name='ohFunctionCount'> + <description>returns the number of functions in this addin</description> + <alias>ObjHandler::version</alias> + <documentationOnly>true</documentationOnly> + <supportedPlatforms> + <supportedPlatform>excel</supportedPlatform> + </supportedPlatforms> + <ParameterList> + <Parameters/> + </ParameterList> + <ReturnValue> + <type>long</type> + <tensorRank>scalar</tensorRank> + </ReturnValue> + </Procedure> + </Functions> </Category> |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:28
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/Functions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31124/ohxl/Functions Modified Files: .cvsignore Added Files: manual.cpp Log Message: cleaner implementation for ohPack/ohParseFields Index: .cvsignore =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/Functions/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 2 Oct 2006 12:31:17 -0000 1.1 --- .cvsignore 3 Oct 2006 09:32:37 -0000 1.2 *************** *** 1 **** ! *.* --- 1 ---- ! functions.cpp --- NEW FILE: manual.cpp --- /* Copyright (C) 2006 Eric Ehlers This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email qua...@li... The license is also available online at http://quantlib.org/html/license.html This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ // Excel functions coded by hand, to be registered with Excel // alongside the autogenerated functions. #include <oh/utilities.hpp> #include <oh/exception.hpp> #include <ohxl/objecthandlerxl.hpp> #include <ohxl/conversions.hpp> #include <ohxl/functioncall.hpp> #include <ohxl/functioncount.hpp> #include <sstream> #include <map> #include <boost/lexical_cast.hpp> #define XLL_DEC extern "C" #define SET_SESSION_ID XLL_DEC long *ohDependsOn( OPER *dummy0, OPER *dummy1, OPER *dummy2, OPER *dummy3, OPER *dummy4, OPER *dummy5, OPER *dummy6, OPER *dummy7, OPER *dummy8, OPER *dummy9, OPER *trigger) { boost::shared_ptr<ObjHandler::FunctionCall> functionCall; try { // initialize Function Call object functionCall = boost::shared_ptr<ObjHandler::FunctionCall> ( new ObjHandler::FunctionCall("ohDependsOn") ); if (functionCall->IsCalledByFuncWiz()) return 0; ObjHandler::validateTrigger(trigger); // initialize the QuantLib session ID (if enabled) SET_SESSION_ID // reset the calling cell ObjHandler::ObjectHandlerXL::instance().resetCaller(); // invoke the utility function static std::map < std::string, long > iterators; static long returnValue; returnValue = iterators[ObjHandler::FunctionCall::instance().getAddressString()]++; // convert and return the return value return &returnValue; } catch (const std::exception &e) { std::ostringstream err; err << "ohDependsOn - "; if (functionCall) err << functionCall->getAddressString() << " - "; err << e.what(); ObjHandler::ObjectHandlerXL::instance().logError(err.str()); return 0; } } XLL_DEC long *ohFunctionCount() { // FUNCTION_COUNT gives the number of autogenerated functions, // add 4 for the hand-written functions in this file static long returnValue = FUNCTION_COUNT + 4; return &returnValue; } int countValidRows(const XLOPER &xMulti) { for (int numValidRows=xMulti.val.array.rows; numValidRows; numValidRows--) { for (int i=0; i<xMulti.val.array.columns; i++) { int index = (numValidRows - 1) * xMulti.val.array.columns + i; if (!(xMulti.val.array.lparray[index].xltype & (xltypeErr | xltypeNil))) return numValidRows; } } return 1; } int countValidCols(const XLOPER &xMulti) { for (int numValidCols=xMulti.val.array.columns; numValidCols; numValidCols--) { for (int i=0; i<xMulti.val.array.rows; i++) { int index = (numValidCols - 1) + i * xMulti.val.array.columns; if (!(xMulti.val.array.lparray[index].xltype & (xltypeErr | xltypeNil))) return numValidCols; } } return 1; } XLL_DEC XLOPER *ohPack(OPER *xInputRange) { boost::shared_ptr < ObjHandler::FunctionCall > functionCall; XLOPER xMulti; static XLOPER xRet; xRet.val.array.lparray = 0; try { functionCall = boost::shared_ptr < ObjHandler::FunctionCall > ( new ObjHandler::FunctionCall("ohPack") ); Excel(xlCoerce, &xMulti, 2, xInputRange, TempInt(xltypeMulti)); int numValidRows = countValidRows(xMulti); int numValidCols = countValidCols(xMulti); xRet.val.array.rows = numValidRows; xRet.val.array.columns = numValidCols; xRet.val.array.lparray = new XLOPER[numValidRows * numValidCols]; if (!xRet.val.array.lparray) throw ObjHandler::Exception("ohPack: error on call to new"); xRet.xltype = xltypeMulti | xlbitDLLFree; for (int i=0; i<numValidRows; i++) { for (int j=0; j<numValidCols; j++) { int indexSource = i * xMulti.val.array.columns + j; int indexTarget = i * numValidCols + j; ObjHandler::operToOper(&xRet.val.array.lparray[indexTarget], &xMulti.val.array.lparray[indexSource]); } } Excel(xlFree, 0, 1, &xMulti); return &xRet; } catch (const std::exception &e) { // free any memory that may have been allocated Excel(xlFree, 0, 1, &xMulti); if (xRet.xltype & xltypeMulti && xRet.val.array.lparray) { for (int i=0; i<xRet.val.array.columns * xRet.val.array.rows; i++) { if (xRet.val.array.lparray[i].xltype & xltypeStr && xRet.val.array.lparray[i].val.str) delete [] xRet.val.array.lparray[i].val.str; } delete [] xRet.val.array.lparray; } // log the exception and return a null pointer (#NUM!) to Excel std::ostringstream err; err << "ohPack - "; if (functionCall) err << functionCall->getAddressString() << " - "; err << e.what(); ObjHandler::logMessage(err.str(), 2); return 0; } } XLL_DEC XLOPER *ohParseField( char *line, long *index, char *type, OPER *delim) { boost::shared_ptr < ObjHandler::FunctionCall > functionCall; try { functionCall = boost::shared_ptr < ObjHandler::FunctionCall > ( new ObjHandler::FunctionCall("ohParseField") ); SET_SESSION_ID // reset the calling cell ObjHandler::ObjectHandlerXL::instance().resetCaller(); // invoke the utility function std::string delimStr; ObjHandler::operToScalar(delimStr, *delim, "[:space:]"); if (*index<1) { std::stringstream msg; msg << "the index of the requested field - " << *index << " - is invalid - minimum value is 1."; throw ObjHandler::Exception(msg.str()); } unsigned int i = static_cast<unsigned int>(*index); std::vector<std::string> fields = ObjHandler::split(line, i, delimStr); if (i>fields.size()) { std::stringstream msg; msg << "Error parsing string -" << std::endl << line << std::endl << "- requested field index " << i << " exceeds #fields (" << fields.size() << ") found in string"; throw ObjHandler::Exception(msg.str()); } static XLOPER xRet; std::string typeStr(type); if (typeStr.empty() || ObjHandler::uppercase(typeStr) == "NUMBER") { double ret; try { ret = boost::lexical_cast<double>(fields[i-1]); } catch (boost::bad_lexical_cast &) { std::stringstream msg; msg << "Error parsing string -" << std::endl << line << std::endl << "- the requested field #" << i << " comprising text '" << fields[i-1] << "' could not be converted to a number"; throw ObjHandler::Exception(msg.str()); } ObjHandler::scalarToXloper(xRet, ret); } else if (ObjHandler::uppercase(typeStr) == "STRING") { ObjHandler::scalarToXloper(xRet, fields[i-1]); } else { std::stringstream msg; msg << "invalid type specified -" << " expected 'NUMBER' or 'STRING' -" << " detected '" << type << "'"; throw ObjHandler::Exception(msg.str()); } return &xRet; } catch (const std::exception &e) { std::ostringstream err; err << "ohParseField - "; if (functionCall) err << functionCall->getAddressString() << " - "; err << e.what(); ObjHandler::logMessage(err.str(), 2); return 0; } } |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:27
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31124/ohxl/ohxllib Modified Files: ohxllib.vcproj ohxllib_vc8.vcproj Log Message: cleaner implementation for ohPack/ohParseFields Index: ohxllib_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib_vc8.vcproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ohxllib_vc8.vcproj 2 Oct 2006 12:31:17 -0000 1.10 --- ohxllib_vc8.vcproj 3 Oct 2006 09:32:37 -0000 1.11 *************** *** 426,429 **** --- 426,433 ---- </File> <File + RelativePath="..\Functions\manual.cpp" + > + </File> + <File RelativePath="..\objecthandlerxl.cpp" > *************** *** 453,456 **** --- 457,464 ---- > </File> + <File + RelativePath="..\Register\register_manual.cpp" + > + </File> </Filter> </Files> Index: ohxllib.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib.vcproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ohxllib.vcproj 2 Oct 2006 12:31:17 -0000 1.6 --- ohxllib.vcproj 3 Oct 2006 09:32:37 -0000 1.7 *************** *** 407,410 **** --- 407,413 ---- </File> <File + RelativePath="..\Functions\manual.cpp"> + </File> + <File RelativePath="..\objecthandlerxl.cpp"> </File> *************** *** 424,427 **** --- 427,433 ---- RelativePath="..\Register\register_functions.cpp"> </File> + <File + RelativePath="..\Register\register_manual.cpp"> + </File> </Filter> </Files> |
From: Eric E. <eri...@us...> - 2006-10-04 03:42:27
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14291/ohxl/ohxllib Modified Files: ohxllib.vcproj ohxllib_vc8.vcproj Log Message: cleaner processing to register functions with Excel Index: ohxllib_vc8.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib_vc8.vcproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ohxllib_vc8.vcproj 3 Oct 2006 09:32:37 -0000 1.11 --- ohxllib_vc8.vcproj 3 Oct 2006 12:59:24 -0000 1.12 *************** *** 450,453 **** --- 450,457 ---- </File> <File + RelativePath="..\Register\register_all.cpp" + > + </File> + <File RelativePath="..\Register\register_all.hpp" > Index: ohxllib.vcproj =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib/ohxllib.vcproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ohxllib.vcproj 3 Oct 2006 09:32:37 -0000 1.7 --- ohxllib.vcproj 3 Oct 2006 12:59:24 -0000 1.8 *************** *** 422,425 **** --- 422,428 ---- </File> <File + RelativePath="..\Register\register_all.cpp"> + </File> + <File RelativePath="..\Register\register_all.hpp"> </File> |