JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::ArgumentList::Argument Struct Reference

One of the arguments in an ArgumentList. More...

#include <juce_ConsoleApplication.h>

Collaboration diagram for juce::ArgumentList::Argument:

Public Member Functions

bool isLongOption () const
 Returns true if this argument starts with a double dash. More...
 
bool isLongOption (const String &optionRoot) const
 Returns true if this argument starts with a double dash, followed by the given string. More...
 
bool isShortOption () const
 Returns true if this argument starts with a single dash. More...
 
bool isShortOption (char shortOptionCharacter) const
 Returns true if this argument starts with a single dash and then contains the given character somewhere inside it. More...
 
bool operator!= (StringRef stringToCompare) const
 Compares this argument against a string. More...
 
bool operator== (StringRef stringToCompare) const
 Compares this argument against a string. More...
 
File resolveAsExistingFile () const
 Resolves this argument as an absolute File, using the current working directory as a base for resolving relative paths, and also doing a check to make sure the file exists. More...
 
File resolveAsExistingFolder () const
 Resolves a user-supplied folder name into an absolute File, using the current working directory as a base for resolving relative paths, and also doing a check to make sure the folder exists. More...
 
File resolveAsFile () const
 Resolves this argument as an absolute File, using the current working directory as a base for resolving relative paths, and stripping quotes, etc. More...
 

Public Attributes

String text
 The original text of this argument. More...
 

Detailed Description

One of the arguments in an ArgumentList.

Member Function Documentation

◆ isLongOption() [1/2]

bool juce::ArgumentList::Argument::isLongOption ( ) const

Returns true if this argument starts with a double dash.

◆ isLongOption() [2/2]

bool juce::ArgumentList::Argument::isLongOption ( const String optionRoot) const

Returns true if this argument starts with a double dash, followed by the given string.

◆ isShortOption() [1/2]

bool juce::ArgumentList::Argument::isShortOption ( ) const

Returns true if this argument starts with a single dash.

◆ isShortOption() [2/2]

bool juce::ArgumentList::Argument::isShortOption ( char  shortOptionCharacter) const

Returns true if this argument starts with a single dash and then contains the given character somewhere inside it.

◆ operator!=()

bool juce::ArgumentList::Argument::operator!= ( StringRef  stringToCompare) const

Compares this argument against a string.

The string may be a pipe-separated list of options, e.g. "--help|-h"

◆ operator==()

bool juce::ArgumentList::Argument::operator== ( StringRef  stringToCompare) const

Compares this argument against a string.

The string may be a pipe-separated list of options, e.g. "--help|-h"

◆ resolveAsExistingFile()

File juce::ArgumentList::Argument::resolveAsExistingFile ( ) const

Resolves this argument as an absolute File, using the current working directory as a base for resolving relative paths, and also doing a check to make sure the file exists.

If the file doesn't exist, this will call fail() with a suitable error.

See also
resolveAsFile, resolveAsExistingFolder

◆ resolveAsExistingFolder()

File juce::ArgumentList::Argument::resolveAsExistingFolder ( ) const

Resolves a user-supplied folder name into an absolute File, using the current working directory as a base for resolving relative paths, and also doing a check to make sure the folder exists.

If the folder doesn't exist, this will call fail() with a suitable error.

See also
resolveAsFile, resolveAsExistingFile

◆ resolveAsFile()

File juce::ArgumentList::Argument::resolveAsFile ( ) const

Resolves this argument as an absolute File, using the current working directory as a base for resolving relative paths, and stripping quotes, etc.

Member Data Documentation

◆ text

String juce::ArgumentList::Argument::text

The original text of this argument.


The documentation for this struct was generated from the following file: