diff --git a/src/utils/Contexts/ContextSpacing.cpp b/src/utils/Contexts/ContextSpacing.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1dc18c636cc6f2be50c74cb54f846b85392bef0c --- /dev/null +++ b/src/utils/Contexts/ContextSpacing.cpp @@ -0,0 +1,40 @@ +/* + * ContextSpacing.cpp + * + * Created on: Jan 15, 2015 + * Author: Aaron Quinlan + */ +#include "ContextSpacing.h" + +ContextSpacing::ContextSpacing() +{ + setSortedInput(true); +} + +ContextSpacing::~ContextSpacing() +{ + +} + +bool ContextSpacing::parseCmdArgs(int argc, char **argv, int skipFirstArgs) { + _argc = argc; + _argv = argv; + _skipFirstArgs = skipFirstArgs; + if (_argc < 2) { + setShowHelp(true); + return false; + } + + setProgram(_programNames[argv[0]]); + + _argsProcessed.resize(_argc - _skipFirstArgs, false); + + for (_i=_skipFirstArgs; _i < argc; _i++) { + if (isUsed(_i - _skipFirstArgs)) { + continue; + } + } + return ContextBase::parseCmdArgs(argc, argv, 1); +} + + diff --git a/src/utils/Contexts/ContextSpacing.h b/src/utils/Contexts/ContextSpacing.h new file mode 100644 index 0000000000000000000000000000000000000000..47f9e78f40021360c7c30a172da36e910da85f6c --- /dev/null +++ b/src/utils/Contexts/ContextSpacing.h @@ -0,0 +1,25 @@ +/* + * ContextSpacing.h + * + * Created on: Jan 15, 2015 + * Author: Aaron Quinlan + */ + +#ifndef CONTEXTSPACING_H_ +#define CONTEXTSPACING_H_ + +#include "ContextBase.h" + +class ContextSpacing : public ContextBase { +public: + ContextSpacing(); + ~ContextSpacing(); + //bool isValidState(); + + virtual bool parseCmdArgs(int argc, char **argv, int skipFirstArgs); + +}; + +#endif /* CONTEXTSPACING_H_ */ + +