LLDB mainline
Public Member Functions | List of all members
lldb_private::TildeExpressionResolver Class Referenceabstract

#include <TildeExpressionResolver.h>

Inheritance diagram for lldb_private::TildeExpressionResolver:
Inheritance graph
[legend]

Public Member Functions

virtual ~TildeExpressionResolver ()
 
virtual bool ResolveExact (llvm::StringRef Expr, llvm::SmallVectorImpl< char > &Output)=0
 Resolve a Tilde Expression contained according to bash rules.
 
virtual bool ResolvePartial (llvm::StringRef Expr, llvm::StringSet<> &Output)=0
 Auto-complete a tilde expression with all matching values.
 
bool ResolveFullPath (llvm::StringRef Expr, llvm::SmallVectorImpl< char > &Output)
 Resolve an entire path that begins with a tilde expression, replacing the username portion with the matched result.
 

Detailed Description

Definition at line 20 of file TildeExpressionResolver.h.

Constructor & Destructor Documentation

◆ ~TildeExpressionResolver()

TildeExpressionResolver::~TildeExpressionResolver ( )
virtualdefault

Member Function Documentation

◆ ResolveExact()

virtual bool lldb_private::TildeExpressionResolver::ResolveExact ( llvm::StringRef  Expr,
llvm::SmallVectorImpl< char > &  Output 
)
pure virtual

Resolve a Tilde Expression contained according to bash rules.

Parameters
ExprContains the tilde expression to resolve. A valid tilde expression must begin with a tilde and contain only non separator characters.
OutputContains the resolved tilde expression, or the original input if the tilde expression could not be resolved.
Returns
true if Expr was successfully resolved, false otherwise.

Implemented in lldb_private::StandardTildeExpressionResolver.

Referenced by DiskFilesOrDirectories(), and ResolveFullPath().

◆ ResolveFullPath()

bool TildeExpressionResolver::ResolveFullPath ( llvm::StringRef  Expr,
llvm::SmallVectorImpl< char > &  Output 
)

Resolve an entire path that begins with a tilde expression, replacing the username portion with the matched result.

Definition at line 76 of file TildeExpressionResolver.cpp.

References ResolveExact().

Referenced by lldb_private::TargetList::CreateTargetInternal().

◆ ResolvePartial()

virtual bool lldb_private::TildeExpressionResolver::ResolvePartial ( llvm::StringRef  Expr,
llvm::StringSet<> &  Output 
)
pure virtual

Auto-complete a tilde expression with all matching values.

Parameters
ExprContains the tilde expression prefix to resolve. See ResolveExact() for validity rules.
OutputContains all matching home directories, each one itself unresolved (i.e. you need to call ResolveExact on each item to turn it into a real path).
Returns
true if there were any matches, false otherwise.

Implemented in lldb_private::StandardTildeExpressionResolver.

Referenced by DiskFilesOrDirectories().


The documentation for this class was generated from the following files: