SelectionResults
-
class HPS::SelectionResults : public HPS::Object
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.
Public Functions
-
void Assign(SelectionResults const &in_that)
Share the underlying smart-pointer of the SelectionResults source.
- Parameters
in_that – The SelectionResults source of the assignment.
-
void Copy(SelectionResults const &in_that)
Copy the selection results from another SelectionResults object.
- Parameters
in_that – The SelectionResults source of the copy.
-
bool 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.
-
bool 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.
-
size_t 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.
-
SelectionResultsIterator 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.
-
Selection::Level GetSelectionLevel() const
Gets the selection level used when the associated selection action occurred.
- Returns
The selection level used when the associated selection action occurred.
-
bool 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.
-
inline virtual HPS::Type ObjectType() const
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.
-
bool 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.
-
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.
-
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.
-
bool 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.
-
virtual void Reset()
Resets this object to its initial, uninitialized state.
-
SelectionResults()
The default constructor creates an empty SelectionResults object which is not associated with any selection action.
-
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.
-
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.
-
bool 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.
-
bool 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.
-
~SelectionResults()
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::SelectionResults
-
void Assign(SelectionResults const &in_that)