🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Null Handle

Started by
0 comments, last by Jason Goepel 10 years, 3 months ago

Is there a good way to allow a value class to accept a null handle as an argument to opAssign? I want to create a value class that behaves mostly like a handle and can also be set to null.

Advertisement

Nevermind. I decided to create a companion, reference class to my value class and accept handles to that class in opAssign.

The problem is I want reference classes to work like Java (handle assignment if there is no value assignment), but that doesn't play nicely with the AngelScript syntax. Instead I'm creating value classes which are essentially handles to my application classes. Value classes don't play nicely with "null", but with the companion, no-count, reference classes I think it will work OK.

This topic is closed to new replies.

Advertisement