LLDB mainline
lldb_private::Flags Class Reference

A class to manage flags. More...

#include "lldb/Utility/Flags.h"

Inheritance diagram for lldb_private::Flags:
[legend]

Public Types

typedef uint32_t ValueType
 The value type for flags is a 32 bit unsigned integer type.

Public Member Functions

 Flags (ValueType flags=0)
 Construct with initial flag bit values.
ValueType Get () const
 Get accessor for all flags.
size_t GetBitSize () const
 Return the number of flags that can be represented in this object.
void Reset (ValueType flags)
 Set accessor for all flags.
ValueType Clear (ValueType mask=~static_cast< ValueType >(0))
 Clear one or more flags.
ValueType Set (ValueType mask)
 Set one or more flags by logical OR'ing mask with the current flags.
bool AllSet (ValueType mask) const
 Test if all bits in mask are 1 in the current flags.
bool AnySet (ValueType mask) const
 Test one or more flags.
bool Test (ValueType bit) const
 Test a single flag bit.
bool AllClear (ValueType mask) const
 Test if all bits in mask are clear.
bool AnyClear (ValueType mask) const
bool IsClear (ValueType bit) const
 Test a single flag bit to see if it is clear (zero).

Protected Attributes

ValueType m_flags
 The flags.

Detailed Description

A class to manage flags.

The Flags class managed flag bits and allows testing and modification of individual or multiple flag bits.

Definition at line 22 of file Flags.h.

Member Typedef Documentation

◆ ValueType

The value type for flags is a 32 bit unsigned integer type.

Definition at line 25 of file Flags.h.

Constructor & Destructor Documentation

◆ Flags()

lldb_private::Flags::Flags ( ValueType flags = 0)
inline

Construct with initial flag bit values.

Constructs this object with mask as the initial value for all of the flags.

Parameters
[in]flagsThe initial value for all flags.

Definition at line 34 of file Flags.h.

References m_flags.

Referenced by lldb_private::Section::Section(), and lldb_private::Section::Section().

Member Function Documentation

◆ AllClear()

bool lldb_private::Flags::AllClear ( ValueType mask) const
inline

Test if all bits in mask are clear.

Returns
true if all flags in mask are clear, false otherwise.

Definition at line 103 of file Flags.h.

References m_flags.

Referenced by DerefToNSErrorPointer(), ExtractFields(), lldb_private::ValueObject::GetValueForExpressionPath_Impl(), and IsPointerValue().

◆ AllSet()

bool lldb_private::Flags::AllSet ( ValueType mask) const
inline

Test if all bits in mask are 1 in the current flags.

Returns
true if all flags in mask are 1, false otherwise.

Definition at line 83 of file Flags.h.

References m_flags.

Referenced by DerefToNSErrorPointer(), lldb_private::AppleObjCRuntime::FixUpDynamicType(), lldb_private::GNUstepObjCRuntime::FixUpDynamicType(), and lldb_private::ItaniumABILanguageRuntime::FixUpDynamicType().

◆ AnyClear()

bool lldb_private::Flags::AnyClear ( ValueType mask) const
inline

Definition at line 105 of file Flags.h.

References m_flags.

◆ AnySet()

◆ Clear()

ValueType lldb_private::Flags::Clear ( ValueType mask = ~static_cast<ValueType>(0))
inline

◆ Get()

ValueType lldb_private::Flags::Get ( ) const
inline

Get accessor for all flags.

Returns
Returns all of the flags as a Flags::ValueType.

Definition at line 40 of file Flags.h.

References m_flags.

Referenced by lldb_private::CommandObject::CheckRequirements(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::Section::Dump(), and ObjectFileELF::ReadSectionData().

◆ GetBitSize()

size_t lldb_private::Flags::GetBitSize ( ) const
inline

Return the number of flags that can be represented in this object.

Returns
The maximum number bits in this flag object.

Definition at line 46 of file Flags.h.

◆ IsClear()

bool lldb_private::Flags::IsClear ( ValueType bit) const
inline

Test a single flag bit to see if it is clear (zero).

Returns
true if bit is 0, false otherwise.

Definition at line 111 of file Flags.h.

References lldb_private::bit(), and m_flags.

Referenced by lldb_private::formatters::NSArraySyntheticFrontEndCreator(), lldb_private::formatters::NSDictionarySyntheticFrontEndCreator(), and lldb_private::formatters::NSSetSyntheticFrontEndCreator().

◆ Reset()

void lldb_private::Flags::Reset ( ValueType flags)
inline

Set accessor for all flags.

Parameters
[in]flagsThe bits with which to replace all of the current flags.

Definition at line 52 of file Flags.h.

References m_flags.

Referenced by lldb_private::ValueObject::GetValueForExpressionPath_Impl().

◆ Set()

◆ Test()

bool lldb_private::Flags::Test ( ValueType bit) const
inline

Test a single flag bit.

Returns
true if bit is set, false otherwise.

Definition at line 96 of file Flags.h.

References lldb_private::bit(), and m_flags.

Referenced by ABISysV_riscv::CallFrameAddressIsValid(), ABISysV_riscv::CodeAddressIsValid(), lldb_private::BreakpointOptions::CopyOverSetOptions(), lldb_private::ThreadPlanShouldStopHere::DefaultShouldStopHereCallback(), lldb_private::ThreadPlanShouldStopHere::DefaultStepFromHereCallback(), ProcessElfCore::DoGetMemoryRegionInfo(), ProcessMachCore::DoGetMemoryRegionInfo(), lldb_private::ValueObject::DumpPrintableRepresentation(), lldb_private::CommandInterpreter::EchoCommandNonInteractive(), lldb_private::Target::FinalizeFileActions(), lldb_private::TypeFormatImpl_Format::FormatObject(), GetPosixspawnFlags(), lldb_private::platform_linux::PlatformLinux::GetResumeCountForLaunchInfo(), lldb_private::platform_netbsd::PlatformNetBSD::GetResumeCountForLaunchInfo(), lldb_private::ValueObject::GetValueForExpressionPath_Impl(), lldb_private::ValueObject::HasSpecialPrintableRepresentation(), lldb_private::CommandInterpreter::IOHandlerInputComplete(), lldb_private::TypePayloadClang::IsCompleteObjCClass(), lldb_private::ValueObject::IsCStringContainer(), lldb_private::TypeSystemClang::IsCStringType(), lldb_private::Process::Launch(), lldb_private::Target::Launch(), lldb_private::MonitoringProcessLauncher::LaunchProcess(), lldb_private::Platform::LaunchProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), lldb_private::ProcessLauncherWindows::LaunchProcess(), LaunchProcessPosixSpawn(), ParseTrieEntries(), lldb_private::ValueObject::ReadPointedString(), ObjectFileELF::ReadSectionData(), lldb_private::TargetProperties::SetProcessLaunchInfo(), CoreSimulatorSupport::Device::Spawn(), and lldb_private::Log::WriteHeader().

Member Data Documentation

◆ m_flags

ValueType lldb_private::Flags::m_flags
protected

The flags.

Definition at line 114 of file Flags.h.

Referenced by AllClear(), AllSet(), AnyClear(), AnySet(), Clear(), Flags(), Get(), IsClear(), Reset(), Set(), and Test().


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