Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » using namespace Upp; in header files
using namespace Upp; in header files [message #52775] Fri, 22 November 2019 21:54 Go to next message
coolman is currently offline  coolman
Messages: 114
Registered: April 2006
Location: Czech Republic
Experienced Member
Hi,

Header files in uppsrc directory contains "using namespace Upp;"

grep --include=\*.h -rnw . -e "using namespace Upp;"

./urepo/urepo.h:6:using namespace Upp;
./RasterPlayer/RasterPlayer.h:6:using namespace Upp;
./ScatterCtrl/ScatterCtrl.h:11:using namespace Upp;
./ScatterCtrl/PieCtrl.h:8:using namespace Upp;
./ide/Core/Core.h:12:using namespace Upp;
./XmlView/XmlView.h:6:using namespace Upp;
./Web/ctrl/DlgHttpServer.h:3:using namespace Upp;
./ScatterDraw/ScatterDraw.h:10:using namespace Upp;
./ScatterDraw/PieDraw.h:10:using namespace Upp;


Can you fix that?

Thanks, Radek
Re: using namespace Upp; in header files [message #52776 is a reply to message #52775] Sat, 23 November 2019 15:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Removed from urepo.h and RasterPlayer.h.

Removed Web and XmlView from uppsrc.

I am not going to remove that from ide/Core.h as my policy is that for applications this is OK. (I do not want theide into Upp namespace nor I want to put Upp:: everywhere).

I will leave Scatter* header for koldo to fix.

Mirek
Re: using namespace Upp; in header files [message #52777 is a reply to message #52776] Sat, 23 November 2019 19:08 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Quote:
I will leave Scatter* header for koldo to fix.
OK, please let me a couple of days. I will also update Bazaar packages.


Best regards
Iñaki
Re: using namespace Upp; in header files [message #52780 is a reply to message #52777] Sun, 24 November 2019 12:24 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Done for Scatter*.

Best regards
Iñaki

[Updated on: Sun, 24 November 2019 12:24]

Report message to a moderator

Re: using namespace Upp; in header files [message #52783 is a reply to message #52780] Sun, 24 November 2019 20:13 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Koldo,

I would like to add one thing - it's OK to use "using namespace Upp" or any other namespace in *.cpp files. It only affects the header file when after including the "using namespace" is inherited. So, the change with replace "using namespace Upp" in *.cpp files in Scatter was not needed and doesn't change anything. I think for *.cpp file this statement is more comfortable than "namespace Upp {" and then at the end you need to remember to add "}".

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: using namespace Upp; in header files [message #52784 is a reply to message #52783] Sun, 24 November 2019 20:18 Go to previous message
koldo is currently offline  koldo
Messages: 3354
Registered: August 2008
Senior Veteran
Yes I know it. However reading some changed files I have seen that also .cpp files have been changed this way.

Best regards
Iñaki

[Updated on: Sun, 24 November 2019 20:19]

Report message to a moderator

Previous Topic: PDB debugger support of U++ types, GBD prettyprinter anybody?
Next Topic: lld / windres
Goto Forum:
  


Current Time: Thu Mar 28 11:56:50 CET 2024

Total time taken to generate the page: 0.01410 seconds