Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


- - - - -

asEP_ALLOW_IMPLICIT_HANDLE_TYPES


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Jason Goepel   Members   -  Reputation: 443

Like
0Likes
Like

Posted 08 November 2013 - 01:43 PM

I know this option is experimental, but does it work at all?  I'm trying to register a class with "@Name" and this option true, but it fails with asINVALID_NAME.  token = ttHandle

 

as_scriptengine.cpp(1687)

// Make sure the name is not a reserved keyword
size_t tokenLen;
int token = tok.GetToken(name, typeName.GetLength(), &tokenLen);
if( token != ttIdentifier || typeName.GetLength() != tokenLen )
	return ConfigError(asINVALID_NAME, "RegisterObjectType", name, 0);

asEP_ALLOW_IMPLICIT_HANDLE_TYPES

This option is experimental. By turning it on script classes can be declared to always be treated as handles by declaring the class with @ before the name of the class. When this is done all variables of that type will be handles, and the assignment operator will always perform a handle assignment.



Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3451

Like
0Likes
Like

Posted 08 November 2013 - 03:32 PM

It is so experimental and poorly documented that not even I know exactly how it works. I had to take a peek at code to remember what it does. :)

 

This engine property currently only affects script classes. You cannot register application types to use the implicit handle feature.

 

To declare a script class to use implicit handle you write the script like this:

 

class@ MyClass {}

 

Once the class is declared to use implicit handles, all variables and parameters declared of that type will be implicitly declared as handles, and the assignment operator will be implicitly treated as a handle assignment instead of an value assignment.


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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS