#include <sprk.h>

Public Types | |
using | const_iterator = HPS::ComponentArray::const_iterator |
using | iterator = HPS::ComponentArray::iterator |
enum | PathType : uint32_t { PathType::Complete, PathType::Unique } |
Public Member Functions | |
ComponentPath & | Append (Component const &in_component) |
ComponentPath & | Append (ComponentPath const &in_path) |
ComponentPath & | Append (ComponentArray const &in_components) |
Component & | At (size_t in_index) |
Component const & | At (size_t in_index) const |
Component & | Back () |
Component const & | Back () const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
ComponentPath () | |
ComponentPath (ComponentArray const &in_components) | |
ComponentPath (size_t in_count, Component const in_components[]) | |
ComponentPath (ComponentPath const &in_that) | |
ComponentPath (ComponentPath &&in_that) | |
bool | Empty () const |
iterator | end () |
const_iterator | end () const |
bool | Equals (ComponentPath const &in_that) const |
Component & | Front () |
Component const & | Front () const |
ComponentArray | GetComponents () const |
KeyPathArray | GetKeyPaths () const |
KeyPathArray | GetKeyPaths (Canvas const &in_canvas, size_t in_layer=0) const |
void | Hide (Canvas const &in_canvas, size_t in_layer=0) |
void | Highlight (Canvas const &in_canvas, HighlightOptionsKit const &in_options, bool in_remove_existing=true) const |
void | Highlight (Canvas const &in_canvas, size_t in_layer, HighlightOptionsKit const &in_options, bool in_remove_existing=true) const |
void | Insert (size_t in_index, Component const &in_item) |
bool | IsHidden (Canvas const &in_canvas, size_t in_layer=0) |
void | Isolate (Canvas const &in_canvas, size_t in_layer=0, Component::Visibility in_subtree_visibility=Component::Visibility::PreserveNone) |
HPS::Type | ObjectType () const |
bool | operator!= (ComponentPath const &in_that) const |
ComponentPath & | operator+= (Component const &in_component) |
ComponentPath & | operator+= (ComponentPath const &in_path) |
ComponentPath & | operator+= (ComponentArray const &in_components) |
ComponentPath & | operator= (ComponentPath &&in_that) |
ComponentPath & | operator= (ComponentPath const &in_that) |
ComponentPath & | operator= (ComponentArray const &in_path) |
bool | operator== (ComponentPath const &in_that) const |
Component | PopBack () |
Component | PopFront () |
ComponentPath & | PushBack (Component const &in_component) |
ComponentPath & | PushBack (ComponentPath const &in_path) |
ComponentPath & | PushBack (ComponentArray const &in_components) |
ComponentPath & | PushFront (Component const &in_component) |
void | Remove (Component const &in_item) |
void | Remove (size_t in_index) |
ComponentPath | Reverse () const |
void | Set (ComponentPath const &in_that) |
ComponentPath & | SetComponents (ComponentArray const &in_components) |
ComponentPath & | SetComponents (size_t in_count, Component const in_components[]) |
void | Show (Canvas const &in_canvas, size_t in_layer=0, Component::Visibility in_subtree_visibility=Component::Visibility::PreserveNone) |
size_t | Size () const |
void | Unhighlight (Canvas const &in_canvas, HighlightOptionsKit const &in_options=HighlightOptionsKit()) const |
void | Unhighlight (Canvas const &in_canvas, size_t in_layer, HighlightOptionsKit const &in_options=HighlightOptionsKit()) const |
virtual | ~ComponentPath () |
![]() | |
Sprocket (Sprocket &&in_that) | |
![]() | |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
virtual HPS::Type | Type () const |
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) |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::ComponentPath |
![]() | |
static const HPS::Type | staticType = HPS::Type::None |
Detailed Description
The ComponentPath contains an array of components, organized from leaf to root. It allows the user to perform queries and operations along that path.
Member Enumeration Documentation
|
strong |
Enumerates the types of ComponentPaths.
Enumerator | |
---|---|
Complete |
The ComponentPath contains all components between leaf and root. |
Unique |
The ComponentPath contains only components which are unique to this request, omitting ambiguous entries. |
Constructor & Destructor Documentation
HPS::ComponentPath::ComponentPath | ( | ) |
Creates an uninitialized ComponentPath that refers to no database objects.
HPS::ComponentPath::ComponentPath | ( | ComponentArray const & | in_components | ) |
Creates a new ComponentPath object based on the supplied path.
- Parameters
-
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.
- Parameters
-
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 ComponentPath.
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.
- Parameters
-
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.
Member Function Documentation
ComponentPath& HPS::ComponentPath::Append | ( | Component const & | in_component | ) |
Appends the supplied Component into this object. Same as operator+= function.
- Parameters
-
in_component The Component to be appended to this.
- Returns
- A reference to this object.
- Deprecated:
- This function exists for compatibility. Use ComponentPath::PushBack instead.
ComponentPath& HPS::ComponentPath::Append | ( | ComponentPath const & | in_path | ) |
Appends the supplied key into this object. Same as operator+= function.
- Parameters
-
in_path The ComponentPath to be appended to this.
- Returns
- A reference to this object.
- Deprecated:
- This function exists for compatibility. Use ComponentPath::PushBack instead.
ComponentPath& HPS::ComponentPath::Append | ( | ComponentArray const & | in_components | ) |
Appends the supplied key into this object. Same as operator+= function.
- Parameters
-
in_components The ComponentArray to be appended to this.
- Returns
- A reference to this object.
- Deprecated:
- This function exists for compatibility. Use ComponentPath::PushBack instead.
|
virtual |
Indicates whether this ComponentPath is empty.
- Returns
- true if no components are set on the path, false otherwise.
Reimplemented from HPS::Object.
bool HPS::ComponentPath::Equals | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is equivalent to this object.
- Parameters
-
in_that The source ComponentPath to compare to this object.
- Returns
- true if the objects are equivalent, false otherwise.
ComponentArray HPS::ComponentPath::GetComponents | ( | ) | const |
Gets the components defining this ComponentPath.
- Returns
- The components defining this ComponentPath.
KeyPathArray HPS::ComponentPath::GetKeyPaths | ( | ) | const |
Gets the KeyPath objects corresponding to this ComponentPath. These key paths will include all possible paths which include the path components and all Canvas, Layout and View paths which include the Model which contains the path components.
- Returns
- All KeyPath objects for this ComponentPath.
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.
- Returns
- The KeyPath objects for this ComponentPath which are included by the specified Canvas and layer.
void HPS::ComponentPath::Hide | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 |
||
) |
Hides this ComponentPath under the given Canvas in the specified layer.
- Parameters
-
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.
- Parameters
-
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.
- Parameters
-
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.
- Parameters
-
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.
- Returns
- true if this path is hidden, false otherwise.
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.
- Parameters
-
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.
- Parameters
-
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.
bool HPS::ComponentPath::operator!= | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is not equivalent to this object.
- Parameters
-
in_that The source ComponentPath to compare to this object.
- Returns
- true if the objects are not equivalent, false otherwise.
ComponentPath& HPS::ComponentPath::operator+= | ( | Component const & | in_component | ) |
Appends the supplied Component into this object. Same as Append function.
- Parameters
-
in_key The key to be appended to this.
- Returns
- A reference to this object.
ComponentPath& HPS::ComponentPath::operator+= | ( | ComponentPath const & | in_path | ) |
Appends the supplied ComponentPath into this object. Same as Append function.
- Parameters
-
in_key_path The ComponentPath to be appended to this.
- Returns
- A reference to this object.
ComponentPath& HPS::ComponentPath::operator+= | ( | ComponentArray const & | in_components | ) |
Appends the supplied ComponentArray into this object. Same as Append function.
- Parameters
-
in_components The ComponentArray to be appended to this.
- Returns
- A reference to this object.
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.
- Parameters
-
in_that An rvalue reference to a ComponentPath to take the impl from.
- Returns
- A reference to this ComponentPath.
ComponentPath& HPS::ComponentPath::operator= | ( | ComponentPath const & | in_that | ) |
Copies the supplied path into this object.
- Parameters
-
in_that The source of the copy.
- Returns
- A reference to this object.
ComponentPath& HPS::ComponentPath::operator= | ( | ComponentArray const & | in_path | ) |
Copies an array of components into this object.
- Parameters
-
in_path The source array, assumed to be arranged from leaf to root.
- Returns
- A reference to this object.
bool HPS::ComponentPath::operator== | ( | ComponentPath const & | in_that | ) | const |
Check if the source ComponentPath is equivalent to this object.
- Parameters
-
in_that The source ComponentPath to compare to this object.
- Returns
- true if the objects are equivalent, false otherwise.
ComponentPath& HPS::ComponentPath::PushBack | ( | ComponentPath const & | in_path | ) |
Appends the supplied key into this object. Same as operator+= function.
- Parameters
-
in_path The ComponentPath to be appended to this.
- Returns
- A reference to this object.
ComponentPath& HPS::ComponentPath::PushBack | ( | ComponentArray const & | in_components | ) |
Appends the supplied key into this object. Same as operator+= function.
- Parameters
-
in_components The ComponentArray to be appended to this.
- Returns
- A reference to this object.
void HPS::ComponentPath::Set | ( | ComponentPath const & | in_that | ) |
Copies the supplied path into this object.
- Parameters
-
in_that The source of the copy.
ComponentPath& HPS::ComponentPath::SetComponents | ( | ComponentArray const & | in_components | ) |
Copies an array of components into this object.
- Parameters
-
in_components The source array, assumed to be arranged from leaf to root.
- Returns
- A reference to this object.
ComponentPath& HPS::ComponentPath::SetComponents | ( | size_t | in_count, |
Component const | in_components[] | ||
) |
Copies an array of components into this object.
- Parameters
-
in_count the number of components in the array. in_components The source array, assumed to arranged from leaf to root.
- Returns
- A reference to this object.
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.
- Parameters
-
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.
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.
- Parameters
-
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.
The documentation for this class was generated from the following file:
- include/sprk.h