@@ -85,8 +85,8 @@ struct window_params {
8585/* *
8686 * @brief Base singleton class of application.
8787 * An application should subclass this class and return an instance from the
88- * application factory function create_application() , see application.hpp for
89- * details. When instance of this class is created it also creates a window and
88+ * application_factory , see application_factory for details.
89+ * When instance of this class is created it also creates a window and
9090 * initializes rendering API (e.g. OpenGL or OpenGL ES).
9191 */
9292class application : public utki ::intrusive_singleton<application>
@@ -307,8 +307,10 @@ inline application& inst()
307307class application_factory
308308{
309309public:
310- using factory_type =
311- std::function<std::unique_ptr<application>(std::string_view executable, utki::span<const char *> args)>;
310+ using factory_type = std::function<std::unique_ptr<application>(
311+ std::string_view executable, //
312+ utki::span<std::string_view> args
313+ )>;
312314
313315 /* *
314316 * @brief Constructor.
@@ -319,6 +321,11 @@ class application_factory
319321 */
320322 application_factory (factory_type factory);
321323
324+ /* *
325+ * @brief Get registered factory function.
326+ * @return Registered factory function.
327+ * @throw std::logic_error if no factory function was registered, i.e. application_factory instance is not created.
328+ */
322329 static const factory_type& get_factory ();
323330
324331 /* *
@@ -327,7 +334,10 @@ class application_factory
327334 * @param argv - array of command line arguments. First argument is the
328335 * executable filename.
329336 */
330- static std::unique_ptr<application> create_application (int argc, const char ** argv);
337+ static std::unique_ptr<application> make_application (
338+ int argc, //
339+ const char ** argv
340+ );
331341
332342private:
333343 static factory_type& get_factory_internal ();
0 commit comments