Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SpectraL519/cpp-ap-demo

Repository files navigation

cpp-ap-demo

A collection of the CPP-AP library demo projects.


Note

Each demo project has it's own README file with it's detailed explanation


Demo Projects

Project Description
Power Calculator Calculates the value of a $b^e$ expression for the given base and exponents.
Demonstrates: The basic usage of positional and optional arguments.
File Merger Merges multiple text files into a single output file.
Demonstrates: The usage of default arguments.
Numbers Converter Converts numbers between different bases.
Demonstrates: The usage of argument parameters such as nargs, choices, and default values.
Verbosity Prints messages with varying levels of verbosity.
Demonstrates: The usage of none_type arguments and compound argument flags.
Logging Mode Logs a message depending on the selected logging mode (quiet, normal, verbose).
Demonstrates: The usage of custom argument value types (like enums).
Message Logger Outputs a message to a file, console, or not at all.
Demonstrates: The usage of argument groups.
AP-GIT A minimal Git CLI clone with subcommands (init, add, commit, status, push).
Demonstrates: The usage of subparsers for multi-command CLIs and complex argument configurations.

Build and Run

To build the demo projects using CMake run the following:

cmake -B build # -DAP_TAG=<AP_TAG>
cmake --build build/ # -j <njobs>

This will generate a run executable in each of the build/<demo-project-name> directories, so to execute the built programs you can run:

./build/<demo-project-name>/run <command-line args>

Note

Each project is built in the exact same way - using the make_demo macro defined in the root CMakeLists.txt file


Alternatively you can use Bazel:

bazel build //:all_demos

This generate a target for each of the demo projects. To execute the built programs run:

bazel run //<demo-project-name>:<demo-project-name> -- <command-line args>

About

Demo projects using the CPP-AP library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published