This repository has been archived on 2026-07-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BrightnessControl/RetrieveArguments.h
amazing-username 5c513ba3fd ...
2017-09-08 13:11:23 -05:00

38 lines
890 B
C++

#ifndef RETRIEVEARGUMENTS_H
#define RETRIEVEARGUMENTS_H
#include<vector>
#include<string>
#include<tuple>
class RetrieveArguments
{
public:
RetrieveArguments() = default;
RetrieveArguments(const int, char*[]);
void initilize(const int, char*[]);
std::vector<std::string> argumentElements() const;
private:
std::vector<std::string> arguments;
};
#endif
RetrieveArguments::RetrieveArguments(const int amountOfArguments, char* argumentsFromInit[])
{
for (auto index=1; index!=amountOfArguments; ++index)
arguments.push_back(std::string(*(argumentsFromInit + index)));
}
void RetrieveArguments::initilize(const int amountOfArguments, char* argumentsFromInit[])
{
for (auto index=1; index!=amountOfArguments; ++index)
arguments.push_back(std::string{*(argumentsFromInit + index)});
}
std::vector<std::string> RetrieveArguments::argumentElements() const
{
return arguments;
}