xref: /aosp_15_r20/external/armnn/samples/common/include/Utils/CmdArgsParser.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1*89c4ff92SAndroid Build Coastguard Worker //
2*89c4ff92SAndroid Build Coastguard Worker // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3*89c4ff92SAndroid Build Coastguard Worker // SPDX-License-Identifier: MIT
4*89c4ff92SAndroid Build Coastguard Worker //
5*89c4ff92SAndroid Build Coastguard Worker #pragma once
6*89c4ff92SAndroid Build Coastguard Worker #include <string>
7*89c4ff92SAndroid Build Coastguard Worker #include <map>
8*89c4ff92SAndroid Build Coastguard Worker 
9*89c4ff92SAndroid Build Coastguard Worker /*
10*89c4ff92SAndroid Build Coastguard Worker  * Checks that a particular option was specified by the user
11*89c4ff92SAndroid Build Coastguard Worker  */
12*89c4ff92SAndroid Build Coastguard Worker bool CheckOptionSpecified(const std::map<std::string, std::string>& options, const std::string& option);
13*89c4ff92SAndroid Build Coastguard Worker 
14*89c4ff92SAndroid Build Coastguard Worker 
15*89c4ff92SAndroid Build Coastguard Worker /*
16*89c4ff92SAndroid Build Coastguard Worker  * Retrieves the user provided option
17*89c4ff92SAndroid Build Coastguard Worker  */
18*89c4ff92SAndroid Build Coastguard Worker std::string GetSpecifiedOption(const std::map<std::string, std::string>& options, const std::string& option);
19*89c4ff92SAndroid Build Coastguard Worker 
20*89c4ff92SAndroid Build Coastguard Worker 
21*89c4ff92SAndroid Build Coastguard Worker /*
22*89c4ff92SAndroid Build Coastguard Worker  * Parses all the command line options provided by the user and stores in a map.
23*89c4ff92SAndroid Build Coastguard Worker  */
24*89c4ff92SAndroid Build Coastguard Worker int ParseOptions(std::map<std::string, std::string>& options, std::map<std::string, std::string>& acceptedOptions,
25*89c4ff92SAndroid Build Coastguard Worker                  char *argv[], int argc);