Jump to content

  • Log In with Google      Sign In   
  • Create Account

Wracky

Member Since 03 Jun 2007
Offline Last Active Mar 08 2016 02:55 PM

Posts I've Made

In Topic: Template containers angelscript addon library release!

31 January 2016 - 03:50 PM

Thanks for the response guys!

Andreas: Thanks that looks a lot cleaner too! I'll make sure to tell our script-guys to use that instead ;-)

 

Sami:

That's awesome. We don't use any containers in our interface as of yet. No need for it still, but I can think of some cases where it might come in handy.

Either way, I'll see if I can update to the refactor branch, so we can test it out.

Loving the aatc_config.hpp file ;) 


In Topic: Template containers angelscript addon library release!

31 January 2016 - 07:37 AM

Hi again!

I don't know if this is a question regarding Angelscript or AATC,

But there seems to be a minor error in how some AATC syntax is being parsed.

(Or maybe I'm missing something ;))

 

Please consider the following:

	map<Object@, Object@> myMap;
	if (@myMap[@key] == null)
		//Found an empty handle

Now this will work, but it gives me this warning: 

The operand is implicitly converted to handle in order to compare them at row: X col: Y

this if for the line with the null comparison.

As I understand it, the @ sign in front of myMap in that instance, should make it clear that I already want to compare handles...

If I change the code to this:

    map<Object@, Object@> myMap;
    Object@ obj = myMap[@key];
    if (@obj == null)
	//Found an empty handle

The warning is gone, and everything still works as expected.

 

I'm using the AATC master as it is on GitHub and Angelscript Version 2.29.1
Is this a parse error? Binding problem ? Or am I doing something wrong?

 

Thanks again for this great Addon btw ;)
 


In Topic: Template containers angelscript addon library release!

29 January 2015 - 03:07 PM

Awesome! Thank you so much!
This literally saved me a lot of work. I was working on my own map implementation a while back, until Andreas pointed me here.
You nicely unified the code behind all containers, which really is a big plus.

 

The iterator additions make this complete. I love it.

I do prefer the standard bindings, so I'll change them like you suggested.
The extra safety measure will really come in handy as well. I can compile my engine with the security in debug, and without in release if it becomes relevant to increase performance after testing the game logic in debug. Perfect.

Thanks again


In Topic: Template containers angelscript addon library release!

08 January 2015 - 02:03 PM

Sweet!

I'm downloading it now. Thank you so much for the quick response.
I found Andreas' suggestion interesting as well.

Is it possible to make the map behave more like the stl one ?
Can it be extended so that find returns an iterator directly?

 

If that is possible, maybe functions like begin, end, rbegin, rend etc can also be supported.

In that case, find can return end if an object cannot be found, like stl does.

Thanks again.


In Topic: Template containers angelscript addon library release!

02 January 2015 - 06:00 PM

Hi Sami,

Thanks for posting! Looks good!
Do you have any plans for adding support for opIndex to the map and unorderd_map ?

So that maps can be used like myMap[myKey] = myValue ?

I think that would be a nice addition.

 

Another thing: 

While trying to add AACT to our project, I noticed that it didn't play nice with our custom String class.
Sure there is a define in the aatc_config that I can change, but our string doesn't have the same interface as the std::string and this gives some problems in the implementation of the aatc_script_Funcpointer::Set functions.

 

It was easily to fixed though, and kind of our problem for being boneheads and writing our own string class :P
I see why that's kind of a problem when you can't use asIScriptFunction* instead of names....

Anyway!
Keep up the good work!


PARTNERS