The ComponentPath contains an array of components, organized from leaf to root. More...
#include <sprk.h>
Public Member Functions | |
ComponentPath () | |
Creates an uninitialized Component path that refers to no database objects. More... | |
ComponentPath (ComponentArray const &in_components) | |
Creates a new ComponentPath object based on the supplied path. More... | |
ComponentPath (size_t in_count, Component const in_components[]) | |
Creates a new ComponentPath object based on the supplied path. More... | |
ComponentPath (ComponentPath const &in_that) | |
Copies in_that into this component path. More... | |
ComponentPath (ComponentPath &&in_that) | |
The move constructor creates a ComponentPath by transferring the underlying impl of the rvalue reference to this ComponentPath thereby avoiding a copy and allocation. More... | |
ComponentPath & | operator= (ComponentPath &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this ComponentPath thereby avoiding a copy. More... | |
virtual | ~ComponentPath () |
Releases a reference to the database object this object is tied to. More... | |
HPS::Type | ObjectType () const |
bool | Empty () const |
Indicates whether this ComponentPath is empty. More... | |
ComponentPath & | operator+= (Component const &in_component) |
Appends the supplied Component into this object. More... | |
ComponentPath & | operator+= (ComponentPath const &in_path) |
Appends the supplied ComponentPath into this object. More... | |
ComponentPath & | operator+= (ComponentArray const &in_components) |
Appends the supplied ComponentArray into this object. More... | |
ComponentPath & | Append (Component const &in_component) |
Appends the supplied Component into this object. More... | |
ComponentPath & | Append (ComponentPath const &in_path) |
Appends the supplied key into this object. More... | |
ComponentPath & | Append (ComponentArray const &in_components) |
Appends the supplied key into this object. More... | |
ComponentPath & | operator= (ComponentPath const &in_that) |
Copies the supplied path into this object. More... | |
ComponentPath & | operator= (ComponentArray const &in_path) |
Copies an array of components into this object. More... | |
void | Set (ComponentPath const &in_that) |
Copies the supplied path into this object. More... | |
bool | Equals (ComponentPath const &in_that) const |
Check if the source ComponentPath is equivalent to this object. More... | |
bool | operator!= (ComponentPath const &in_that) const |
Check if the source ComponentPath is not equivalent to this object. More... | |
bool | operator== (ComponentPath const &in_that) const |
Check if the source ComponentPath is equivalent to this object. More... | |
ComponentPath & | SetComponents (ComponentArray const &in_components) |
Copies an array of components into this object. More... | |
ComponentPath & | SetComponents (size_t in_count, Component const in_components[]) |
Copies an array of components into this object. More... | |
ComponentArray | GetComponents () const |
Gets the components defining this ComponentPath. More... | |
KeyPathArray | GetKeyPaths () const |
Gets the KeyPath objects corresponding to this ComponentPath. More... | |
KeyPathArray | GetKeyPaths (Canvas const &in_canvas, size_t in_layer=0) const |
Gets the KeyPath objects corresponding to this ComponentPath which are included by the specified Canvas and layer. More... | |
void | Highlight (Canvas const &in_canvas, HighlightOptionsKit const &in_options, bool in_remove_existing=true) const |
Highlights this ComponentPath with the provided options under the given Canvas in layer zero. More... | |
void | Highlight (Canvas const &in_canvas, size_t in_layer, HighlightOptionsKit const &in_options, bool in_remove_existing=true) const |
Highlights this ComponentPath with the provided options under the given Canvas in the specified layer. More... | |
void | Unhighlight (Canvas const &in_canvas, HighlightOptionsKit const &in_options=HighlightOptionsKit()) const |
Unhighlights this ComponentPath with the provided options under the given Canvas in layer zero. More... | |
void | Unhighlight (Canvas const &in_canvas, size_t in_layer, HighlightOptionsKit const &in_options=HighlightOptionsKit()) const |
Unhighlights this ComponentPath with the provided options under the given Canvas in the specified layer. More... | |
void | Hide (Canvas const &in_canvas, size_t in_layer=0) |
Hides this ComponentPath under the given Canvas in the specified layer. More... | |
void | Show (Canvas const &in_canvas, size_t in_layer=0, Component::Visibility in_subtree_visibility=Component::Visibility::PreserveNone) |
Shows this ComponentPath under the given Canvas in the specified layer. More... | |
bool | IsHidden (Canvas const &in_canvas, size_t in_layer=0) |
Indicates whether this ComponentPath under the given Canvas in the specified layer is hidden. More... | |
void | Isolate (Canvas const &in_canvas, size_t in_layer=0, Component::Visibility in_subtree_visibility=Component::Visibility::PreserveNone) |
Shows only this ComponentPath and hides all other Component objects under the given Canvas in the specified layer. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static void | Isolate (HPS::ComponentPathArray &in_components_to_be_isolated, Canvas const &in_canvas, size_t in_layer=0, Component::Visibility in_subtree_visibility=Component::Visibility::PreserveNone) |
Shows only the objects in the supplied ComponentPathArray and hides all other Component objects under the given Canvas in the specified layer. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::ComponentPath |
The ComponentPath contains an array of components, organized from leaf to root.
It allows the user to perform queries and operations along that path.
HPS::ComponentPath::ComponentPath | ( | ) |
Creates an uninitialized Component path that refers to no database objects.
HPS::ComponentPath::ComponentPath | ( | ComponentArray const & | in_components | ) |
Creates a new ComponentPath object based on the supplied path.
in_components | An array of components arranged from leaf to root. |
HPS::ComponentPath::ComponentPath | ( | size_t | in_count, |
Component const | in_components[] | ||
) |
Creates a new ComponentPath object based on the supplied path.
in_count | The number of keys in the array. |
in_components | An array of components arranged from leaf to root. |
HPS::ComponentPath::ComponentPath | ( | ComponentPath const & | in_that | ) |
Copies in_that into this component path.
HPS::ComponentPath::ComponentPath | ( | ComponentPath && | in_that | ) |
The move constructor creates a ComponentPath by transferring the underlying impl of the rvalue reference to this ComponentPath thereby avoiding a copy and allocation.
in_that | An rvalue reference to a ComponentPath to take the impl from. |
|
virtual |
Releases a reference to the database object this object is tied to.
ComponentPath& HPS::ComponentPath::Append | ( | Component const & | in_component | ) |
ComponentPath& HPS::ComponentPath::Append | ( | ComponentPath const & | in_path | ) |
Appends the supplied key into this object.
Same as operator+= function.
in_path | The ComponentPath to be appended to this. |
ComponentPath& HPS::ComponentPath::Append | ( | ComponentArray const & | in_components | ) |
Appends the supplied key into this object.
Same as operator+= function.
in_components | The ComponentArray to be appended to this. |
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
|
virtual |
Indicates whether this ComponentPath is empty.
Reimplemented from HPS::Object.
bool HPS::ComponentPath::Equals | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is equivalent to this object.
in_that | The source ComponentPath to compare to this object. |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
ComponentArray HPS::ComponentPath::GetComponents | ( | ) | const |
Gets the components defining this ComponentPath.
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
KeyPathArray HPS::ComponentPath::GetKeyPaths | ( | ) | const |
KeyPathArray HPS::ComponentPath::GetKeyPaths | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 |
||
) | const |
Gets the KeyPath objects corresponding to this ComponentPath which are included by the specified Canvas and layer.
|
inherited |
void HPS::ComponentPath::Hide | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 |
||
) |
Hides this ComponentPath under the given Canvas in the specified layer.
in_canvas | The Canvas in which to hide the ComponentPath. |
in_layer | The layer under the provided Canvas in which to hide the ComponentPath. |
void HPS::ComponentPath::Highlight | ( | Canvas const & | in_canvas, |
HighlightOptionsKit const & | in_options, | ||
bool | in_remove_existing = true |
||
) | const |
Highlights this ComponentPath with the provided options under the given Canvas in layer zero.
in_canvas | The Canvas in which to perform the highlight. |
in_options | The options to use to perform the highlight. |
in_remove_existing | Indicates whether this highlight should flush existing highlights at the specified path for the desired overlay type. If HPS::ComponentPath::Isolate(), HPS::ComponentPath::Hide(), or HPS::ComponentPath::Show() have been called on this ComponentPath, in_remove_existing should be set to false so that it doesn't override those visibility states. |
void HPS::ComponentPath::Highlight | ( | Canvas const & | in_canvas, |
size_t | in_layer, | ||
HighlightOptionsKit const & | in_options, | ||
bool | in_remove_existing = true |
||
) | const |
Highlights this ComponentPath with the provided options under the given Canvas in the specified layer.
in_canvas | The Canvas in which to perform the highlight. |
in_layer | The layer under the provided Canvas in which to perform the highlight. |
in_options | The options to use to perform the highlight. If HPS::ComponentPath::Isolate(), HPS::ComponentPath::Hide(), or HPS::ComponentPath::Show() have been called on this ComponentPath, in_remove_existing should be set to false so that it doesn't override those visibility states. |
bool HPS::ComponentPath::IsHidden | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 |
||
) |
Indicates whether this ComponentPath under the given Canvas in the specified layer is hidden.
Note that even if a path is hidden, it's possible that paths descending from this path may not be hidden.
in_canvas | The Canvas in which to check whether the specified path is hidden. |
in_layer | The layer under the provided Canvas in which to check whether the specified path is hidden. |
void HPS::ComponentPath::Isolate | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 , |
||
Component::Visibility | in_subtree_visibility = Component::Visibility::PreserveNone |
||
) |
Shows only this ComponentPath and hides all other Component objects under the given Canvas in the specified layer.
As this is implemented using a style applied with Drawing::Overlay::OverlayWithZ, a future highlight of this isolated ComponentPath must be applied with Drawing::Overlay::OverlayWithZ or Drawing::Overlay::Overlay so that the highlight appears on top of the isolated ComponentPath.
in_canvas | The Canvas in which to isolate the ComponentPath. |
in_layer | The layer under the provided Canvas in which to isolate the ComponentPath. |
in_subtree_visibility | Dictates how Isolate will interact with the visibility of components in the tree under this ComponentPath. |
|
static |
Shows only the objects in the supplied ComponentPathArray and hides all other Component objects under the given Canvas in the specified layer.
As this is implemented using a style applied with Drawing::Overlay::OverlayWithZ, a future highlight of any ComponentPath in the supplied ComponentPathArray must be applied with Drawing::Overlay::OverlayWithZ or Drawing::Overlay::Overlay so that the highlight appears on top of the isolated ComponentPath.
in_components_to_be_isolated | The ComponentPathArray to isolate. |
in_canvas | The Canvas in which to isolate the ComponentPath. |
in_layer | The layer under the provided Canvas in which to isolate the ComponentPath. |
in_subtree_visibility | Dictates how Isolate will interact with the visibility of components in the tree under this ComponentPath. |
|
inlinevirtual |
bool HPS::ComponentPath::operator!= | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is not equivalent to this object.
in_that | The source ComponentPath to compare to this object. |
ComponentPath& HPS::ComponentPath::operator+= | ( | Component const & | in_component | ) |
Appends the supplied Component into this object.
Same as Append function.
in_key | The key to be appended to this. |
ComponentPath& HPS::ComponentPath::operator+= | ( | ComponentPath const & | in_path | ) |
Appends the supplied ComponentPath into this object.
Same as Append function.
in_key_path | The ComponentPath to be appended to this. |
ComponentPath& HPS::ComponentPath::operator+= | ( | ComponentArray const & | in_components | ) |
Appends the supplied ComponentArray into this object.
Same as Append function.
in_components | The ComponentArray to be appended to this. |
ComponentPath& HPS::ComponentPath::operator= | ( | ComponentPath && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this ComponentPath thereby avoiding a copy.
in_that | An rvalue reference to a ComponentPath to take the impl from. |
ComponentPath& HPS::ComponentPath::operator= | ( | ComponentPath const & | in_that | ) |
Copies the supplied path into this object.
in_that | The source of the copy. |
ComponentPath& HPS::ComponentPath::operator= | ( | ComponentArray const & | in_path | ) |
Copies an array of components into this object.
in_path | The source array, assumed to be arranged from leaf to root. |
bool HPS::ComponentPath::operator== | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is equivalent to this object.
in_that | The source ComponentPath to compare to this object. |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::ComponentPath::Set | ( | ComponentPath const & | in_that | ) |
Copies the supplied path into this object.
in_that | The source of the copy. |
ComponentPath& HPS::ComponentPath::SetComponents | ( | ComponentArray const & | in_components | ) |
Copies an array of components into this object.
in_components | The source array, assumed to be arranged from leaf to root. |
ComponentPath& HPS::ComponentPath::SetComponents | ( | size_t | in_count, |
Component const | in_components[] | ||
) |
Copies an array of components into this object.
in_count | the number of components in the array. |
in_components | The source array, assumed to arranged from leaf to root. |
void HPS::ComponentPath::Show | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 , |
||
Component::Visibility | in_subtree_visibility = Component::Visibility::PreserveNone |
||
) |
Shows this ComponentPath under the given Canvas in the specified layer.
in_canvas | The Canvas in which to show the ComponentPath. |
in_layer | The layer under the provided Canvas in which to show the ComponentPath. |
in_subtree_visibility | Dictates how Show will interact with the visibility of components in the tree under this ComponentPath. |
|
virtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented in HPS::UpdateOptionsControl, HPS::HighlightControl, HPS::SelectionOptionsControl, HPS::OffScreenWindowOptionsControl, HPS::ApplicationWindowOptionsControl, HPS::StandAloneWindowOptionsControl, HPS::AttributeLockControl, HPS::WindowInfoControl, HPS::DebuggingControl, HPS::SubwindowControl, HPS::ContourLineControl, HPS::VisualEffectsControl, HPS::TransformMaskControl, HPS::PostProcessEffectsControl, HPS::DrawingAttributeControl, HPS::HiddenLineAttributeControl, HPS::PerformanceControl, HPS::NURBSSurfaceAttributeControl, HPS::ConditionControl, HPS::StyleControl, HPS::PortfolioControl, HPS::MaterialMappingControl, HPS::TextureMatrixControl, HPS::ModellingMatrixControl, HPS::CurveAttributeControl, HPS::EdgeAttributeControl, HPS::LineAttributeControl, HPS::TextAttributeControl, HPS::CuttingSectionAttributeControl, HPS::CylinderAttributeControl, HPS::LightingAttributeControl, HPS::SphereAttributeControl, HPS::MarkerAttributeControl, HPS::CullingControl, HPS::ColorInterpolationControl, HPS::TransparencyControl, HPS::SelectabilityControl, HPS::CameraControl, HPS::VisibilityControl, HPS::BoundingControl, HPS::Kit, and HPS::Control.
void HPS::ComponentPath::Unhighlight | ( | Canvas const & | in_canvas, |
HighlightOptionsKit const & | in_options = HighlightOptionsKit() |
||
) | const |
Unhighlights this ComponentPath with the provided options under the given Canvas in layer zero.
in_canvas | The Canvas in which to perform the unhighlight. |
in_options | The options to use to perform the unhighlight. |
void HPS::ComponentPath::Unhighlight | ( | Canvas const & | in_canvas, |
size_t | in_layer, | ||
HighlightOptionsKit const & | in_options = HighlightOptionsKit() |
||
) | const |
Unhighlights this ComponentPath with the provided options under the given Canvas in the specified layer.
|
static |