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

Engine and test app #14

Open
wants to merge 1 commit into
base: no-engine-files
Choose a base branch
from
Open

Engine and test app #14

wants to merge 1 commit into from

Conversation

spaske00
Copy link
Contributor

@spaske00 spaske00 commented Dec 18, 2024

@ivan-cukic-matf I've tagged points of interest :)

template<typename TController>
static TController *get(std::source_location location = std::source_location::current()) {
static_assert(std::is_base_of_v<Controller, TController>);
static TController *controller = create_if_absent<TController>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @returns Return value if the `glfun` has it, otherwise void.
*/
template<typename TResult, typename... TOpenGLArgs, typename... Args>
static TResult call(std::source_location location, TResult (*glfun)(TOpenGLArgs...), Args... args) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @returns The value of the argument.
*/
template<typename T>
std::optional<T> arg(std::string_view name, std::optional<T> default_value = {}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util::ArgParser::instance()->initialize(argc, argv);
util::Configuration::instance()->initialize();

// register engine controllers
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* } <-- defer statement is executed here
* @endcode
*/
#define defer auto CONCAT(defer_stmt_, __LINE__) = MakeDeferImpl() << [&]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@spaske00 spaske00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ivan-cukic-matf I've tagged the points of interest :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant