Simply define the constant #COMATE_NOERRORREPORTING = 1 at the top of your source, before including the main COMatePLUS source file. You can now also opt to remove all error reporting from your COMatePLUS application. See the COMateObject class section of this manual for details. Which is, in a sense, the reverse of the COMate_WrapCOMObject() function.Īll of the COMateObject class methods dealing with calling COM methods/properties have also been modified by the addition of an optional parameter in which we can pass a COMatePLUS statement handle etc. In addition, a new method has been added to the COMateObject class : The following functions have been added by COMatePLUS for working with prepared statements (see the relevant sections of this manual for details) : Of course, all existing code will not run any faster only code specifically making use of these prepared statements can benefit from these changes.Ī couple of newly added demo programs written to showcase COMatePLUS' prepared statements show a 10-fold increase in speed on my system, -something which is not to be sniffed at! The important thing is that the original COMateObject class now uses these pre-compiled statements 'behind the scenes' and so all existing COMate based code should run fine with COMatePLUS with no modifications whatsoever. Parameters can be altered between calls very quickly. Parsers in this library have the type Parser s a, where s is the type of the input string, and a is the type of the data which the parser will produce on success.Parser s is a monad. A parser turns a string into a data structure. The result of this compilation is what I have termed a COMatePLUS statement which can be executed at any time and as many times (against different COMate objects if required) as required etc. Here is a basic tutorial introduction to monadic parsing with this package. When the COM method finished its work, the results of all that tokenising and parsing would be discarded, meaning that if the same method/property needed to be called again (perhaps with modified parameters) then the processing of the command string would need to be undertaken again!Ī somewhat wasteful affair don't you think?ĬOMatePLUS takes a different approach, one inspired by SQLite's use of 'prepared statements' etc.īasically, COMatePLUS allows you to pre-compile a command string right down to a level suitable for passing directly to a COM server. and only when this process was complete would it consider executing the COM method etc. These changes were motivated by a desire to allow much faster access to COM methods/properties than was currently available through COMate's existing command processor.ĬOMatePLUS can process 'strings' of 'closely related' method/property calls far far faster than earlier versions of COMate, although you do have to specifically make use of the new facilities in order to take advantage of any possible speed increases etc.Įarlier versions of COMate, when given a command string as part of a method/property call, would first undertake the sometimes lengthy process of tokenising and parsing the command string looking for method calls, parameter types, type modifiers. Retrieve Email and Parse Email in Delphi. COMatePLUS represents quite a jump forward over earlier versions of COMate, both in terms of it's internal workings and the facilities offered to the developer when working with automation servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |