Android-cuttlefish cvd tool
Classes | Namespaces | Enumerations | Functions
flag_parser.h File Reference
#include <cstdint>
#include <functional>
#include <optional>
#include <ostream>
#include <string>
#include <vector>
#include "cuttlefish/common/libs/utils/result.h"
Include dependency graph for flag_parser.h:

Go to the source code of this file.

Classes

struct  cuttlefish::FlagAlias
 
struct  cuttlefish::FlagMatch
 
class  cuttlefish::Flag
 

Namespaces

namespace  cuttlefish
 

Enumerations

enum class  cuttlefish::FlagAliasMode { cuttlefish::kFlagPrefix , cuttlefish::kFlagExact , cuttlefish::kFlagConsumesFollowing , cuttlefish::kFlagConsumesArbitrary }
 

Functions

std::ostream & cuttlefish::operator<< (std::ostream &out, const FlagAlias &alias)
 
std::ostream & cuttlefish::operator<< (std::ostream &out, const Flag &flag)
 
std::vector< std::string > cuttlefish::ArgsToVec (int argc, char **argv)
 
Result< bool > cuttlefish::ParseBool (const std::string &value, const std::string &name)
 
Result< void > cuttlefish::ConsumeFlags (const std::vector< Flag > &flags, std::vector< std::string > &args, const bool recognize_end_of_option_mark)
 
Result< void > cuttlefish::ConsumeFlags (const std::vector< Flag > &flags, std::vector< std::string > &&args, const bool recognize_end_of_option_mark)
 
Result< void > cuttlefish::ConsumeFlagsConstrained (const std::vector< Flag > &flags, std::vector< std::string > &args)
 
Result< void > cuttlefish::ConsumeFlagsConstrained (const std::vector< Flag > &flags, std::vector< std::string > &&args)
 
bool cuttlefish::WriteGflagsCompatXml (const std::vector< Flag > &flags, std::ostream &out)
 
Flag cuttlefish::VerbosityFlag (android::base::LogSeverity &value)
 
Flag cuttlefish::HelpFlag (const std::vector< Flag > &flags, std::string text)
 
Flag cuttlefish::HelpXmlFlag (const std::vector< Flag > &flags, std::ostream &out, bool &value, std::string text)
 
Flag cuttlefish::InvalidFlagGuard ()
 
Flag cuttlefish::UnexpectedArgumentGuard ()
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, std::string &value)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, std::int32_t &value)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, std::size_t &value)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, bool &value)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, std::vector< std::string > &value)
 
Flag cuttlefish::GflagsCompatFlag (const std::string &name, std::vector< bool > &value, const bool default_value)
 
Result< bool > cuttlefish::HasHelpFlag (const std::vector< std::string > &args)