Advertisement

About caching required methods in template callback

Started by November 17, 2024 04:51 PM
1 comment, last by WitchLord 3 days, 13 hours ago

If I want to implement a templated container supporting methods like find, can I cache the script function like opEquals within the template callback.

I've checked the source of official script array add-on. Its template callback only contains logic for validating subtype. The logic for caching methods for comparing subtype is done elsewhere.

None

With the current implementation it should be OK to create the cache from within the template callback itself. But the callback is not really meant for that purpose, and I cannot guarantee that it will always continue to be valid with future releases.

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