[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Name clash problem with plugins



PureBytes Links

Trading Reference Links

Hi Tomasz,
the problem of having the same function name in two
or more plugin DLLs could be solved maybe by the 
use of  the following concept:

// only after this are the plugin DLL functions known to the script
// (the plugins can already be loaded into memory by AB, but user needs
// to "include" their functionality into his script first)
ovar1 = plugin("plugin1.dll");   // only filename part w/o path
ovar2 = plugin("plugin2.dll");   // only filename part w/o path

// using the plugin functions
ovar1.func1();  // func1() in plugin1.dll
ovar2.func1();  // func1() in plugin2.dll

Such variables are "plugin object variables", internally containing ptrs 
to the functions of the associated plugin. They of course can have any name.
The first appearance decides about their type.

So, by using such a concept duplicate function names would be harmless.
Dunno if this complicates the syntax highlighting feature too much.

Just an idea
UM




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/