LLDB mainline
Public Member Functions | Private Attributes | List of all members
lldb_private::CppModuleConfiguration::SetOncePath Class Reference

Utility class for a path that can only be set once. More...

Public Member Functions

bool TrySet (llvm::StringRef path)
 Try setting the path.
 
llvm::StringRef Get () const
 Return the path if there is one.
 
bool Valid () const
 Returns true iff this path was set exactly once so far.
 

Private Attributes

std::string m_path
 
bool m_valid = false
 
bool m_first = true
 True iff this path hasn't been set yet.
 

Detailed Description

Utility class for a path that can only be set once.

Definition at line 24 of file CppModuleConfiguration.h.

Member Function Documentation

◆ Get()

llvm::StringRef lldb_private::CppModuleConfiguration::SetOncePath::Get ( ) const
inline

Return the path if there is one.

Definition at line 35 of file CppModuleConfiguration.h.

References m_path, and m_valid.

Referenced by lldb_private::CppModuleConfiguration::CppModuleConfiguration(), and lldb_private::CppModuleConfiguration::hasValidConfig().

◆ TrySet()

bool CppModuleConfiguration::SetOncePath::TrySet ( llvm::StringRef  path)

Try setting the path.

Returns true if the path was set and false if the path was already set.

Definition at line 18 of file CppModuleConfiguration.cpp.

References m_first, m_path, and m_valid.

Referenced by lldb_private::CppModuleConfiguration::analyzeFile().

◆ Valid()

bool lldb_private::CppModuleConfiguration::SetOncePath::Valid ( ) const
inline

Returns true iff this path was set exactly once so far.

Definition at line 40 of file CppModuleConfiguration.h.

References m_valid.

Referenced by lldb_private::CppModuleConfiguration::CppModuleConfiguration(), and lldb_private::CppModuleConfiguration::hasValidConfig().

Member Data Documentation

◆ m_first

bool lldb_private::CppModuleConfiguration::SetOncePath::m_first = true
private

True iff this path hasn't been set yet.

Definition at line 28 of file CppModuleConfiguration.h.

Referenced by TrySet().

◆ m_path

std::string lldb_private::CppModuleConfiguration::SetOncePath::m_path
private

Definition at line 25 of file CppModuleConfiguration.h.

Referenced by Get(), and TrySet().

◆ m_valid

bool lldb_private::CppModuleConfiguration::SetOncePath::m_valid = false
private

Definition at line 26 of file CppModuleConfiguration.h.

Referenced by Get(), TrySet(), and Valid().


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