Jump to content
Sign in to follow this  
bogQ

ObjCreateInterface with double funcs in cpp

Recommended Posts

bogQ

dumb question but if i remamber correctly in cpp you can use identical func names with different parameters, and according to their parametar usage different func with identical name is called.

how is that reflected to ObjCreateInterface when you try to call some other func with identical name but diffrent parametar?

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
ProgAndy

The COM specification does not allow overloaded methods, so you cannot do that.


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
bogQ

As i thought i can't do that, guess i'll be having a blast rearranging it all cos of that :idiot:. Thank you ProgAndy

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
trancexx

In case of interface having more methods of the same name (can happen) then the last one should be called. I see that AutoIt currently calls first, so that part about ObjCreateInterface needs changing. Normally, inheritor have priority over inherited.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
bogQ

your right, calling lastone do have more sense essentialy.

Especially if order is a must, for last (or the rest) needed to work cos of dependance of firstone, and especially if you don't want to (or you can't) change name.

But curently in cpp, creating func with another name and adding the correct call to needed previous func is ok for me. Eather way it will work with no need of aditional changing even if the ObjCreateInterface someday change.

edit: heh, i never considered to see if i can remove (hide) unneeded from reference counter.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
bogQ

i admit i was wrong

creating func with another name and adding the correct call is killing me on larger scale


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
trancexx

What exactly is the problem?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
bogQ

it's my stupidity for creating mess on project.

example, i have had problem with io::path& (and some others), but what ever i tryed i cud not call that func correctly, so i decided to recreated some more funcs like thisone below

virtual ITexture* getTexture1(const char *filename){return getTexture(filename);}

instead of

virtual ITexture* getTexture(const io::path& filename) = 0;

that added more mess on old mess so that now i'm losing my self in all project include files


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
trancexx

But of course you'll do const char*. That goes without even saying.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×