ConditionControl
-
class
ConditionControl
: public HPS::Control The ConditionControl class is a smart pointer that is tied to a database object. This class is used to set and unset conditions on a segment. A condition can be used to control when a style is applied, or to control when an included segment is included.
Public Functions
-
ConditionControl &
AddCondition
(char const *in_condition) Adds a condition to the collection of active conditions on this segment.
Parameters: in_condition – the condition to enable. Returns: a reference to this object.
-
ConditionControl
(ConditionControl &&in_that) The move constructor creates a ConditionControl by transferring the underlying impl of the rvalue reference to this ConditionControl thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to a ConditionControl to take the impl from.
-
ConditionControl
(ConditionControl const &in_that) Initializes a control tied to the same object as in_that.
-
explicit
ConditionControl
(SegmentKey &in_seg) Initializes a control tied to the segment in_seg.
-
size_t
GetCount
() const Retrieves the number of conditions set on this segment.
Returns: The number of conditions set on this segment.
-
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.
-
ConditionControl &
operator=
(ConditionControl &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this ConditionControl thereby avoiding a copy.
Parameters: in_that – An rvalue reference to a ConditionControl to take the impl from. Returns: A reference to this ConditionControl.
-
ConditionControl &
operator=
(ConditionControl const &in_that) Share the underlying smart-pointer of the ConditionControl source.
Parameters: in_that – The ConditionControl source of the assignment. Returns: A reference to this ConditionControl.
-
ConditionControl &
SetCondition
(char const *in_condition) Sets a condition as the only active condition on this segment, replacing any existing conditions.
Parameters: in_condition – the condition to enable. Returns: a reference to this object.
-
ConditionControl &
SetConditions
(size_t in_count, UTF8 const in_conditions[]) Sets a collection of conditions as the only active conditions on this segment, replacing any existing conditions.
Parameters: - in_count – the number of conditions in the array.
- in_conditions – An array of conditions to enable.
Returns: a reference to this object.
-
ConditionControl &
SetConditions
(UTF8Array const &in_conditions) Sets a collection of conditions as the only active conditions on this segment, replacing any existing conditions.
Parameters: in_conditions – An array of conditions to enable. Returns: a reference to this object.
-
bool
ShowCondition
(char const *in_condition) const Queries the existence of one condition on this segment.
Parameters: in_condition – The condition in question. Returns: true if the setting is valid, false otherwise.
-
bool
ShowConditions
(UTF8Array &out_conditions) const Shows all conditions on this segment.
Parameters: out_conditions – An array of conditions that are active on the segment. Returns: true if any conditions are set, false otherwise.
-
ConditionControl &
UnsetCondition
(char const *in_condition) Removes a specified condition from the active conditions on this segment.
Parameters: in_condition – The condition to remove. Returns: a reference to this object.
-
ConditionControl &
UnsetEverything
() Unsets all conditions on this segment.
Returns: a reference to this object.
-
~ConditionControl
() Releases a reference to the database object this control is tied to.
-
ConditionControl &