Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco::Application

Please post support and help requests here.

Poco::Application

Postby Edsoon » 19 Jul 2012, 23:08

ServerApplication inherited from Application. Application has method const char* name () const :

const char* Application::name() const
{
return "Application";
}

Why this method returns constant "Application" ?
I thought that, this function must return the name of my application which set in config or other function.
Edsoon
 
Posts: 5
Joined: 19 Jul 2012, 16:26

Re: Poco::Application

Postby guenter » 22 Jul 2012, 03:27

name() is inherited from Poco::Util::Subsystem and is supposed the (static) name of the Subsystem. In case of Poco::Util::Application, this is "Application".
In order to get the name of the executable, use one of the app properties application.name or application.baseName:

Code: Select all
std::string::name = app.config().getString("application.name");
guenter
 
Posts: 1110
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron