Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Create an AppLauncher replacing repeated code in app examples and template #90

Open
BjoernAtBosch opened this issue Apr 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@BjoernAtBosch
Copy link
Member

Description

The examples and the app skeleton of the vehicle-app-cpp-template contain repeated code for launching the Vehicle App. This could be replaced by a helper class provided by the SDK:

template<typename TAppClass> 
class Launcher {
public:
   Launcher() = default;
   ~Launcher() = default;

  void signalHandler() { ... }

   template<typename... TArgs>
   void launch(TArgs... args) {
      m_app = std::make_unique<TAppClass>(args...);
      signal(SIGINT, &Launcher<TAppClass>::signalHandler);
   }


private:
   std::unique_ptr<TAppClass> m_app;
}

// usage

Launcher<SeatAdjusterApp>().launch();

Suggested Solution

No response

Alternatives

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant