Jump to content

  • Log In with Google      Sign In   
  • Create Account

- - - - -

Remove global namespace accessor?


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 Paril101   Members   -  Reputation: 106

Like
0Likes
Like

Posted 26 December 2012 - 09:06 AM

Hey there.

 

Another simple question I figure I'd place in another thread.

I have some scripts which interface highly out to C++. Now, I added a lot of types which the scripts need to use - however, the code is littered with the global namespace accessor. For instance:

 

namespace Default
{
	class DefaultRenderer : ::IBlockRenderer
	{
		void Render(::Block block, ::Point3i position)
		{
			::renderer.Draw(::Box().SetAll(::Point2i(0, 0), ::Colorb(255, 0, 255, 255)));
		}
	}
}

 

 

Is there any way I can get rid of these? I know it's because these are in a namespace, but, I use them to keep scripts separate and enforce that they be in their own namespace. With them it can't seem to resolve the global scope automatically.

 

Was this just a design choice?

 

-P


Edited by Paril101, 26 December 2012 - 09:07 AM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3455

Like
0Likes
Like

Posted 26 December 2012 - 09:20 AM

The namespace feature does not yet support searching in parent namespaces when looking up symbols. I will implement this support, but I haven't gotten to it yet. I wanted to give the basic namespace feature some time to mature first, i.e. time enough for people to use it to find most of the bugs.

I hope to get the time to implement the search in parent namespace early next year (at least the first half of the year).

Regards,
Andreas
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