Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
Samples/AppSettings/Sources/Main.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#include "Stroika/Frameworks/StroikaPreComp.h"
5
8#include "Stroika/Foundation/Execution/CommandLine.h"
9
10#include "AppConfiguration.h"
11#include "MoreConfiguration.h"
12
13using namespace std;
14
15using namespace Stroika::Foundation;
17
18using namespace StroikaSample;
19using namespace StroikaSample::AppSettings;
20
21int main ([[maybe_unused]] int argc, [[maybe_unused]] const char* argv[])
22{
24 Stroika_Foundation_Debug_OptionalizeTraceArgs ("main", "argv={}"_f, Characters::ToString (vector<const char*>{argv, argv + argc}))};
25
26 // Simplest example
27 [[maybe_unused]] uint16_t usePort = gAppConfiguration->WebServerPort.value_or (AppConfigurationType::kWebServerPort_Default);
28
29 // Fancier examples
30 TestUse1 ();
31 TestUse2 ();
32 TestUse3 ();
33 TestUse4 ();
34
35 return EXIT_SUCCESS;
36}
#define Stroika_Foundation_Debug_OptionalizeTraceArgs(...)
Definition Trace.h:270
STL namespace.