Home » U++ Library support » U++ SQL » SQL tutorial 5 and using namespace Upp; in header file (Solved)
Re: SQL tutorial 5 and using namespace Upp; in header file (Solved) [message #52806 is a reply to message #52805] |
Sat, 30 November 2019 12:12 |
|
Klugier
Messages: 1076 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello coolman,
Nice catch! I think for the visibility reasons we should use following notation:
MyApp.h
#ifndef _MyApp_h_
#define _MyApp_h_
#include <Core/Core.h>
#include <plugin/sqlite3/Sqlite3.h>
namespace Upp
{
#define SCHEMADIALECT <plugin/sqlite3/Sqlite3Schema.h>
#define MODEL <Sql05/MyApp.sch>
#include "Sql/sch_header.h"
}
#endif
MyApp.cpp:
#include "MyApp.h"
namespace Upp
{
#include <Sql/sch_schema.h>
#include <Sql/sch_source.h>
}
using namespace Upp;
CONSOLE_APP_MAIN
{
Wit additional level of indent the construction is much more visible. In my opinion "using namespace Upp" should be used after include block to not interfere with includes.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sat, 30 November 2019 12:12] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 28 14:41:24 CEST 2024
Total time taken to generate the page: 0.04136 seconds
|