![]()  | 
  
    P4C
    
   The P4 Compiler 
   | 
 
Classes | |
| struct | Option | 
Public Types | |
| enum | OptionFlags { Default = 0 , Hide = 1 << 0 , OptionalArgument = 1 << 1 } | 
| using | OptionProcessor = std::function<bool(const char *)> | 
Public Member Functions | |
| cstring | getBinaryName () | 
| cstring | getBuildDate () | 
| cstring | getCompileCommand () | 
| virtual const char * | getIncludePath () const =0 | 
| virtual std::vector< const char * > * | process (int argc, char *const argv[]) | 
| virtual void | usage () | 
Protected Member Functions | |
| Options (std::string_view message) | |
| void | registerOption (const char *option, const char *argName, OptionProcessor processor, const char *description, OptionFlags flags=OptionFlags::Default) | 
| void | registerUsage (const char *msg) | 
| void | setOutStream (std::ostream *out) | 
| virtual bool | validateOptions () const | 
Protected Attributes | |
| std::vector< const char * > | additionalUsage | 
| const char * | binaryName | 
| cstring | buildDate | 
| bool | collectUnknownOptions = false | 
| cstring | compileCommand | 
| cstring | message | 
| std::vector< cstring > | optionOrder | 
| std::map< cstring, const Option * > | options | 
| std::ostream * | outStream = &std::cerr | 
| std::vector< const char * > | remainingOptions | 
| struct Util::Options::Option | 
| Class Members | ||
|---|---|---|
| const char * | argName | |
| const char * | description | |
| OptionFlags | flags | |
| cstring | option | |
| OptionProcessor | processor | |
| Enumerator | |
|---|---|
| Default | The default option flags.  | 
| Hide | Hide this option from –help message.  | 
| OptionalArgument | If this option requires an argument, it may be omitted. Options with this flag set can only accept their argument with the syntax   | 
      
  | 
  nodiscardpure virtual | 
Implemented in ParserOptions.
      
  | 
  virtual | 
Process options; return list of remaining options.
If subclasses override this method, they should call the superclass implementation.
Reimplemented in BMV2::PsaSwitchOptions, DPDK::DpdkOptions, P4Tools::AbstractP4cToolOptions, and ParserOptions.
      
  | 
  nodiscardprotectedvirtual | 
Checks if parsed options make sense with respect to each-other.
Reimplemented in CompilerOptions, P4Tools::AbstractP4cToolOptions, and P4Tools::P4Testgen::TestgenOptions.