(Application) Added a New method which does not require an arglist 80/26980/4
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 2 Sep 2014 14:02:38 +0000 (15:02 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 8 Sep 2014 09:48:09 +0000 (10:48 +0100)
Change-Id: I49c7bf988e6ccf3153a00f6793da4c9822412287

adaptors/common/command-line-options.cpp
adaptors/public-api/adaptor-framework/application.cpp
adaptors/public-api/adaptor-framework/application.h

index a784a80..88e2808 100644 (file)
@@ -100,6 +100,12 @@ CommandLineOptions::CommandLineOptions(int *argc, char **argv[])
   viewMode(0),
   stereoBase(65)
 {
+  // Exit gracefully if no arguments provided
+  if ( !argc || !argv )
+  {
+    return;
+  }
+
   if ( *argc > 1 )
   {
     // We do not want to print out errors.
index 586d596..3f6b27a 100644 (file)
 namespace Dali
 {
 
+Application Application::New()
+{
+  return New( NULL, NULL );
+}
+
 Application Application::New( int* argc, char **argv[] )
 {
   Internal::Adaptor::ApplicationPtr internal = Internal::Adaptor::Application::New( argc, argv, "Dali Application", DeviceLayout::DEFAULT_BASE_LAYOUT, OPAQUE );
@@ -63,6 +68,10 @@ Application::~Application()
 {
 }
 
+Application::Application()
+{
+}
+
 Application::Application(const Application& application)
 : BaseHandle(application)
 {
index fb6c6b7..3312046 100644 (file)
@@ -103,6 +103,13 @@ public:
 public:
 
   /**
+   * This is the constructor for applications without an argument list.
+   *
+   * @note The default base layout (DeviceLayout::DEFAULT_BASE_LAYOUT) will be used with this constructor.
+   */
+  static Application New();
+
+  /**
    * This is the constructor for applications.
    *
    * @param[in,out]  argc        A pointer to the number of arguments