#include <hps.h>

Public Member Functions | |
ConditionControl & | AddCondition (char const *in_condition) |
ConditionControl (SegmentKey &in_seg) | |
ConditionControl (ConditionControl const &in_that) | |
ConditionControl (ConditionControl &&in_that) | |
size_t | GetCount () const |
HPS::Type | ObjectType () const |
ConditionControl & | operator= (ConditionControl &&in_that) |
ConditionControl & | operator= (ConditionControl const &in_that) |
ConditionControl & | SetCondition (char const *in_condition) |
ConditionControl & | SetConditions (UTF8Array const &in_conditions) |
ConditionControl & | SetConditions (size_t in_count, UTF8 const in_conditions[]) |
bool | ShowCondition (char const *in_condition) const |
bool | ShowConditions (UTF8Array &out_conditions) const |
virtual HPS::Type | Type () const |
ConditionControl & | UnsetCondition (char const *in_condition) |
ConditionControl & | UnsetEverything () |
~ConditionControl () | |
![]() | |
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 void | Reset () |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::ConditionControl |
![]() | |
static const HPS::Type | staticType = HPS::Type::Control |
![]() | |
static const HPS::Type | staticType = HPS::Type::None |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
Control (Control &&in_that) | |
Control & | operator= (Control &&in_that) |
Detailed Description
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.
Constructor & Destructor Documentation
|
explicit |
Initializes a control tied to the segment in_seg.
HPS::ConditionControl::ConditionControl | ( | ConditionControl const & | in_that | ) |
Initializes a control tied to the same object as in_that.
HPS::ConditionControl::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.
HPS::ConditionControl::~ConditionControl | ( | ) |
Releases a reference to the database object this control is tied to.
Member Function Documentation
ConditionControl& HPS::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.
size_t HPS::ConditionControl::GetCount | ( | ) | const |
Retrieves the number of conditions set on this segment.
- Returns
- The number of conditions set on this segment.
ConditionControl& HPS::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& HPS::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& HPS::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& HPS::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.
ConditionControl& HPS::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.
bool HPS::ConditionControl::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 HPS::ConditionControl::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.
|
inlinevirtual |
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.
- Returns
- The true type of the object in question.
Reimplemented from HPS::Control.
ConditionControl& HPS::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& HPS::ConditionControl::UnsetEverything | ( | ) |
Unsets all conditions on this segment.
- Returns
- a reference to this object.
The documentation for this class was generated from the following file:
- include/hps.h