objecthandler-cvs Mailing List for ObjectHandler (Page 15)
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-07-26 09:36:24
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27209/ohxl/ohxll Modified Files: Makefile.am Log Message: updates for linux/autoconf/gcc4.1.0 Index: Makefile.am =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 19 May 2006 15:12:41 -0000 1.1 --- Makefile.am 26 Jul 2006 09:36:15 -0000 1.2 *************** *** 2,6 **** EXTRA_DIST = \ addin.cpp \ - ohxll.dsp \ ohxll.vcproj \ ohxll_vc8.vcproj --- 2,5 ---- |
From: Eric E. <eri...@us...> - 2006-07-26 09:36:17
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/metadata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27209/gensrc/metadata Added Files: .cvsignore Makefile.am Log Message: updates for linux/autoconf/gcc4.1.0 --- NEW FILE: .cvsignore --- Makefile Makefile.in --- NEW FILE: Makefile.am --- EXTRA_DIST = \ gensrc_vc8.vcproj \ gensrc.vcproj \ Makefile.vc |
From: Eric E. <eri...@us...> - 2006-07-26 07:01:34
|
Update of /cvsroot/objecthandler/log4cxx-0.9.7/include/log4cxx/xml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31024/include/log4cxx/xml Modified Files: domconfigurator.h Log Message: update for gcc4 Index: domconfigurator.h =================================================================== RCS file: /cvsroot/objecthandler/log4cxx-0.9.7/include/log4cxx/xml/domconfigurator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** domconfigurator.h 25 May 2006 11:41:32 -0000 1.1 --- domconfigurator.h 26 Jul 2006 07:01:28 -0000 1.2 *************** *** 209,213 **** protected: ! String DOMConfigurator::subst(const String& value); protected: --- 209,213 ---- protected: ! String subst(const String& value); protected: |
From: Eric E. <eri...@us...> - 2006-07-25 18:17:53
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18152/ohxl Modified Files: objecthandlerxl.cpp Log Message: fix problems with nested functions Index: objecthandlerxl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** objecthandlerxl.cpp 17 Jul 2006 17:46:46 -0000 1.12 --- objecthandlerxl.cpp 25 Jul 2006 18:14:36 -0000 1.13 *************** *** 102,106 **** return; boost::shared_ptr<CallingRange> callingRange = getCallingRange(); ! if (!callingRange) { callingRange = boost::shared_ptr<CallingRange>(new CallingRange); callingRanges_[callingRange->getKey()] = callingRange; --- 102,106 ---- return; boost::shared_ptr<CallingRange> callingRange = getCallingRange(); ! if (!callingRange && createIfNone) { callingRange = boost::shared_ptr<CallingRange>(new CallingRange); callingRanges_[callingRange->getKey()] = callingRange; *************** *** 113,117 **** std::string objectID, const boost::shared_ptr<Object> &object) { - resetCaller(true); if (objectID.empty()) { --- 113,116 ---- |
From: Eric E. <eri...@us...> - 2006-07-19 18:32:07
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/config In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5984/gensrc/config Modified Files: config.xml Log Message: renamed tag for namespace Index: config.xml =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/config/config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.xml 11 Jul 2006 13:30:39 -0000 1.2 --- config.xml 19 Jul 2006 18:32:02 -0000 1.3 *************** *** 2,6 **** <excelRootDirectory>../ohxl/</excelRootDirectory> ! <namespace>ObjHandler</namespace> <categoryNames> --- 2,6 ---- <excelRootDirectory>../ohxl/</excelRootDirectory> ! <namespace1>ObjHandler</namespace1> <categoryNames> |
From: Eric E. <eri...@us...> - 2006-07-19 16:39:30
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24958/oh Modified Files: object.hpp Log Message: parameterize hard-coded datatype conversions Index: object.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/object.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** object.hpp 17 Jul 2006 10:11:39 -0000 1.11 --- object.hpp 19 Jul 2006 16:39:27 -0000 1.12 *************** *** 43,48 **** NAME ## temp->getLibraryObject<LIBRARY_CLASS>(); ! // OH_GET_REF_DEFAULT - like OH_GET_REFERENCE but only attempt retrieval if id supplied ! #define OH_GET_REF_DEFAULT( NAME, ID, OBJECT_CLASS, LIBRARY_CLASS ) \ /*const*/ boost::shared_ptr<LIBRARY_CLASS> NAME; \ if (!ID.empty()) { \ --- 43,48 ---- NAME ## temp->getLibraryObject<LIBRARY_CLASS>(); ! // OH_GET_REFERENCE_DEFAULT - like OH_GET_REFERENCE but only attempt retrieval if id supplied ! #define OH_GET_REFERENCE_DEFAULT( NAME, ID, OBJECT_CLASS, LIBRARY_CLASS ) \ /*const*/ boost::shared_ptr<LIBRARY_CLASS> NAME; \ if (!ID.empty()) { \ |
From: Eric E. <eri...@us...> - 2006-07-17 17:46:49
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20243/ohxl Modified Files: functioncall.cpp functioncall.hpp objecthandlerxl.cpp Log Message: only execute resetCaller() if XLL called from a cell formula Index: objecthandlerxl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** objecthandlerxl.cpp 17 Jul 2006 10:11:40 -0000 1.11 --- objecthandlerxl.cpp 17 Jul 2006 17:46:46 -0000 1.12 *************** *** 99,102 **** --- 99,104 ---- void ObjectHandlerXL::resetCaller(bool createIfNone) { + if (FunctionCall::instance().getCallerType() != Cell) + return; boost::shared_ptr<CallingRange> callingRange = getCallingRange(); if (!callingRange) { Index: functioncall.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/functioncall.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functioncall.hpp 14 Jun 2006 15:25:57 -0000 1.5 --- functioncall.hpp 17 Jul 2006 17:46:46 -0000 1.6 *************** *** 32,35 **** --- 32,36 ---- enum CallerDimensions { Uninitialized, Row, Column, /* Matrix, Scalar */ }; + enum CallerType { Uninitialized2, Cell, /* Menu, VBA, */ Unknown }; //! Singleton encapsulating state relating to Excel function call. *************** *** 51,54 **** --- 52,56 ---- //bool outerFunction(); CallerDimensions getCallerDimensions(); + CallerType getCallerType(); bool IsCalledByFuncWiz(); private: *************** *** 61,64 **** --- 63,67 ---- std::string functionName_; CallerDimensions callerDimensions_; + CallerType callerType_; }; Index: functioncall.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/functioncall.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functioncall.cpp 16 Jul 2006 17:11:19 -0000 1.8 --- functioncall.cpp 17 Jul 2006 17:46:46 -0000 1.9 *************** *** 29,33 **** FunctionCall::FunctionCall(const std::string functionName) ! : functionName_(functionName), callerDimensions_(Uninitialized) { if (instance_) throw Exception("Multiple attempts to initialize global FunctionCall object"); --- 29,34 ---- FunctionCall::FunctionCall(const std::string functionName) ! : functionName_(functionName), callerDimensions_(Uninitialized), ! callerType_(Uninitialized2){ if (instance_) throw Exception("Multiple attempts to initialize global FunctionCall object"); *************** *** 157,159 **** --- 158,174 ---- } + CallerType FunctionCall::getCallerType() { + if (callerType_ == Uninitialized2) { + const XLOPER *xCaller = getCallerReference(); + if (xCaller->xltype == xltypeRef || xCaller->xltype == xltypeSRef) + callerType_ = Cell; + //else if (xCaller->xltype == xltypeMulti) + // callerType_ = Menu; + //else if (xCaller->xltype == xltypeErr) + // callerType_ = VBA; + else + callerType_ = Unknown; + } + return callerType_; + } } |
From: Ferdinando A. <na...@us...> - 2006-07-17 10:11:44
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29706/ohxl Modified Files: callingrange.cpp callingrange.hpp objecthandlerxl.cpp objecthandlerxl.hpp Log Message: InstanceName replaced with ObjectID Index: objecthandlerxl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** objecthandlerxl.cpp 16 Jul 2006 17:11:19 -0000 1.10 --- objecthandlerxl.cpp 17 Jul 2006 10:11:40 -0000 1.11 *************** *** 35,39 **** namespace ObjHandler { ! unsigned long ObjectHandlerXL::instanceNameCount_ = 0; // std::map cannot be exported across DLL boundaries --- 35,39 ---- namespace ObjHandler { ! unsigned long ObjectHandlerXL::objectIDCount_ = 0; // std::map cannot be exported across DLL boundaries *************** *** 109,141 **** std::string ObjectHandlerXL::storeObject( ! std::string instanceName, const boost::shared_ptr<Object> &object) { resetCaller(true); ! if (instanceName.empty()) { ! instanceName = generateInstanceName(); object->setAnonymous(); } boost::shared_ptr<CallingRange> callingRange = getCallingRange(); ! callingRange->deleteObject(instanceName, object); ! checkName(instanceName); ! callingRange->registerObject(instanceName, object); ! std::string instanceNameCounter = ObjectHandler::storeObject(instanceName, object); ! return instanceNameCounter + "#" + callingRange->updateCount(); } ! boost::shared_ptr<Object> ObjectHandlerXL::retrieveObjectImpl(const std::string &instanceName) const { ! std::string instanceNameStub; ! int counterOffset = instanceName.length() - 5; ! if (counterOffset >= 0 && instanceName[counterOffset] == '#') ! instanceNameStub = instanceName.substr(0, counterOffset); else ! instanceNameStub = instanceName; ! return ObjectHandler::retrieveObjectImpl(instanceNameStub); } ! std::string ObjectHandlerXL::generateInstanceName() { /* The user has provided a null string as the object ID so generate a name automatically. --- 109,141 ---- std::string ObjectHandlerXL::storeObject( ! std::string objectID, const boost::shared_ptr<Object> &object) { resetCaller(true); ! if (objectID.empty()) { ! objectID = generateObjectID(); object->setAnonymous(); } boost::shared_ptr<CallingRange> callingRange = getCallingRange(); ! callingRange->deleteObject(objectID, object); ! checkName(objectID); ! callingRange->registerObject(objectID, object); ! std::string objectIDCounter = ObjectHandler::storeObject(objectID, object); ! return objectIDCounter + "#" + callingRange->updateCount(); } ! boost::shared_ptr<Object> ObjectHandlerXL::retrieveObjectImpl(const std::string &objectID) const { ! std::string objectIDStub; ! int counterOffset = objectID.length() - 5; ! if (counterOffset >= 0 && objectID[counterOffset] == '#') ! objectIDStub = objectID.substr(0, counterOffset); else ! objectIDStub = objectID; ! return ObjectHandler::retrieveObjectImpl(objectIDStub); } ! std::string ObjectHandlerXL::generateObjectID() { /* The user has provided a null string as the object ID so generate a name automatically. *************** *** 147,151 **** static const int COUNT_BASE = 16; ! if (instanceNameCount_ == ULONG_MAX) { std::ostringstream msg; msg << "ObjectHandler has exceeded the maximum limit of " << ULONG_MAX --- 147,151 ---- static const int COUNT_BASE = 16; ! if (objectIDCount_ == ULONG_MAX) { std::ostringstream msg; msg << "ObjectHandler has exceeded the maximum limit of " << ULONG_MAX *************** *** 156,160 **** } std::ostringstream s; ! s << "obj_" << std::setw(COUNT_WIDTH) << std::setfill('0') << std::setbase(COUNT_BASE) << instanceNameCount_++; return s.str(); } --- 156,160 ---- } std::ostringstream s; ! s << "obj_" << std::setw(COUNT_WIDTH) << std::setfill('0') << std::setbase(COUNT_BASE) << objectIDCount_++; return s.str(); } *************** *** 184,188 **** if (deletePermanent) { callingRanges_.clear(); ! instanceNameCount_ = 0; } ObjectHandler::deleteAllObjects(deletePermanent); --- 184,188 ---- if (deletePermanent) { callingRanges_.clear(); ! objectIDCount_ = 0; } ObjectHandler::deleteAllObjects(deletePermanent); Index: objecthandlerxl.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** objecthandlerxl.hpp 16 Jul 2006 17:11:19 -0000 1.10 --- objecthandlerxl.hpp 17 Jul 2006 10:11:40 -0000 1.11 *************** *** 54,60 **** Performance in such special cases is sub-optimal. */ ! virtual std::string storeObject(std::string instanceName, const boost::shared_ptr < Object > &object); ! virtual boost::shared_ptr < Object > retrieveObjectImpl(const std::string &instanceName) const; virtual void collectGarbage(const bool &deletePermanent = false); virtual void deleteAllObjects(const bool &deletePermanent = false); --- 54,60 ---- Performance in such special cases is sub-optimal. */ ! virtual std::string storeObject(std::string objectID, const boost::shared_ptr < Object > &object); ! virtual boost::shared_ptr < Object > retrieveObjectImpl(const std::string &objectID) const; virtual void collectGarbage(const bool &deletePermanent = false); virtual void deleteAllObjects(const bool &deletePermanent = false); *************** *** 70,76 **** private: boost::shared_ptr < CallingRange > getCallingRange(); ! virtual std::string generateInstanceName(); void clearCallingRange(boost::shared_ptr < CallingRange > callingRange); ! static unsigned long instanceNameCount_; }; --- 70,76 ---- private: boost::shared_ptr < CallingRange > getCallingRange(); ! virtual std::string generateObjectID(); void clearCallingRange(boost::shared_ptr < CallingRange > callingRange); ! static unsigned long objectIDCount_; }; Index: callingrange.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/callingrange.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** callingrange.cpp 16 Jul 2006 17:11:18 -0000 1.6 --- callingrange.cpp 17 Jul 2006 10:11:40 -0000 1.7 *************** *** 85,92 **** void CallingRange::deleteObject( ! const std::string &instanceName, boost::shared_ptr<Object> object) { std::map<std::string, boost::shared_ptr<Object> >::const_iterator i; ! i = residentObjects_.find(instanceName); if (i != residentObjects_.end()) { ObjectHandler::instance().deleteObject(i->first); --- 85,92 ---- void CallingRange::deleteObject( ! const std::string &objectID, boost::shared_ptr<Object> object) { std::map<std::string, boost::shared_ptr<Object> >::const_iterator i; ! i = residentObjects_.find(objectID); if (i != residentObjects_.end()) { ObjectHandler::instance().deleteObject(i->first); *************** *** 96,102 **** void CallingRange::registerObject( ! const std::string &instanceName, boost::shared_ptr<Object> object) { ! residentObjects_[instanceName] = object; } --- 96,102 ---- void CallingRange::registerObject( ! const std::string &objectID, boost::shared_ptr<Object> object) { ! residentObjects_[objectID] = object; } Index: callingrange.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/callingrange.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** callingrange.hpp 18 Jun 2006 13:41:51 -0000 1.5 --- callingrange.hpp 17 Jul 2006 10:11:40 -0000 1.6 *************** *** 36,42 **** return key_; } ! void deleteObject(const std::string &instanceName, boost::shared_ptr<Object> object); ! void registerObject(const std::string &instanceName, boost::shared_ptr<Object> object); void clearNonPermanent(); --- 36,42 ---- return key_; } ! void deleteObject(const std::string &objectID, boost::shared_ptr<Object> object); ! void registerObject(const std::string &objectID, boost::shared_ptr<Object> object); void clearNonPermanent(); |
From: Ferdinando A. <na...@us...> - 2006-07-17 10:11:44
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29706/oh Modified Files: object.hpp objecthandler.cpp objecthandler.hpp utilities.cpp utilities.hpp Log Message: InstanceName replaced with ObjectID Index: utilities.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** utilities.cpp 12 Jul 2006 14:02:23 -0000 1.12 --- utilities.cpp 17 Jul 2006 10:11:39 -0000 1.13 *************** *** 62,74 **** } ! void logObject(const std::string &instanceName) { std::ostringstream msg; boost::shared_ptr<Object> object = ! ObjectHandler::instance().retrieveObjectImpl(instanceName); if (object) { ! msg << "log dump of object with instance name = " << instanceName << std::endl; msg << *object.get(); } else { ! msg << "no object in repository with instance name = " << instanceName << std::endl; } Logger::instance().logMessage(msg.str()); --- 62,74 ---- } ! void logObject(const std::string &objectID) { std::ostringstream msg; boost::shared_ptr<Object> object = ! ObjectHandler::instance().retrieveObjectImpl(objectID); if (object) { ! msg << "log dump of object with instance name = " << objectID << std::endl; msg << *object.get(); } else { ! msg << "no object in repository with instance name = " << objectID << std::endl; } Logger::instance().logMessage(msg.str()); Index: object.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/object.hpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** object.hpp 14 Jul 2006 08:16:51 -0000 1.10 --- object.hpp 17 Jul 2006 10:11:39 -0000 1.11 *************** *** 69,73 **** /*! Construct an Object. To store the resulting Object in the ObjectHandler, call ! ObjectHandler::instance().storeObject(instanceName, object); */ Object() : anonymous_(false), permanent_(false) {}; --- 69,73 ---- /*! Construct an Object. To store the resulting Object in the ObjectHandler, call ! ObjectHandler::instance().storeObject(objectID, object); */ Object() : anonymous_(false), permanent_(false) {}; Index: utilities.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** utilities.hpp 12 Jul 2006 14:02:23 -0000 1.9 --- utilities.hpp 17 Jul 2006 10:11:39 -0000 1.10 *************** *** 73,77 **** if no object is found with given instance name. */ ! void logObject(const std::string &instanceName); //! Write all Objects to log file. --- 73,77 ---- if no object is found with given instance name. */ ! void logObject(const std::string &objectID); //! Write all Objects to log file. Index: objecthandler.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/objecthandler.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** objecthandler.hpp 19 Jun 2006 11:02:38 -0000 1.8 --- objecthandler.hpp 17 Jul 2006 10:11:39 -0000 1.9 *************** *** 47,51 **** /*! Any existing Object with that instance name is deleted. */ ! virtual std::string storeObject(std::string instanceName, const boost::shared_ptr < Object > &object); --- 47,51 ---- /*! Any existing Object with that instance name is deleted. */ ! virtual std::string storeObject(std::string objectID, const boost::shared_ptr < Object > &object); *************** *** 53,57 **** /*! Throws exception if no Object exists with that instance name. */ ! virtual boost::shared_ptr<Object> retrieveObjectImpl(const std::string &instanceName) const; template < typename T > --- 53,57 ---- /*! Throws exception if no Object exists with that instance name. */ ! virtual boost::shared_ptr<Object> retrieveObjectImpl(const std::string &objectID) const; template < typename T > *************** *** 76,80 **** /*! Does nothing if no Object exists with that instance name. */ ! virtual void deleteObject(const std::string &instanceName); //! Delete all Objects in repository. --- 76,80 ---- /*! Does nothing if no Object exists with that instance name. */ ! virtual void deleteObject(const std::string &objectID); //! Delete all Objects in repository. *************** *** 98,102 **** /*! Returns empty list if repository is empty. */ ! virtual const std::vector < std::string > listInstanceNames( const std::string regex = ""); --- 98,102 ---- /*! Returns empty list if repository is empty. */ ! virtual const std::vector < std::string > listObjectIDs( const std::string regex = ""); *************** *** 110,114 **** protected: static ObjectHandler *instance_; ! void checkName(const std::string &instanceName); std::string lastErrorMessage_; }; --- 110,114 ---- protected: static ObjectHandler *instance_; ! void checkName(const std::string &objectID); std::string lastErrorMessage_; }; Index: objecthandler.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/objecthandler.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** objecthandler.cpp 18 Jun 2006 13:41:51 -0000 1.2 --- objecthandler.cpp 17 Jul 2006 10:11:39 -0000 1.3 *************** *** 51,66 **** } ! std::string ObjectHandler::storeObject(std::string instanceName, const boost::shared_ptr<Object> &object) { ! repository_[instanceName] = object; ! return instanceName; } ! boost::shared_ptr<Object> ObjectHandler::retrieveObjectImpl(const std::string &instanceName) const { ! std::map<std::string, boost::shared_ptr<Object> >::const_iterator result = repository_.find(instanceName); if (result == repository_.end()) { std::ostringstream msg; msg << "ObjectHandler error: attempt to retrieve object " ! << "with unknown instance name '" << instanceName << "'"; throw Exception(msg.str()); } else --- 51,66 ---- } ! std::string ObjectHandler::storeObject(std::string objectID, const boost::shared_ptr<Object> &object) { ! repository_[objectID] = object; ! return objectID; } ! boost::shared_ptr<Object> ObjectHandler::retrieveObjectImpl(const std::string &objectID) const { ! std::map<std::string, boost::shared_ptr<Object> >::const_iterator result = repository_.find(objectID); if (result == repository_.end()) { std::ostringstream msg; msg << "ObjectHandler error: attempt to retrieve object " ! << "with unknown instance name '" << objectID << "'"; throw Exception(msg.str()); } else *************** *** 68,73 **** } ! void ObjectHandler::deleteObject(const std::string &instanceName) { ! repository_.erase(instanceName); } --- 68,73 ---- } ! void ObjectHandler::deleteObject(const std::string &objectID) { ! repository_.erase(objectID); } *************** *** 95,99 **** i!=repository_.end(); i++) { boost::shared_ptr<Object> object = i->second; ! out << "Object with instanceName = " << i->first << ":" << std::endl << *object.get(); } } --- 95,99 ---- i!=repository_.end(); i++) { boost::shared_ptr<Object> object = i->second; ! out << "Object with ID = " << i->first << ":" << std::endl << *object.get(); } } *************** *** 103,129 **** } ! const std::vector < std::string > ObjectHandler::listInstanceNames(const std::string regex) { ! std::vector < std::string > instanceNames; if (regex.empty()) { for (std::map<std::string, boost::shared_ptr<Object> >::const_iterator i=repository_.begin(); i!=repository_.end(); i++) ! instanceNames.push_back(i->first); } else { boost::regex r(regex); for (std::map<std::string, boost::shared_ptr<Object> >::const_iterator i=repository_.begin(); i!=repository_.end(); i++) { ! std::string instanceName = i->first; ! if (regex_match(instanceName, r)) instanceNames.push_back(instanceName); } } ! std::sort(instanceNames.begin(), instanceNames.end()); ! return instanceNames; } ! void ObjectHandler::checkName(const std::string &instanceName) { std::map<std::string, boost::shared_ptr<Object> >::const_iterator result = ! repository_.find(instanceName); if (result != repository_.end()) { std::ostringstream msg; msg << "ObjectHandler error: cannot create object " ! "with instance name '" << instanceName << "' because an object with that name already exists"; throw Exception(msg.str()); --- 103,129 ---- } ! const std::vector < std::string > ObjectHandler::listObjectIDs(const std::string regex) { ! std::vector < std::string > objectIDs; if (regex.empty()) { for (std::map<std::string, boost::shared_ptr<Object> >::const_iterator i=repository_.begin(); i!=repository_.end(); i++) ! objectIDs.push_back(i->first); } else { boost::regex r(regex); for (std::map<std::string, boost::shared_ptr<Object> >::const_iterator i=repository_.begin(); i!=repository_.end(); i++) { ! std::string objectID = i->first; ! if (regex_match(objectID, r)) objectIDs.push_back(objectID); } } ! std::sort(objectIDs.begin(), objectIDs.end()); ! return objectIDs; } ! void ObjectHandler::checkName(const std::string &objectID) { std::map<std::string, boost::shared_ptr<Object> >::const_iterator result = ! repository_.find(objectID); if (result != repository_.end()) { std::ostringstream msg; msg << "ObjectHandler error: cannot create object " ! "with instance name '" << objectID << "' because an object with that name already exists"; throw Exception(msg.str()); |
From: Ferdinando A. <na...@us...> - 2006-07-17 10:11:44
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/metadata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29706/gensrc/metadata Modified Files: functions.xml Log Message: InstanceName replaced with ObjectID Index: functions.xml =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/metadata/functions.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** functions.xml 11 Jul 2006 13:30:40 -0000 1.11 --- functions.xml 17 Jul 2006 10:11:39 -0000 1.12 *************** *** 16,20 **** <type>string</type> <tensorRank>scalar</tensorRank> - <description>ObjectHandler version number</description> </ReturnValue> </Procedure> --- 16,19 ---- *************** *** 30,41 **** <type>long</type> <tensorRank>scalar</tensorRank> - <description>object count</description> </ReturnValue> </Procedure> ! <Procedure name='ohListInstanceNames'> ! <description>list instance names of objects in repository</description> <!--platforms>CGO</platforms--> ! <alias>ObjHandler::ObjectHandlerXL::instance().listInstanceNames</alias> <ParameterList> <Parameters> --- 29,39 ---- <type>long</type> <tensorRank>scalar</tensorRank> </ReturnValue> </Procedure> ! <Procedure name='ohListObjectIDs'> ! <description>list the IDs of objects in repository matching regex</description> <!--platforms>CGO</platforms--> ! <alias>ObjHandler::ObjectHandlerXL::instance().listObjectIDs</alias> <ParameterList> <Parameters> *************** *** 50,54 **** <type>string</type> <tensorRank>vector</tensorRank> - <description>list of instance names matching regex</description> </ReturnValue> </Procedure> --- 48,51 ---- *************** *** 64,72 **** <type>string</type> <tensorRank>vector</tensorRank> - <description>list of property names for queried object</description> </ReturnValue> </Member> ! <Member name='ohPropertyValue' objectClass='Object'> <description>retrieve the value of a named property</description> <!--platforms>CGO</platforms--> --- 61,68 ---- <type>string</type> <tensorRank>vector</tensorRank> </ReturnValue> </Member> ! <Member name='ohPropertyValue' objectClass='Object' dependencyTrigger='true'> <description>retrieve the value of a named property</description> <!--platforms>CGO</platforms--> *************** *** 79,87 **** <description>name of property</description> </Parameter> - <Parameter name='trigger' ignore='true'> - <type>any</type> - <tensorRank>scalar</tensorRank> - <description>dependency tracking trigger</description> - </Parameter> </Parameters> </ParameterList> --- 75,78 ---- *************** *** 89,93 **** <type>any</type> <tensorRank>scalar</tensorRank> - <description>value of named field</description> </ReturnValue> </Member> --- 80,83 ---- *************** *** 99,106 **** <ParameterList> <Parameters> ! <Parameter name='instanceName'> <type>string</type> <tensorRank>scalar</tensorRank> ! <description>instance name of object to be deleted</description> </Parameter> </Parameters> --- 89,96 ---- <ParameterList> <Parameters> ! <Parameter name='ObjectID'> <type>string</type> <tensorRank>scalar</tensorRank> ! <description>ID of object to be deleted</description> </Parameter> </Parameters> *************** *** 109,113 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> --- 99,102 ---- *************** *** 129,138 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> <Procedure name='ohDependsOn'> ! <description>force a dependency between two functions</description> <!--platforms>D</platforms--> <alias>ObjHandler::dependsOn</alias> --- 118,126 ---- <type>void</type> <tensorRank>scalar</tensorRank> </ReturnValue> </Procedure> <Procedure name='ohDependsOn'> ! <description>forces a dependency between two functions and returns the update counter</description> <!--platforms>D</platforms--> <alias>ObjHandler::dependsOn</alias> *************** *** 194,198 **** <type>long</type> <tensorRank>scalar</tensorRank> - <description>update count</description> </ReturnValue> </Procedure> --- 182,185 ---- *************** *** 219,223 **** <type>string</type> <tensorRank>scalar</tensorRank> - <description>name of logfile</description> </ReturnValue> </Procedure> --- 206,209 ---- *************** *** 274,281 **** <ParameterList> <Parameters> ! <Parameter name='instanceName'> <type>string</type> <tensorRank>scalar</tensorRank> ! <description>instance name of object to be logged</description> </Parameter> </Parameters> --- 260,267 ---- <ParameterList> <Parameters> ! <Parameter name='objectID'> <type>string</type> <tensorRank>scalar</tensorRank> ! <description>ID of object to be logged</description> </Parameter> </Parameters> *************** *** 284,288 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> --- 270,273 ---- *************** *** 298,302 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> --- 283,286 ---- *************** *** 323,327 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure--> --- 307,310 ---- *************** *** 336,340 **** <type>bool</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> --- 319,322 ---- *************** *** 355,359 **** <type>bool</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure--> --- 337,340 ---- *************** *** 375,384 **** <type>void</type> <tensorRank>scalar</tensorRank> - <description>success/failure</description> </ReturnValue> </Procedure> <Procedure name='ohLastErrorMessage'> ! <description>return last logged message</description> <alias>ObjHandler::ObjectHandler::instance().lastErrorMessage</alias> <ParameterList> --- 356,364 ---- <type>void</type> <tensorRank>scalar</tensorRank> </ReturnValue> </Procedure> <Procedure name='ohLastErrorMessage'> ! <description>return last error message</description> <alias>ObjHandler::ObjectHandler::instance().lastErrorMessage</alias> <ParameterList> *************** *** 388,392 **** <type>string</type> <tensorRank>scalar</tensorRank> - <description>last logged message</description> </ReturnValue> </Procedure> --- 368,371 ---- *************** *** 407,411 **** <type>any</type> <tensorRank>matrix</tensorRank> - <description>input range with error values removed from bottom/right cells</description> </ReturnValue> </Procedure--> --- 386,389 ---- *************** *** 431,435 **** <type>double</type> <tensorRank>scalar</tensorRank> - <description>requested text field converted to double</description> </ReturnValue> </Procedure--> --- 409,412 ---- *************** *** 437,439 **** </Functions> </Category> - --- 414,415 ---- |
From: Eric E. <eri...@us...> - 2006-07-16 18:12:42
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17819/ohxl Modified Files: callingrange.cpp functioncall.cpp objecthandlerxl.cpp objecthandlerxl.hpp Log Message: add support for member functions returning newly instantiated QuantLibAddin objects Index: objecthandlerxl.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** objecthandlerxl.cpp 28 Jun 2006 14:28:32 -0000 1.9 --- objecthandlerxl.cpp 16 Jul 2006 17:11:19 -0000 1.10 *************** *** 98,103 **** } ! void ObjectHandlerXL::resetCaller() { boost::shared_ptr<CallingRange> callingRange = getCallingRange(); if (callingRange) callingRange->update(); --- 98,107 ---- } ! void ObjectHandlerXL::resetCaller(bool createIfNone) { boost::shared_ptr<CallingRange> callingRange = getCallingRange(); + if (!callingRange) { + callingRange = boost::shared_ptr<CallingRange>(new CallingRange); + callingRanges_[callingRange->getKey()] = callingRange; + } if (callingRange) callingRange->update(); *************** *** 107,117 **** std::string instanceName, const boost::shared_ptr<Object> &object) { ! boost::shared_ptr<CallingRange> callingRange = getCallingRange(); ! ! if (!callingRange) { ! callingRange = boost::shared_ptr<CallingRange>(new CallingRange); ! callingRanges_[callingRange->getKey()] = callingRange; ! } ! callingRange->update(); if (instanceName.empty()) { --- 111,115 ---- std::string instanceName, const boost::shared_ptr<Object> &object) { ! resetCaller(true); if (instanceName.empty()) { *************** *** 120,123 **** --- 118,122 ---- } + boost::shared_ptr<CallingRange> callingRange = getCallingRange(); callingRange->deleteObject(instanceName, object); checkName(instanceName); Index: objecthandlerxl.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/objecthandlerxl.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** objecthandlerxl.hpp 28 Jun 2006 14:28:32 -0000 1.9 --- objecthandlerxl.hpp 16 Jul 2006 17:11:19 -0000 1.10 *************** *** 65,69 **** which set the caller's status to "busy". */ ! virtual void resetCaller(); virtual void dump(std::ostream&); --- 65,69 ---- which set the caller's status to "busy". */ ! virtual void resetCaller(bool createIfNone = false); virtual void dump(std::ostream&); Index: callingrange.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/callingrange.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** callingrange.cpp 18 Jun 2006 13:41:51 -0000 1.5 --- callingrange.cpp 16 Jul 2006 17:11:18 -0000 1.6 *************** *** 185,189 **** support for nested formulas e.g. "=qlFunc1(qlFunc2(), SUM(), qlFunc3(), xxx)" implement the following algorithm: ! - on first call to this formula - mark calling range as "busy" - clear() - intermediate calls - take no action - final call - mark calling range as "not busy" --- 185,189 ---- support for nested formulas e.g. "=qlFunc1(qlFunc2(), SUM(), qlFunc3(), xxx)" implement the following algorithm: ! - on first call to this formula - mark calling range as "busy" - clearNonPermanent() - intermediate calls - take no action - final call - mark calling range as "not busy" Index: functioncall.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/functioncall.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functioncall.cpp 14 Jun 2006 15:25:57 -0000 1.7 --- functioncall.cpp 16 Jul 2006 17:11:19 -0000 1.8 *************** *** 71,90 **** // addins call this function from within their catch() // so this function must not throw ! try { ! if (address_.empty()) { ! XLOPER xAddress; ! try { ! Excel(xlfGetCell, &xAddress, 2, TempNum(1), getCallerReference()); ! operToScalar(address_, xAddress); ! Excel(xlFree, 0, 1, &xAddress); ! } catch (const std::exception &e) { Excel(xlFree, 0, 1, &xAddress); ! std::ostringstream err; ! err << "FunctionCall::getAddressString(): " << e.what(); ! throw Exception(err.str()); ! } } - } catch (...) { - address_ = "caller address unknown"; } return address_; --- 71,86 ---- // addins call this function from within their catch() // so this function must not throw ! if (address_.empty()) { ! XLOPER xAddress; ! xAddress.xltype = 0; ! try { ! Excel(xlfGetCell, &xAddress, 2, TempNum(1), getCallerReference()); ! operToScalar(address_, xAddress); ! Excel(xlFree, 0, 1, &xAddress); ! } catch (...) { ! if (xAddress.xltype) Excel(xlFree, 0, 1, &xAddress); ! address_ = "caller address unknown"; } } return address_; |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:37
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/ohxl/ohxll Removed Files: ohxll.dsp Log Message: discontinue support for VC6 --- ohxll.dsp DELETED --- |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:37
|
Update of /cvsroot/objecthandler/ObjectHandler/xlsdk In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/xlsdk Modified Files: auto_link.hpp Log Message: discontinue support for VC6 Index: auto_link.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/xlsdk/auto_link.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auto_link.hpp 25 May 2006 17:01:57 -0000 1.1 --- auto_link.hpp 16 Jul 2006 10:17:34 -0000 1.2 *************** *** 21,28 **** // select toolset: ! #if (_MSC_VER < 1200) # error "unsupported Microsoft compiler" - #elif (_MSC_VER == 1200) - # define XLSDK_LIB_TOOLSET "vc6" #elif (_MSC_VER == 1300) # define XLSDK_LIB_TOOLSET "vc7" --- 21,26 ---- // select toolset: ! #if (_MSC_VER < 1300) # error "unsupported Microsoft compiler" #elif (_MSC_VER == 1300) # define XLSDK_LIB_TOOLSET "vc7" |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:37
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/xl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/Examples/xl Removed Files: ExampleXllDynamic1.dsp ExampleXllDynamic2.dsp ExampleXllStatic.dsp Log Message: discontinue support for VC6 --- ExampleXllDynamic1.dsp DELETED --- --- ExampleXllDynamic2.dsp DELETED --- --- ExampleXllStatic.dsp DELETED --- |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:37
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl/ohxllib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/ohxl/ohxllib Removed Files: ohxllib.dsp Log Message: discontinue support for VC6 --- ohxllib.dsp DELETED --- |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:36
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/oh Modified Files: auto_link.hpp singleton.hpp Log Message: discontinue support for VC6 Index: singleton.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/singleton.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** singleton.hpp 19 May 2006 15:12:41 -0000 1.1 --- singleton.hpp 16 Jul 2006 10:17:34 -0000 1.2 *************** *** 61,67 **** void initialize() {} private: - #ifdef OBJHANDLER_PATCH_MSVC6 - static boost::shared_ptr<T> instance_; - #endif Singleton(const Singleton&) {} void operator=(const Singleton&) {} --- 61,64 ---- *************** *** 70,83 **** // template definitions - #ifdef OBJHANDLER_PATCH_MSVC6 - template <class T> - boost::shared_ptr<T> Singleton<T>::instance_; - #endif - template <class T> T& Singleton<T>::instance() { - #ifndef OBJHANDLER_PATCH_MSVC6 static boost::shared_ptr<T> instance_; - #endif if (!instance_) { instance_ = boost::shared_ptr<T>(new T); --- 67,73 ---- Index: auto_link.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/auto_link.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auto_link.hpp 25 May 2006 17:01:57 -0000 1.1 --- auto_link.hpp 16 Jul 2006 10:17:34 -0000 1.2 *************** *** 21,28 **** // select toolset: ! #if (_MSC_VER < 1200) # error "unsupported Microsoft compiler" - #elif (_MSC_VER == 1200) - # define OBJHANDLER_LIB_TOOLSET "vc6" #elif (_MSC_VER == 1300) # define OBJHANDLER_LIB_TOOLSET "vc7" --- 21,26 ---- // select toolset: ! #if (_MSC_VER < 1300) # error "unsupported Microsoft compiler" #elif (_MSC_VER == 1300) # define OBJHANDLER_LIB_TOOLSET "vc7" |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:36
|
Update of /cvsroot/objecthandler/ObjectHandler/Examples/C++ In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746/Examples/C++ Removed Files: ExampleCpp.dsp Log Message: discontinue support for VC6 --- ExampleCpp.dsp DELETED --- |
From: Eric E. <eri...@us...> - 2006-07-16 10:17:36
|
Update of /cvsroot/objecthandler/ObjectHandler In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26746 Removed Files: ObjectHandler.dsw ohlib.dsp Log Message: discontinue support for VC6 --- ohlib.dsp DELETED --- --- ObjectHandler.dsw DELETED --- |
From: Eric E. <eri...@us...> - 2006-07-14 08:16:53
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30227/oh Modified Files: object.hpp Log Message: support retrieval of direct reference to underlying object Index: object.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/object.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** object.hpp 18 Jun 2006 13:41:51 -0000 1.9 --- object.hpp 14 Jul 2006 08:16:51 -0000 1.10 *************** *** 51,54 **** --- 51,59 ---- } + // get a direct reference to the underlying object wrapped by the ObjHandler::Object + #define OH_GET_UNDERLYING( NAME, ID, OBJECT_CLASS, LIBRARY_CLASS ) \ + OH_GET_REFERENCE(NAME ## temp, ID, OBJECT_CLASS, LIBRARY_CLASS ) \ + const LIBRARY_CLASS &NAME = *(NAME ## temp.get()); + namespace ObjHandler { //! Interface for Objects to be stored in the ObjectHandler. |
From: Eric E. <eri...@us...> - 2006-07-14 07:25:28
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10028/ohxl Modified Files: conversions.cpp Log Message: fix memory leak Index: conversions.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** conversions.cpp 13 Jul 2006 14:39:32 -0000 1.8 --- conversions.cpp 14 Jul 2006 07:25:26 -0000 1.9 *************** *** 24,31 **** namespace ObjHandler { ! void validateMulti(const OPER *xMulti) { for (int i=0; i<xMulti->val.array.rows * xMulti->val.array.columns; i++) if (xMulti->val.array.lparray[i].xltype == xltypeErr) ! throw Exception("trigger parameter has error value"); } --- 24,32 ---- namespace ObjHandler { ! bool validateMulti(const OPER *xMulti) { for (int i=0; i<xMulti->val.array.rows * xMulti->val.array.columns; i++) if (xMulti->val.array.lparray[i].xltype == xltypeErr) ! return false; ! return true; } *************** *** 34,42 **** throw Exception("trigger parameter has error value"); } else if (xTrigger->xltype == xltypeMulti) { ! validateMulti(xTrigger); } else if (xTrigger->xltype == xltypeRef || xTrigger->xltype == xltypeSRef) { XLOPER xMulti; Excel(xlCoerce, &xMulti, 1, xTrigger, TempInt(xltypeMulti)); ! validateMulti(&xMulti); } } --- 35,47 ---- throw Exception("trigger parameter has error value"); } else if (xTrigger->xltype == xltypeMulti) { ! if (!validateMulti(xTrigger)) ! throw Exception("trigger parameter has error value"); } else if (xTrigger->xltype == xltypeRef || xTrigger->xltype == xltypeSRef) { XLOPER xMulti; Excel(xlCoerce, &xMulti, 1, xTrigger, TempInt(xltypeMulti)); ! bool isValid = validateMulti(&xMulti); ! Excel(xlFree, 0, 1, &xMulti); ! if (!isValid) ! throw Exception("trigger parameter has error value"); } } |
From: Eric E. <eri...@us...> - 2006-07-13 14:39:35
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5009/ohxl Modified Files: conversions.cpp Log Message: fug bix Index: conversions.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** conversions.cpp 13 Jul 2006 10:35:39 -0000 1.7 --- conversions.cpp 13 Jul 2006 14:39:32 -0000 1.8 *************** *** 37,41 **** } else if (xTrigger->xltype == xltypeRef || xTrigger->xltype == xltypeSRef) { XLOPER xMulti; ! Excel(xlCoerce, &xMulti, 1, &xTemp, TempInt(xltypeMulti)); validateMulti(&xMulti); } --- 37,41 ---- } else if (xTrigger->xltype == xltypeRef || xTrigger->xltype == xltypeSRef) { XLOPER xMulti; ! Excel(xlCoerce, &xMulti, 1, xTrigger, TempInt(xltypeMulti)); validateMulti(&xMulti); } |
From: Eric E. <eri...@us...> - 2006-07-13 10:35:44
|
Update of /cvsroot/objecthandler/ObjectHandler/ohxl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2862/ohxl Modified Files: conversions.cpp conversions.hpp Log Message: make Excel function fail if trigger parameter is #NA/#VALUE/#ERR Index: conversions.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** conversions.cpp 20 Jun 2006 18:26:41 -0000 1.6 --- conversions.cpp 13 Jul 2006 10:35:39 -0000 1.7 *************** *** 24,27 **** --- 24,45 ---- namespace ObjHandler { + void validateMulti(const OPER *xMulti) { + for (int i=0; i<xMulti->val.array.rows * xMulti->val.array.columns; i++) + if (xMulti->val.array.lparray[i].xltype == xltypeErr) + throw Exception("trigger parameter has error value"); + } + + DLL_API void validateTrigger(const OPER *xTrigger) { + if (xTrigger->xltype == xltypeErr) { + throw Exception("trigger parameter has error value"); + } else if (xTrigger->xltype == xltypeMulti) { + validateMulti(xTrigger); + } else if (xTrigger->xltype == xltypeRef || xTrigger->xltype == xltypeSRef) { + XLOPER xMulti; + Excel(xlCoerce, &xMulti, 1, &xTemp, TempInt(xltypeMulti)); + validateMulti(&xMulti); + } + } + DLL_API void stringToChar(char *c, const std::string &value) { int len = __min(XL_MAX_STR_LEN, value.length()); Index: conversions.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/ohxl/conversions.hpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** conversions.hpp 14 Jun 2006 13:15:25 -0000 1.9 --- conversions.hpp 13 Jul 2006 10:35:39 -0000 1.10 *************** *** 28,31 **** --- 28,32 ---- namespace ObjHandler { + DLL_API void validateTrigger(const OPER *xTrigger); DLL_API void stringToChar(char *c, const std::string &s); void operToOper(OPER *xTarget, const OPER *xSource); |
From: Eric E. <eri...@us...> - 2006-07-12 14:02:30
|
Update of /cvsroot/objecthandler/ObjectHandler/oh In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18949/oh Modified Files: utilities.cpp utilities.hpp Log Message: allow user to specify delimiter for ohParseField() Index: utilities.cpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** utilities.cpp 3 Jul 2006 08:19:26 -0000 1.11 --- utilities.cpp 12 Jul 2006 14:02:23 -0000 1.12 *************** *** 85,94 **** std::vector<std::string> split( const std::string &line, ! unsigned int maxRequired) { std::vector<std::string> ret; std::string::const_iterator start = line.begin(); std::string::const_iterator end = line.end(); boost::match_results<std::string::const_iterator> m; ! static const boost::regex r("[^[:space:]]+"); while (maxRequired-- && boost::regex_search(start, end, m, r)) { ret.push_back(std::string(m[0].first, m[0].second)); --- 85,95 ---- std::vector<std::string> split( const std::string &line, ! unsigned int maxRequired, ! const std::string &delim) { std::vector<std::string> ret; std::string::const_iterator start = line.begin(); std::string::const_iterator end = line.end(); boost::match_results<std::string::const_iterator> m; ! boost::regex r("[^" + delim + "]+"); while (maxRequired-- && boost::regex_search(start, end, m, r)) { ret.push_back(std::string(m[0].first, m[0].second)); Index: utilities.hpp =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** utilities.hpp 3 Jul 2006 08:19:26 -0000 1.8 --- utilities.hpp 12 Jul 2006 14:02:23 -0000 1.9 *************** *** 84,88 **** std::vector<std::string> split( const std::string &line, ! unsigned int maxRequired); std::string uppercase(const std::string& s); --- 84,89 ---- std::vector<std::string> split( const std::string &line, ! unsigned int maxRequired, ! const std::string &delim); std::string uppercase(const std::string& s); |
From: Eric E. <eri...@us...> - 2006-07-12 14:02:27
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/stubs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18949/gensrc/stubs Modified Files: stub.excel.includes stub.excel.register stub.excel.unregister Log Message: allow user to specify delimiter for ohParseField() Index: stub.excel.register =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/stubs/stub.excel.register,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stub.excel.register 3 Jul 2006 08:19:26 -0000 1.4 --- stub.excel.register 12 Jul 2006 14:02:22 -0000 1.5 *************** *** 17,25 **** TempStrNoSize("\x1D""range of cells to be packed ")); // description of parameter 1 ! Excel(xlfRegister, 0, 13, &xDll, TempStrNoSize("\x0C""ohParseField"), // function code name ! TempStrNoSize("\x05""RCNC#"), // parameter codes TempStrNoSize("\x0C""ohParseField"), // function display name ! TempStrNoSize("\x0F""line,index,type"), // comma-delimited list of parameter names TempStrNoSize("\x01""1"), // function type (1 = worksheet function) TempStrNoSize("\x0D""ObjectHandler"), // function category --- 17,25 ---- 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 *************** *** 29,33 **** TempStrNoSize("\x11""text to be parsed"), // description of parameter 1 TempStrNoSize("\x20""index (1-based) of desired field"), // description of parameter 2 ! TempStrNoSize("\x23""required datatype (string/number) ")); // description of parameter 3 } --- 29,34 ---- 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 } Index: stub.excel.unregister =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/stubs/stub.excel.unregister,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stub.excel.unregister 3 Jul 2006 08:19:26 -0000 1.4 --- stub.excel.unregister 12 Jul 2006 14:02:22 -0000 1.5 *************** *** 26,34 **** Excel4(xlfUnregister, 0, 1, &xlRegID); ! Excel(xlfRegister, 0, 13, &xDll, TempStrNoSize("\x0C""ohParseField"), // function code name ! TempStrNoSize("\x05""RCNC#"), // parameter codes TempStrNoSize("\x0C""ohParseField"), // function display name ! TempStrNoSize("\x0F""line,index,type"), // comma-delimited list of parameter names TempStrNoSize("\x01""0"), // function type (0 = hidden function) TempStrNoSize("\x0D""ObjectHandler"), // function category --- 26,34 ---- 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 *************** *** 38,42 **** TempStrNoSize("\x11""text to be parsed"), // description of parameter 1 TempStrNoSize("\x20""index (1-based) of desired field"), // description of parameter 2 ! TempStrNoSize("\x23""required datatype (string/number) ")); // description of parameter 3 Excel4(xlfRegisterId, &xlRegID, 2, &xDll, --- 38,43 ---- 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, Index: stub.excel.includes =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/stubs/stub.excel.includes,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** stub.excel.includes 3 Jul 2006 08:19:26 -0000 1.4 --- stub.excel.includes 12 Jul 2006 14:02:22 -0000 1.5 *************** *** 107,111 **** char *line, long *index, ! char *type) { boost::shared_ptr < ObjHandler::FunctionCall > functionCall; try { --- 107,112 ---- char *line, long *index, ! char *type, ! OPER *delim) { boost::shared_ptr < ObjHandler::FunctionCall > functionCall; try { *************** *** 121,124 **** --- 122,128 ---- // invoke the utility function + std::string delimStr; + ObjHandler::operToScalar(delimStr, *delim, "[:space:]"); + if (*index<1) { std::stringstream msg; *************** *** 128,132 **** } unsigned int i = static_cast<unsigned int>(*index); ! std::vector<std::string> fields = ObjHandler::split(line, i); if (i>fields.size()) { std::stringstream msg; --- 132,138 ---- } 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; |
From: Eric E. <eri...@us...> - 2006-07-11 13:30:43
|
Update of /cvsroot/objecthandler/ObjectHandler/gensrc/metadata In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13781/gensrc/metadata Modified Files: functions.xml Log Message: categorize functions in the Excel Function Wizard Index: functions.xml =================================================================== RCS file: /cvsroot/objecthandler/ObjectHandler/gensrc/metadata/functions.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** functions.xml 3 Jul 2006 08:19:25 -0000 1.10 --- functions.xml 11 Jul 2006 13:30:40 -0000 1.11 *************** *** 2,5 **** --- 2,6 ---- <description>ObjectHandler functions</description> <displayName>ObjectHandler</displayName> + <xlFunctionWizardCategory>ObjectHandler</xlFunctionWizardCategory> <Functions> *************** *** 9,13 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::version</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters/> --- 10,13 ---- *************** *** 24,28 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::ObjectHandlerXL::instance().objectCount</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters/> --- 24,27 ---- *************** *** 39,43 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::ObjectHandlerXL::instance().listInstanceNames</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 38,41 ---- *************** *** 60,64 **** <!--platforms>CGO</platforms--> <libraryFunction>propertyNames</libraryFunction> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters/> --- 58,61 ---- *************** *** 75,79 **** <!--platforms>CGO</platforms--> <libraryFunction>propertyValue</libraryFunction> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 72,75 ---- *************** *** 101,105 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::ObjectHandlerXL::instance().deleteObject</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 97,100 ---- *************** *** 122,126 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::ObjectHandlerXL::instance().deleteAllObjects</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 117,120 ---- *************** *** 142,146 **** <description>force a dependency between two functions</description> <!--platforms>D</platforms--> - <functionCategory>ObjectHandler</functionCategory> <alias>ObjHandler::dependsOn</alias> <ParameterList> --- 136,139 ---- *************** *** 209,213 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::setLogFile</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 202,205 ---- *************** *** 235,239 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::setLogLevel</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 227,230 ---- *************** *** 256,260 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::logMessage</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 247,250 ---- *************** *** 282,286 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::logObject</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 272,275 ---- *************** *** 303,307 **** <!--platforms>CGO</platforms--> <alias>ObjHandler::logAllObjects</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters/> --- 292,295 ---- *************** *** 318,322 **** <platforms>CG</platforms> <alias>ObjHandler::setConsole</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 306,309 ---- *************** *** 375,379 **** <description>delete orphaned objects from repository</description> <!--platforms>D</platforms--> - <functionCategory>ObjectHandler</functionCategory> <alias>ObjHandler::ObjectHandlerXL::instance().collectGarbage</alias> <ParameterList> --- 362,365 ---- *************** *** 396,400 **** <description>return last logged message</description> <alias>ObjHandler::ObjectHandler::instance().lastErrorMessage</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters/> --- 382,385 ---- *************** *** 410,414 **** <description>trim error values from bottom/right of matrix/vector</description> <alias>ObjHandler::ObjectHandlerXL::instance().packMatrix</alias> - <functionCategory>ObjectHandler</functionCategory> <ParameterList> <Parameters> --- 395,398 ---- *************** *** 429,433 **** <!--Procedure name='ohParseField'> <description>Extract the ith number from a whitespace-delimited list of fields</description> - <functionCategory>ObjectHandler</functionCategory> <alias>ObjHandler::parseField</alias> <ParameterList> --- 413,416 ---- |