DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
validate_flag.h
1 // Copyright 2014 Google Inc. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 //
7 // Flag validation help functions.
8 
9 #ifndef APP_VALIDATE_FLAG_H_
10 #define APP_VALIDATE_FLAG_H_
11 
12 #include <string>
13 
14 namespace edash_packager {
15 
21 // and cannot be empty; If condition is false, then this flag should
22 // not be set.
26 bool ValidateFlag(const char* flag_name,
27  const std::string& flag_value,
28  bool condition,
29  bool optional,
30  const char* label);
31 
34 void PrintError(const std::string& error_message);
35 
36 } // namespace edash_packager
37 
38 #endif // APP_VALIDATE_FLAG_H_
bool ValidateFlag(const char *flag_name, const std::string &flag_value, bool condition, bool optional, const char *label)
void PrintError(const std::string &error_message)