#include <hps.h>

Public Member Functions | |
void | Assign (SelectionResults const &in_that) |
void | Copy (SelectionResults const &in_that) |
bool | Difference (SelectionResults const &in_that) |
bool | Equals (SelectionResults const &in_that) const |
size_t | GetCount () const |
SelectionResultsIterator | GetIterator () const |
Selection::Level | GetSelectionLevel () const |
bool | Intersect (SelectionResults const &in_that) |
HPS::Type | ObjectType () const |
bool | operator!= (SelectionResults const &in_that) const |
SelectionResults & | operator= (SelectionResults &&in_that) |
SelectionResults & | operator= (SelectionResults const &in_that) |
bool | operator== (SelectionResults const &in_that) const |
virtual void | Reset () |
SelectionResults () | |
SelectionResults (SelectionResults const &in_that) | |
SelectionResults (SelectionResults &&in_that) | |
bool | SymmetricDifference (SelectionResults const &in_that) |
bool | Union (SelectionResults const &in_that) |
![]() | |
virtual bool | Empty () const |
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 HPS::Type | Type () const |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::SelectionResults |
![]() | |
static const HPS::Type | staticType = HPS::Type::None |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Detailed Description
The SelectionResults class is a smart pointer to a database object. It is a handle to the results of a selection action and allows iteration over them. When there are no remaining handles to a given selection result, the memory associated with it is freed.
Constructor & Destructor Documentation
◆ SelectionResults() [1/3]
HPS::SelectionResults::SelectionResults | ( | ) |
The default constructor creates an empty SelectionResults object which is not associated with any selection action.
◆ SelectionResults() [2/3]
HPS::SelectionResults::SelectionResults | ( | SelectionResults const & | in_that | ) |
The copy constructor creates a SelectionResults object that shares the underlying smart-pointer of the source SelectionResults.
- Parameters
-
in_that The source SelectionResults to copy.
◆ SelectionResults() [3/3]
HPS::SelectionResults::SelectionResults | ( | SelectionResults && | in_that | ) |
The move constructor creates a SelectionResults by transferring the underlying impl of the rvalue reference to this SelectionResults thereby avoiding a copy and allocation.
- Parameters
-
in_that An rvalue reference to a SelectionResults to take the impl from.
Member Function Documentation
◆ Assign()
void HPS::SelectionResults::Assign | ( | SelectionResults const & | in_that | ) |
Share the underlying smart-pointer of the SelectionResults source.
- Parameters
-
in_that The SelectionResults source of the assignment.
◆ Copy()
void HPS::SelectionResults::Copy | ( | SelectionResults const & | in_that | ) |
Copy the selection results from another SelectionResults object.
- Parameters
-
in_that The SelectionResults source of the copy.
◆ Difference()
bool HPS::SelectionResults::Difference | ( | SelectionResults const & | in_that | ) |
Removes elements from this SelectionResults that also occur in the supplied SelectionResults. This will fail if the SelectionResults selections were performed at different levels (e.g. Entity vs Segment).
- Parameters
-
in_that The SelectionResults to subtract from this object.
- Returns
- true if the operation succeeded, false otherwise.
◆ Equals()
bool HPS::SelectionResults::Equals | ( | SelectionResults const & | in_that | ) | const |
Check if the source SelectionResults is equivalent to this SelectionResults.
- Parameters
-
in_that The source SelectionResults to compare to this SelectionResults.
- Returns
- true if the objects are equivalent, false otherwise.
◆ GetCount()
size_t HPS::SelectionResults::GetCount | ( | ) | const |
Gets the number of items selected when the associated selection action occurred.
- Returns
- Number of items selected when the associated selection action occurred.
◆ GetIterator()
SelectionResultsIterator HPS::SelectionResults::GetIterator | ( | ) | const |
Get an iterator that can be used to iterate through the selection results.
- Returns
- An iterator that can be used to iterate through the selection results.
◆ GetSelectionLevel()
Selection::Level HPS::SelectionResults::GetSelectionLevel | ( | ) | const |
Gets the selection level used when the associated selection action occurred.
- Returns
- The selection level used when the associated selection action occurred.
◆ Intersect()
bool HPS::SelectionResults::Intersect | ( | SelectionResults const & | in_that | ) |
Perform a set intersection of elements in this SelectionResults object with the elements of the supplied SelectionResults. This will fail if the SelectionResults selections were performed at different levels (e.g. Entity vs Segment).
- Parameters
-
in_that The SelectionResults to intersect with this object.
- Returns
- true if the operation succeeded, false otherwise.
◆ ObjectType()
|
inlinevirtual |
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns
- The declared type of the object in question, which may differ from the true, underlying type.
Reimplemented from HPS::Object.
◆ operator!=()
bool HPS::SelectionResults::operator!= | ( | SelectionResults const & | in_that | ) | const |
Check if the source SelectionResults is not equivalent to this SelectionResults.
- Parameters
-
in_that The source SelectionResults to compare to this SelectionResults.
- Returns
- true if the objects are not equivalent, false otherwise.
◆ operator=() [1/2]
SelectionResults& HPS::SelectionResults::operator= | ( | SelectionResults && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this SelectionResults thereby avoiding a copy.
- Parameters
-
in_that An rvalue reference to a SelectionResults to take the impl from.
- Returns
- A reference to this SelectionResults.
◆ operator=() [2/2]
SelectionResults& HPS::SelectionResults::operator= | ( | SelectionResults const & | in_that | ) |
Share the underlying smart-pointer of the SelectionResults source.
- Parameters
-
in_that The SelectionResults source of the assignment.
- Returns
- A reference to this SelectionResults.
◆ operator==()
bool HPS::SelectionResults::operator== | ( | SelectionResults const & | in_that | ) | const |
Check if the source SelectionResults is equivalent to this SelectionResults.
- Parameters
-
in_that The source SelectionResults to compare to this SelectionResults.
- Returns
- true if the objects are equivalent, false otherwise.
◆ Reset()
|
virtual |
Resets this object to its initial, uninitialized state.
Reimplemented from HPS::Object.
◆ SymmetricDifference()
bool HPS::SelectionResults::SymmetricDifference | ( | SelectionResults const & | in_that | ) |
Perform a symmetric difference (similar to XOR) of elements in this SelectionResults object with the elements of the supplied SelectionResults. This will fail if the SelectionResults selections were performed at different levels (e.g. Entity vs Segment). The resulting SelectionResults will be unsorted, even if the sources were sorted.
- Parameters
-
in_that The SelectionResults to take the symmetric difference of with this object.
- Returns
- true if the operation succeeded, false otherwise.
◆ Union()
bool HPS::SelectionResults::Union | ( | SelectionResults const & | in_that | ) |
Perform a set union of elements in this SelectionResults object with the elements of the supplied SelectionResults. This will fail if the SelectionResults selections were performed at different levels (e.g. Entity vs Segment). The resulting SelectionResults will be unsorted, even if the sources were sorted.
- Parameters
-
in_that The SelectionResults to union with this object.
- Returns
- true if the operation succeeded, false otherwise.
The documentation for this class was generated from the following file:
- include/hps.h