cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
args.hpp
Go to the documentation of this file.
1/*
2* cpp-terminal
3* C++ library for writing multi-platform terminal applications.
4*
5* SPDX-FileCopyrightText: 2019-2024 cpp-terminal
6*
7* SPDX-License-Identifier: MIT
8*/
9
10#pragma once
11
12#include <string>
13#include <vector>
14
15namespace Term
16{
17
19{
20public:
21 Arguments();
22 static std::size_t argc();
23 static std::vector<std::string> argv();
24 std::string operator[](const std::size_t& arg) const;
25
26private:
27 static void parse();
28 static std::vector<std::string> m_args;
29 static bool m_parsed;
30};
31
32class Argc
33{
34public:
35 Argc();
36 operator unsigned int();
37 operator unsigned int() const;
38};
39
40static const Arguments argv;
41static const Argc argc;
42
43} // namespace Term
static void parse()
Definition args.cpp:32
static std::vector< std::string > m_args
Definition args.hpp:28
static bool m_parsed
Definition args.hpp:29
static std::vector< std::string > argv()
Definition args.cpp:89
std::string operator[](const std::size_t &arg) const
Definition args.cpp:23
static std::size_t argc()
Definition args.cpp:83
Definition args.cpp:13