Loading...
Searching...
No Matches
Application.h
Go to the documentation of this file.
1// Copyright (c) 2025 Dave R. Smith. All rights reserved.
2// Malena Framework — Proprietary Software. See LICENSE for terms.
3
4//
5// Application.h
6//
7
8#ifndef MALENA_APPLICATION_H
9#define MALENA_APPLICATION_H
10
11#pragma once
12
19#include <string>
20#include <type_traits>
21
22namespace ml
23{
24 // ── ApplicationBase — internal base shared by Application and ApplicationWith ──
25
35 {
36 public:
41 const std::string& title,
43
47 ApplicationBase(unsigned int screenWidth,
48 unsigned int screenHeight,
49 unsigned int bitDepth,
50 const std::string& title);
51
52
56 void addComponent(Core& component);
57
61 static void clearEvents();
62
76 void reset();
77
79 };
80
81 // ── Application — no manifest ─────────────────────────────────────────────
82
117 {
118 public:
120
121 };
122
123 // ── ApplicationWith — with manifest ───────────────────────────────────────
124
178 template<typename TManifest>
180 public ml::ManifestResources<TManifest>
181 {
182 public:
185
187
188 };
189
190} // namespace ml
191
192#endif // MALENA_APPLICATION_H
AppManager(const sf::VideoMode &videoMode, const std::string &title, sf::RenderWindow &window=WindowManager::getWindow())
Construct an AppManager and create the SFML window.
void addComponent(Core &component)
Register a Core object with the application's component manager.
ApplicationBase(unsigned int screenWidth, unsigned int screenHeight, unsigned int bitDepth, const std::string &title)
Construct from pixel dimensions and bit depth.
static void clearEvents()
Clear all event subscriptions across the entire application.
void reset()
Full application reset — clears events, messages, and components.
ApplicationBase(const sf::VideoMode &videoMode, const std::string &title, sf::RenderWindow &window=WindowManager::getWindow())
Construct with an explicit video mode and window title.
Primary entry point for Malena applications without a manifest.
ApplicationBase(const sf::VideoMode &videoMode, const std::string &title, sf::RenderWindow &window=WindowManager::getWindow())
Construct with an explicit video mode and window title.
Entry point for Malena applications with a manifest.
ApplicationBase(const sf::VideoMode &videoMode, const std::string &title, sf::RenderWindow &window=WindowManager::getWindow())
Construct with an explicit video mode and window title.
ml::ManifestResources< TManifest > Resources
Unified resource accessor — Resources::get(Images::Icon).
Virtual base class for all Malena framework objects.
Definition Core.h:69
Trait that adds per-frame update and window lifecycle callbacks to any Core object.
Definition Updatable.h:61
sf::RenderWindow & getWindow()
Return the framework's shared sf::RenderWindow.
#define MALENA_API
Definition Component.h:22
Unified manifest resource and config accessor.