Advertisement

Overloaded functions

Started by October 01, 2005 10:28 AM
1 comment, last by DaesDemon 19 years, 2 months ago
Hello friends, Just a little declaration Question: I am pretty sure i have seen the answer somewhere but can find it back. I have a class with an overloaded method: removeCamera(string) removeCamera(camera*) How can i register one of this method with ASMETHOD:
Quote: Engine->RegisterObjectMethod("SceneManager","void removeCamera(const string ∈ name)",asMETHOD(SceneManager,removeCamera),asCALL_THISCALL);
obviously don't compile as compiler don't know which function i want to target.
Use the asMETHODPR() macro, that takes the parameter list and return type as well.

Example:

Engine->RegisterObjectMethod("SceneManager","void removeCamera(const string ∈ name)",asMETHODPR(SceneManager,removeCamera,(camera*),void),asCALL_THISCALL);

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement
Thanks you ;)

This topic is closed to new replies.

Advertisement