Rhino C++ API  8.6
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
ON_ComponentStatus Class Reference

#include <opennurbs_compstat.h>

Public Member Functions

 ON_ComponentStatus ()=default
 
 ON_ComponentStatus (const ON_ComponentStatus &)=default
 
 ON_ComponentStatus (ON_ComponentState state)
 
 ~ON_ComponentStatus ()=default
 
bool AllEqualStates (ON_ComponentStatus states_filter, ON_ComponentStatus comparand) const
 
bool ClearRuntimeMark ()
 
unsigned int ClearStates (ON_ComponentStatus states_to_clear)
 
bool IsClear () const
 
bool IsDamaged () const
 
bool IsDeleted () const
 
bool IsHidden () const
 
bool IsHighlighted () const
 
bool IsLocked () const
 
bool IsMarked (ON__UINT8 mark_bits) const
 
bool IsNotClear () const
 
bool IsSelected () const
 
bool IsSelectedPersistent () const
 
ON__UINT8 MarkBits () const
 
bool NoEqualStates (ON_ComponentStatus states_filter, ON_ComponentStatus comparand) const
 
bool operator!= (const ON_ComponentStatus &) const
 
bool operator!= (ON_ComponentStatus)
 
ON_ComponentStatusoperator= (const ON_ComponentStatus &)=default
 
bool operator== (const ON_ComponentStatus &) const
 
bool operator== (ON_ComponentStatus)
 
bool RuntimeMark () const
 
ON_ComponentState SelectedState () const
 
unsigned int SetDamagedState (bool bIsDamaged)
 
unsigned int SetDeletedState (bool bIsDeleted)
 
unsigned int SetHiddenState (bool bIsHidden)
 
unsigned int SetHighlightedState (bool bIsHighlighed)
 
unsigned int SetLockedState (bool bIsLocked)
 
ON__UINT8 SetMarkBits (ON__UINT8 bits)
 
bool SetRuntimeMark ()
 
bool SetRuntimeMark (bool bRuntimeMark)
 
unsigned int SetSelectedState (bool bSelectedState, bool bPersistent, bool bSynchronizeHighlight)
 
unsigned int SetSelectedState (ON_ComponentState selected_state, bool bSynchronizeHighlight)
 
unsigned int SetStates (ON_ComponentStatus states_to_set)
 
unsigned int SetStatus (ON_ComponentStatus status_to_copy)
 
bool SomeEqualStates (ON_ComponentStatus states_filter, ON_ComponentStatus comparand) const
 

Static Public Member Functions

static const ON_ComponentStatus LogicalAnd (ON_ComponentStatus lhs, ON_ComponentStatus rhs)
 
static const ON_ComponentStatus LogicalOr (ON_ComponentStatus lhs, ON_ComponentStatus rhs)
 
static bool StatusCheck (ON_ComponentStatus candidate, ON_ComponentStatus status_pass, ON_ComponentStatus status_fail)
 

Static Public Attributes

static const ON_ComponentStatus AllSet
 
static const ON_ComponentStatus Damaged
 
static const ON_ComponentStatus Deleted
 
static const ON_ComponentStatus Hidden
 
static const ON_ComponentStatus Highlighted
 
static const ON_ComponentStatus Locked
 
static const ON_ComponentStatus Marked
 
static const ON_ComponentStatus NoneSet
 
static const ON_ComponentStatus Selected
 
static const ON_ComponentStatus SelectedPersistent
 

Friends

class ON_AggregateComponentStatus
 

Constructor & Destructor Documentation

◆ ON_ComponentStatus() [1/3]

ON_ComponentStatus::ON_ComponentStatus ( )
default

◆ ~ON_ComponentStatus()

ON_ComponentStatus::~ON_ComponentStatus ( )
default

◆ ON_ComponentStatus() [2/3]

ON_ComponentStatus::ON_ComponentStatus ( const ON_ComponentStatus )
default

◆ ON_ComponentStatus() [3/3]

ON_ComponentStatus::ON_ComponentStatus ( ON_ComponentState  state)

Description: Constructs a status with the specified state set.

Member Function Documentation

◆ AllEqualStates()

bool ON_ComponentStatus::AllEqualStates ( ON_ComponentStatus  states_filter,
ON_ComponentStatus  comparand 
) const

Parameters: states_filter - [in] If no states are specified, then false is returned. comparand - [in] If a state is set in states_filter, the corresponding state in "this" and comparand will be tested.
Returns: True if every tested state in "this" and comparand are identical. Remarks: For the purposes of this test, ON_ComponentState::Selected and ON_ComponentState::SelectedPersistent are considered equal.

◆ ClearRuntimeMark()

bool ON_ComponentStatus::ClearRuntimeMark ( )

Returns: Input value of RuntimeMark();

◆ ClearStates()

unsigned int ON_ComponentStatus::ClearStates ( ON_ComponentStatus  states_to_clear)

Description: If a state is set in states_to_clear, the same state is cleared in "this". Parameters: states_to_clear - [in] Returns: 1 if status changed. 0 if status did not change. Remarks: The runtime mark setting cannot be changed using ClearStates().

◆ IsClear()

bool ON_ComponentStatus::IsClear ( ) const

Returns: True if every setting besides runtime mark is 0 or false. Ignores the runtime mark state. Remarks: The runtime mark setting is ignored by IsClear().

◆ IsDamaged()

bool ON_ComponentStatus::IsDamaged ( ) const

Returns: false if not damaged. true otherwise. (ON_ComponentStatus::DAMAGED_STATE::not_damaged != DamagedState())

◆ IsDeleted()

bool ON_ComponentStatus::IsDeleted ( ) const

Returns: false if not hidden. true otherwise. (ON_ComponentStatus::DELETED_STATE::not_deleted != DeletedState())

◆ IsHidden()

bool ON_ComponentStatus::IsHidden ( ) const

Returns: false if not hidden. true otherwise. (ON_ComponentStatus::HIDDEN_STATE::not_hidden != HiddenState())

◆ IsHighlighted()

bool ON_ComponentStatus::IsHighlighted ( ) const

Returns: false if not highlighted. true otherwise.

◆ IsLocked()

bool ON_ComponentStatus::IsLocked ( ) const

Returns: false if not locked. true otherwise. (ON_ComponentStatus::LOCKED_STATE::not_locked != LockedState())

◆ IsMarked()

bool ON_ComponentStatus::IsMarked ( ON__UINT8  mark_bits) const

Returns: (0==mark_bits) ? RuntimeMark() : (mark_bits == MarkBits()

◆ IsNotClear()

bool ON_ComponentStatus::IsNotClear ( ) const

Returns: True if some setting besides runtime mark is 1 or true. Ignores the runtime mark state. Remarks: The runtime mark setting is ignored by IsNotClear().

◆ IsSelected()

bool ON_ComponentStatus::IsSelected ( ) const

Returns: false The selection state is ON_ComponentState::not_selected. true The selection state is ON_ComponentState::Selected or ON_ComponentState::Selected_pesistent.

◆ IsSelectedPersistent()

bool ON_ComponentStatus::IsSelectedPersistent ( ) const

Returns: false The selection state is ON_ComponentState::not_selected. true The selection state is ON_ComponentState::Selected_pesistent.

◆ LogicalAnd()

static const ON_ComponentStatus ON_ComponentStatus::LogicalAnd ( ON_ComponentStatus  lhs,
ON_ComponentStatus  rhs 
)
static

Returns: A logical and of the status bit in lhs and rhs.

◆ LogicalOr()

static const ON_ComponentStatus ON_ComponentStatus::LogicalOr ( ON_ComponentStatus  lhs,
ON_ComponentStatus  rhs 
)
static

Returns: A logical and of the status bit in lhs and rhs.

◆ MarkBits()

ON__UINT8 ON_ComponentStatus::MarkBits ( ) const

◆ NoEqualStates()

bool ON_ComponentStatus::NoEqualStates ( ON_ComponentStatus  states_filter,
ON_ComponentStatus  comparand 
) const

Parameters: states_filter - [in] If no states are specified, then false is returned. comparand - [in] If a state is set in states_filter, the corresponding state in "this" and comparand will be tested. Returns: True if every tested state in "this" and comparand are different. Remarks: For the purposes of this test, ON_ComponentState::Selected and ON_ComponentState::SelectedPersistent are considered equal.

◆ operator!=() [1/2]

bool ON_ComponentStatus::operator!= ( const ON_ComponentStatus ) const

◆ operator!=() [2/2]

bool ON_ComponentStatus::operator!= ( ON_ComponentStatus  )

◆ operator=()

ON_ComponentStatus& ON_ComponentStatus::operator= ( const ON_ComponentStatus )
default

◆ operator==() [1/2]

bool ON_ComponentStatus::operator== ( const ON_ComponentStatus ) const

Checking multiple state values efficiently

◆ operator==() [2/2]

bool ON_ComponentStatus::operator== ( ON_ComponentStatus  )

◆ RuntimeMark()

bool ON_ComponentStatus::RuntimeMark ( ) const

RuntimeMark

◆ SelectedState()

ON_ComponentState ON_ComponentStatus::SelectedState ( ) const

Selection Returns: ON_ComponentState::not_selected, ON_ComponentState::Selected or ON_ComponentState::Selected_pesistent.

◆ SetDamagedState()

unsigned int ON_ComponentStatus::SetDamagedState ( bool  bIsDamaged)

Damaged Returns: 1 if status changed. 0 if status did not change.

◆ SetDeletedState()

unsigned int ON_ComponentStatus::SetDeletedState ( bool  bIsDeleted)

Deleted Returns: 1 if status changed. 0 if status did not change.

◆ SetHiddenState()

unsigned int ON_ComponentStatus::SetHiddenState ( bool  bIsHidden)

Hidden Returns: 1 if status changed. 0 if status did not change.

◆ SetHighlightedState()

unsigned int ON_ComponentStatus::SetHighlightedState ( bool  bIsHighlighed)

Highlighted Returns: 1 if status changed. 0 if status did not change.

◆ SetLockedState()

unsigned int ON_ComponentStatus::SetLockedState ( bool  bIsLocked)

Locked Returns: 1 if status changed. 0 if status did not change.

◆ SetMarkBits()

ON__UINT8 ON_ComponentStatus::SetMarkBits ( ON__UINT8  bits)

◆ SetRuntimeMark() [1/2]

bool ON_ComponentStatus::SetRuntimeMark ( )

Returns: Input value of RuntimeMark();

◆ SetRuntimeMark() [2/2]

bool ON_ComponentStatus::SetRuntimeMark ( bool  bRuntimeMark)

Returns: Input value of RuntimeMark();

◆ SetSelectedState() [1/2]

unsigned int ON_ComponentStatus::SetSelectedState ( bool  bSelectedState,
bool  bPersistent,
bool  bSynchronizeHighlight 
)

Returns: 1 if status changed. 0 if status did not change.

◆ SetSelectedState() [2/2]

unsigned int ON_ComponentStatus::SetSelectedState ( ON_ComponentState  selected_state,
bool  bSynchronizeHighlight 
)

◆ SetStates()

unsigned int ON_ComponentStatus::SetStates ( ON_ComponentStatus  states_to_set)

Description: If a state is set in states_to_set, the same state is set in "this". Parameters: states_to_set - [in] Returns: 1 if status changed. 0 if status did not change. Remarks: The runtime mark setting cannot be changed using SetStates().

◆ SetStatus()

unsigned int ON_ComponentStatus::SetStatus ( ON_ComponentStatus  status_to_copy)

Description: Sets *this = status_to_copy and returns 1 if a state setting changed. Returns: 1 if status changed. 0 if status did not change. Remarks: The runtime mark setting cannot be changed using SetStatus().

◆ SomeEqualStates()

bool ON_ComponentStatus::SomeEqualStates ( ON_ComponentStatus  states_filter,
ON_ComponentStatus  comparand 
) const

Parameters: states_filter - [in] If no states are specified, then false is returned. comparand - [in] If a state is set in states_filter, the corresponding state in "this" and comparand will be tested. Returns: True if at least one tested state in "this" and comparand are identical. Remarks: For the purposes of this test, ON_ComponentState::Selected and ON_ComponentState::SelectedPersistent are considered equal.

◆ StatusCheck()

static bool ON_ComponentStatus::StatusCheck ( ON_ComponentStatus  candidate,
ON_ComponentStatus  status_pass,
ON_ComponentStatus  status_fail 
)
static

Description: A tool for adding a status check filter. This tool pays attention to RuntimeMark().

Parameters: candidate - [in] pass_bits - [in] fail_bits - [in]

Returns: Checking is performed in the following order and every bit, include the RuntimeMark() bit, are tested.

First: If ON_ComponentStatus::LogicalAnd(candidate,status_pass) has any set bits, then true is returned.

Second: If ON_ComponentStatus::LogicalAnd(candidate,status_fail) has any set bits, then false is returned.

Third: If status_fail has no set bits the true is returned.

Forth: If status_pass has any set bits then false is returned.

Fifth: True is returned.

Examples: StatusCheck(candidate,ON_ComponentStatus::Selected,ON_ComponentStatus::NoneSet) = candidate.>IsSelected().

StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::Selected) = !candidate.>IsSelected().

StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::NoneSet) = true;

StatusCheck(candidate,ON_ComponentStatus::AllSet,ON_ComponentStatus::NoneSet) = true;

StatusCheck(candidate,ON_ComponentStatus::NoneSet,ON_ComponentStatus::AllSet) = candidate.IsClear() && false==candidate.RuntimeMark();

Friends And Related Function Documentation

◆ ON_AggregateComponentStatus

friend class ON_AggregateComponentStatus
friend

Member Data Documentation

◆ AllSet

const ON_ComponentStatus ON_ComponentStatus::AllSet
static

The six bits for SelectedPersistent, Highlighted, Hidden, Locked, and Damaged are set. The two bits for Deleted and RuntimeMark are clear.

◆ Damaged

const ON_ComponentStatus ON_ComponentStatus::Damaged
static

◆ Deleted

const ON_ComponentStatus ON_ComponentStatus::Deleted
static

◆ Hidden

const ON_ComponentStatus ON_ComponentStatus::Hidden
static

◆ Highlighted

const ON_ComponentStatus ON_ComponentStatus::Highlighted
static

◆ Locked

const ON_ComponentStatus ON_ComponentStatus::Locked
static

◆ Marked

const ON_ComponentStatus ON_ComponentStatus::Marked
static

◆ NoneSet

const ON_ComponentStatus ON_ComponentStatus::NoneSet
static

◆ Selected

const ON_ComponentStatus ON_ComponentStatus::Selected
static

◆ SelectedPersistent

const ON_ComponentStatus ON_ComponentStatus::SelectedPersistent
static