[PUSHED] adding calc add-in for option pricing

Stephan Bergmann sbergman at redhat.com
Tue Dec 4 07:15:51 PST 2012


On 12/04/2012 04:01 PM, tino wrote:
>>> Do you mean function names like getOpt_barrier() or input variables as
>>> put_call or both? If it's the function names then would
>>> getOpt_barrier() --> getOptBarrier() be ok?
>>
>> Ah, right, some parameter names are affected, too.  So yes, please
>> replace all identifiers containing underscores with "camel-case"
>> identifiers (where whether the latter are more or less beautiful
>> than the former is an entirely unrelated topic... :)
>
> Just to be clear, are we only talking about XPricingFunctions.idl as
> far as the variable names are concerned? Obviously, for the function
> names I have to change them in a few places but variables is probably
> optional? Would you still recommend to change them everywhere or just
> in the idl file?

Changing the parameter names only in the .idl file, and not also in any 
implementation .hxx/.cxx files, is just fine.  (Though it generally does 
not hurt to use the same names in the implementation as in the .idl 
file, but that's just style.)

> Do I also have to change the function name exported to the cell, e.g.
> OPT_BARRIER()?

No, that is apparently something unrelated to UNO.

>> In general, UNOIDL identifiers for enum, constant group, typedef,
>> struct, exception, interface, service, and singleton names, for
>> struct and exception members, and for polymorphic struct type
>> parameters are camel-case starting with uppercase (and interface
>> names additionally starting with "X"); identifiers for modules, for
>> interface attributes and methods, for service constructors, and for
>> interface method and service constructor parameters are camel-case
>> starting with lowercase; and identifiers for enum and constant group
>> members are all-uppercase with underscores.  (Where the latter is
>> the reason why only identifiers starting with lowercase letters and
>> containing underscores are reserved for UNO.)
>
> Wow this is tough for my brain :) so from what you've seen anything
> else I should change?

No, the above was the only thing that caught my eye.

Stephan


More information about the LibreOffice mailing list