Rhino C++ API
8.14
|
#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_ComponentStatus & | operator= (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 |
|
default |
|
default |
|
default |
ON_ComponentStatus::ON_ComponentStatus | ( | ON_ComponentState | state | ) |
Description: Constructs a status with the specified state set.
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.
bool ON_ComponentStatus::ClearRuntimeMark | ( | ) |
Returns: Input value of RuntimeMark();
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().
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().
bool ON_ComponentStatus::IsDamaged | ( | ) | const |
Returns: false if not damaged. true otherwise. (ON_ComponentStatus::DAMAGED_STATE::not_damaged != DamagedState())
bool ON_ComponentStatus::IsDeleted | ( | ) | const |
Returns: false if not hidden. true otherwise. (ON_ComponentStatus::DELETED_STATE::not_deleted != DeletedState())
bool ON_ComponentStatus::IsHidden | ( | ) | const |
Returns: false if not hidden. true otherwise. (ON_ComponentStatus::HIDDEN_STATE::not_hidden != HiddenState())
bool ON_ComponentStatus::IsHighlighted | ( | ) | const |
Returns: false if not highlighted. true otherwise.
bool ON_ComponentStatus::IsLocked | ( | ) | const |
Returns: false if not locked. true otherwise. (ON_ComponentStatus::LOCKED_STATE::not_locked != LockedState())
bool ON_ComponentStatus::IsMarked | ( | ON__UINT8 | mark_bits | ) | const |
Returns: (0==mark_bits) ? RuntimeMark() : (mark_bits == MarkBits()
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().
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.
bool ON_ComponentStatus::IsSelectedPersistent | ( | ) | const |
Returns: false The selection state is ON_ComponentState::not_selected. true The selection state is ON_ComponentState::Selected_pesistent.
|
static |
Returns: A logical and of the status bit in lhs and rhs.
|
static |
Returns: A logical and of the status bit in lhs and rhs.
ON__UINT8 ON_ComponentStatus::MarkBits | ( | ) | const |
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.
bool ON_ComponentStatus::operator!= | ( | const ON_ComponentStatus & | ) | const |
bool ON_ComponentStatus::operator!= | ( | ON_ComponentStatus | ) |
|
default |
bool ON_ComponentStatus::operator== | ( | const ON_ComponentStatus & | ) | const |
Checking multiple state values efficiently
bool ON_ComponentStatus::operator== | ( | ON_ComponentStatus | ) |
bool ON_ComponentStatus::RuntimeMark | ( | ) | const |
RuntimeMark
ON_ComponentState ON_ComponentStatus::SelectedState | ( | ) | const |
Selection Returns: ON_ComponentState::not_selected, ON_ComponentState::Selected or ON_ComponentState::Selected_pesistent.
unsigned int ON_ComponentStatus::SetDamagedState | ( | bool | bIsDamaged | ) |
Damaged Returns: 1 if status changed. 0 if status did not change.
unsigned int ON_ComponentStatus::SetDeletedState | ( | bool | bIsDeleted | ) |
Deleted Returns: 1 if status changed. 0 if status did not change.
unsigned int ON_ComponentStatus::SetHiddenState | ( | bool | bIsHidden | ) |
Hidden Returns: 1 if status changed. 0 if status did not change.
unsigned int ON_ComponentStatus::SetHighlightedState | ( | bool | bIsHighlighed | ) |
Highlighted Returns: 1 if status changed. 0 if status did not change.
unsigned int ON_ComponentStatus::SetLockedState | ( | bool | bIsLocked | ) |
Locked Returns: 1 if status changed. 0 if status did not change.
bool ON_ComponentStatus::SetRuntimeMark | ( | ) |
Returns: Input value of RuntimeMark();
bool ON_ComponentStatus::SetRuntimeMark | ( | bool | bRuntimeMark | ) |
Returns: Input value of RuntimeMark();
unsigned int ON_ComponentStatus::SetSelectedState | ( | bool | bSelectedState, |
bool | bPersistent, | ||
bool | bSynchronizeHighlight | ||
) |
Returns: 1 if status changed. 0 if status did not change.
unsigned int ON_ComponentStatus::SetSelectedState | ( | ON_ComponentState | selected_state, |
bool | bSynchronizeHighlight | ||
) |
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().
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().
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.
|
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();
|
friend |
|
static |
The six bits for SelectedPersistent, Highlighted, Hidden, Locked, and Damaged are set. The two bits for Deleted and RuntimeMark are clear.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |