lordgamez commented on a change in pull request #937: URL: https://github.com/apache/nifi-minifi-cpp/pull/937#discussion_r533999239
########## File path: encrypt-config/ArgParser.cpp ########## @@ -0,0 +1,178 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <string> +#include <set> +#include <iostream> +#include <algorithm> +#include "ArgParser.h" +#include "utils/OptionalUtils.h" +#include "utils/StringUtils.h" +#include "CommandException.h" + +namespace org { +namespace apache { +namespace nifi { +namespace minifi { +namespace encrypt_config { + +const std::vector<Argument> Arguments::registered_args_{ + {std::set<std::string>{"--minifi-home", "-m"}, + true, + "minifi home", + "Specifies the home directory used by the minifi agent"} +}; + +const std::vector<Flag> Arguments::registered_flags_{ + {std::set<std::string>{"--help", "-h"}, + "Prints this help message"}, + {std::set<std::string>{"--encrypt-flow-config"}, + "If set, the flow configuration file (as specified in minifi.properties) is also encrypted."} +}; + +bool haveCommonItem(const std::set<std::string>& a, const std::set<std::string>& b) { Review comment: I would move it now, just in case someone needs a similar utility function in the future would find it easier there. A wide generalization may not be needed at the moment, anyone using it later could handle that if needed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
