From d6547b35aa3c7233168e6e948d1cedd38db3a50f Mon Sep 17 00:00:00 2001 From: arq5x <arq5x@virginia.edu> Date: Tue, 20 Jan 2015 11:56:25 -0500 Subject: [PATCH] add missing includes --- src/utils/Contexts/ContextSpacing.cpp | 40 +++++++++++++++++++++++++++ src/utils/Contexts/ContextSpacing.h | 25 +++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 src/utils/Contexts/ContextSpacing.cpp create mode 100644 src/utils/Contexts/ContextSpacing.h diff --git a/src/utils/Contexts/ContextSpacing.cpp b/src/utils/Contexts/ContextSpacing.cpp new file mode 100644 index 00000000..1dc18c63 --- /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 00000000..47f9e78f --- /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_ */ + + -- GitLab