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
T
2017-07-02 17:51:54 -05:00

39 lines
880 B
C++

#ifndef RETRIEVEARGUMENTS_H
#define RETRIEVEARGUMENTS_H
#include<vector>
#include<string>
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;
}