How can I register operator function of class ?
class A { operator int( ) { // do something ... } }; How to register this in angelscript ? thansk !!!
Documentation
For your particular example you would register it as:
For your particular example you would register it as:
r = engine->RegisterObjectBehaviour("type", asBEHAVE_VALUE_CAST, "int f()", asMETHOD(A, operator int), asCALL_THISCALL); assert( r >= 0 );
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement