Permalink
Browse files

added Application::commandPath()

  • Loading branch information...
1 parent 7e8797f commit e60bcd413d44f5b0342a10873ff62b8ba53f2eab @aleks-f aleks-f committed Jan 5, 2013
Showing with 10 additions and 2 deletions.
  1. +3 −0 Util/include/Poco/Util/Application.h
  2. +1 −2 Util/samples/SampleApp/src/SampleApp.cpp
  3. +6 −0 Util/src/Application.cpp
@@ -251,6 +251,9 @@ class Util_API Application: public Subsystem
std::string commandName() const;
/// Returns the command name used to invoke the application.
+ std::string commandPath() const;
+ /// Returns the full command path used to invoke the application.
+
LayeredConfiguration& config() const;
/// Returns the application's configuration.
@@ -160,9 +160,8 @@ class SampleApp: public Application
if (!_helpRequested)
{
logger().information("Command line:");
- const ArgVec argVec = argv();
std::ostringstream ostr;
- for (ArgVec::const_iterator it = argVec.begin(); it != argVec.end(); ++it)
+ for (ArgVec::const_iterator it = argv().begin(); it != argv().end(); ++it)
{
ostr << *it << ' ';
}
View
@@ -303,6 +303,12 @@ std::string Application::commandName() const
}
+std::string Application::commandPath() const
+{
+ return _pConfig->getString("application.path");
+}
+
+
void Application::stopOptionsProcessing()
{
_stopOptionsProcessing = true;

0 comments on commit e60bcd4

Please sign in to comment.