18 lines
375 B
C++
18 lines
375 B
C++
|
#include "option.h"
|
||
|
|
||
|
namespace mshconsole{
|
||
|
Option::Option(const string &s, States b): optionName(s), want(b){
|
||
|
if(optionName.length()<1){
|
||
|
throw OptionNameEmptyException{};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const string& Option::getOptionName() const{
|
||
|
return optionName;
|
||
|
}
|
||
|
|
||
|
bool Option::hasFlag(enum States s) const{
|
||
|
return want & s;
|
||
|
}
|
||
|
}
|