Jump to content

  • Log In with Google      Sign In   
  • Create Account

Wracky

Member Since 03 Jun 2007
Offline Last Active Yesterday, 10:02 AM

Posts I've Made

In Topic: Template containers angelscript addon library release!

Yesterday, 10:07 AM

So I've just updated my Angelscript again, and noticed my version of AATC didn't use TypeInfo yet.
So I decided to update AATC as well, but I have troubles getting it to compile.

I don't know if this is a fault in my project, or not, but I'm getting a lot of errors like this:


1>  aatc_container_shared.cpp
1>..aatc\aatc_container_shared.hpp(358): error C2988: unrecognizable template declaration/definition (..\..\src\Scripting\AngelScript\aatc\aatc.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2988: unrecognizable template declaration/definition (..\..\src\Scripting\AngelScript\aatc\aatc_container_set.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2059: syntax error : '<L_TEMPLATEDECL>' (..\..\src\Scripting\AngelScript\aatc\aatc.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2059: syntax error : '<L_TEMPLATEDECL>' (..\..\src\Scripting\AngelScript\aatc\aatc_container_set.cpp)
1>..aatc\aatc_container_shared.hpp(359): error C2059: syntax error : '}' (..\..\src\Scripting\AngelScript\aatc\aatc.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2988: unrecognizable template declaration/definition (..\..\src\Scripting\AngelScript\aatc\aatc_container_list.cpp)
1>..aatc\aatc_container_shared.hpp(359): error C2059: syntax error : '}' (..\..\src\Scripting\AngelScript\aatc\aatc_container_set.cpp)
1>..aatc\aatc_container_shared.hpp(341): error C2888: 'void register_all_tempspec_basics_for_container(asIScriptEngine *)' : symbol cannot be defined within namespace 'autoregister' (..\..\src\Scripting\AngelScript\aatc\aatc.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2059: syntax error : '<L_TEMPLATEDECL>' (..\..\src\Scripting\AngelScript\aatc\aatc_container_list.cpp)
1>..aatc\aatc_container_shared.hpp(341): error C2888: 'void register_all_tempspec_basics_for_container(asIScriptEngine *)' : symbol cannot be defined within namespace 'autoregister' (..\..\src\Scripting\AngelScript\aatc\aatc_container_set.cpp)
1>..aatc\aatc_container_shared.hpp(359): error C2059: syntax error : '}' (..\..\src\Scripting\AngelScript\aatc\aatc_container_list.cpp)
1>..aatc\aatc_container_shared.hpp(341): error C2888: 'void register_all_tempspec_basics_for_container(asIScriptEngine *)' : symbol cannot be defined within namespace 'autoregister' (..\..\src\Scripting\AngelScript\aatc\aatc_container_list.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2988: unrecognizable template declaration/definition (..\..\src\Scripting\AngelScript\aatc\aatc_common.cpp)
1>..aatc\aatc_container_shared.hpp(358): error C2059: syntax error : '<L_TEMPLATEDECL>' (..\..\src\Scripting\AngelScript\aatc\aatc_common.cpp)
1>..aatc\aatc_container_shared.hpp(359): error C2059: syntax error : '}' (..\..\src\Scripting\AngelScript\aatc\aatc_common.cpp)
1>..aatc\aatc_container_shared.hpp(341): error C2888: 'void register_all_tempspec_basics_for_container(asIScriptEngine *)' : symbol cannot be defined within namespace 'autoregister' (..\..\src\Scripting\AngelScript\aatc\aatc_common.cpp)
1>  aatc_container_unordered_map.cpp

I'm using Visual Studio 2013, and have used the current master branch for AATC.

Am I doing something wrong? :)

Thanks!


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.


PARTNERS