Jump to content
  • Advertisement
Sign in to follow this  
Jason Goepel

Null Handle

This topic is 2040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!