#include <hps.h>

Inheritance diagram for HPS::StyleKey:
HPS::Key HPS::Object

Public Member Functions

HPS::Type ObjectType () const
 
StyleKeyoperator= (StyleKey const &other)
 
StyleKeyoperator= (StyleKey &&in_that)
 
StyleKeySetConditionalExpression (ConditionalExpression const &in_conditional)
 
StyleKeySetFilter (AttributeLock::Type in_type)
 
StyleKeySetFilter (size_t in_count, AttributeLock::Type const in_types[])
 
StyleKeySetFilter (AttributeLockTypeArray const &in_types)
 
bool ShowConditionalExpression (ConditionalExpression &out_conditional) const
 
bool ShowFilter (AttributeLockTypeArray &out_types) const
 
bool ShowFilter (HPS::AttributeLock::Type in_type) const
 
bool ShowSource (Style::Type &out_type, SegmentKey &out_segment, UTF8 &out_name) const
 
 StyleKey ()
 
 StyleKey (Key const &in_that)
 
 StyleKey (StyleKey const &in_that)
 
 StyleKey (StyleKey &&in_that)
 
StyleKeyUnsetConditionalExpression ()
 
StyleKeyUnsetFilter (AttributeLock::Type in_type)
 
StyleKeyUnsetFilter (size_t in_count, AttributeLock::Type const in_types[])
 
StyleKeyUnsetFilter (AttributeLockTypeArray const &in_types)
 
- Public Member Functions inherited from HPS::Key
virtual void Assign (Key const &in_that)
 
Key CopyTo (SegmentKey const &in_destination) const
 
void Delete ()
 
bool Equals (Key const &in_that) const
 
size_t GetHash () const
 
bool HasOwner () const
 
 Key ()
 
 Key (Key const &in_that)
 
 Key (Control const &in_control)
 
 Key (Key &&in_that)
 
void MoveTo (SegmentKey const &in_new_owner)
 
bool operator!= (Key const &in_that) const
 
Keyoperator= (Key &&in_that)
 
Keyoperator= (Key const &in_that)
 
bool operator== (Key const &in_that) const
 
SegmentKey Owner () const
 
SegmentKey Up () const
 
virtual ~Key ()
 
- Public Member Functions inherited from HPS::Object
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)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::StyleKey
 
- Static Public Attributes inherited from HPS::Key
static const HPS::Type staticType = HPS::Type::Key
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The StyleKey class is a smart pointer to a database object. It is a handle to a style key created by StyleControl::PushSegment.

Constructor & Destructor Documentation

◆ StyleKey() [1/4]

HPS::StyleKey::StyleKey ( )

The default constructor creates an uninitialized StyleKey object. The Type() function will return Type::None.

◆ StyleKey() [2/4]

HPS::StyleKey::StyleKey ( Key const &  in_that)
explicit

This constructor creates an StyleKey object that shares the underlying smart-pointer of the source Key. The copy will only be successful if the source key is really an upcast of a style key. Otherwise the copy will fail and the resulting StyleKey will be invalid.

Parameters
in_keyThe source Key to copy.

◆ StyleKey() [3/4]

HPS::StyleKey::StyleKey ( StyleKey const &  in_that)

The copy constructor creates a StyleKey object that shares the underlying smart-pointer of the source StyleKey.

Parameters
in_thatThe source StyleKey to copy.

◆ StyleKey() [4/4]

HPS::StyleKey::StyleKey ( StyleKey &&  in_that)

The move constructor creates a StyleKey by transferring the underlying impl of the rvalue reference to this StyleKey thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a StyleKey to take the impl from.

Member Function Documentation

◆ ObjectType()

HPS::Type HPS::StyleKey::ObjectType ( ) const
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::Key.

◆ operator=() [1/2]

StyleKey& HPS::StyleKey::operator= ( StyleKey const &  other)

Associate this StyleKey with the same underlying impl as the source StyleKey.

Parameters
in_thatThe source StyleKey for the assignment.
Returns
A reference to this StyleKey.

◆ operator=() [2/2]

StyleKey& HPS::StyleKey::operator= ( StyleKey &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this StyleKey thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a StyleKey to take the impl from.
Returns
A reference to this StyleKey.

◆ SetConditionalExpression()

StyleKey& HPS::StyleKey::SetConditionalExpression ( ConditionalExpression const &  in_conditional)

Sets a conditional expression on this StyleKey. This will either make an unconditional style into a conditional style, or modify the condition for an existing conditional style. The target segment referenced by this style will only be styled in if a condition satisfying the given conditional expression is set above this style in the tree.

Parameters
in_conditionalThe conditional expression for this StyleKey.
Returns
A reference to this StyleKey.
See also
SegmentKey::SetCondition
ConditionControl::SetCondition
ConditionControl::AddCondition

◆ SetFilter() [1/3]

StyleKey& HPS::StyleKey::SetFilter ( AttributeLock::Type  in_type)

Sets an attribute filter on this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_typeThe attribute filter to set for this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::UnsetFilter
StyleKey::ShowFilter

◆ SetFilter() [2/3]

StyleKey& HPS::StyleKey::SetFilter ( size_t  in_count,
AttributeLock::Type const  in_types[] 
)

Sets an array of attribute filters on this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_countThe size of the attribute filter array.
in_typesThe array of attribute filters to set for this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::UnsetFilter
StyleKey::ShowFilter

◆ SetFilter() [3/3]

StyleKey& HPS::StyleKey::SetFilter ( AttributeLockTypeArray const &  in_types)

Sets an array of attribute filters on this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_typesThe array of attribute filters to set for this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::UnsetFilter
StyleKey::ShowFilter

◆ ShowConditionalExpression()

bool HPS::StyleKey::ShowConditionalExpression ( ConditionalExpression out_conditional) const

Shows the conditional expression for this StyleKey.

Parameters
out_conditionalThe conditional expression for this StyleKey.
Returns
true if a conditional expression is set on this StyleKey, false otherwise.

◆ ShowFilter() [1/2]

bool HPS::StyleKey::ShowFilter ( AttributeLockTypeArray out_types) const

Shows an array of the current attribute filters on this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
out_typesThe array of attribute filters currently set on this StyleKey.
Returns
true if there are attribute filters, false otherwise.
See also
StyleKey::SetFilter
StyleKey::UnsetFilter

◆ ShowFilter() [2/2]

bool HPS::StyleKey::ShowFilter ( HPS::AttributeLock::Type  in_type) const

Tests if a specific attribute filter is set on this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_typeThe attribute filter to test on this StyleKey.
Returns
true if the specified atribute filter is active on this StyleKey, false otherwise.
See also
StyleKey::SetFilter
StyleKey::UnsetFilter

◆ ShowSource()

bool HPS::StyleKey::ShowSource ( Style::Type out_type,
SegmentKey out_segment,
UTF8 out_name 
) const

Shows the source for this StyleKey.

Parameters
out_typeThe type of source for this StyleKey. This field indicates which of the following arguments are valid.
out_segmentThe segment source for this StyleKey. This is only valid if out_type is Style::Type::Segment.
out_nameThe name source for this StyleKey. This is only valid if out_type is Style::Type::Named.
Returns
true if there is a source for this StyleKey, false otherwise.

◆ UnsetConditionalExpression()

StyleKey& HPS::StyleKey::UnsetConditionalExpression ( )

Removes the conditional expression on this StyleKey. This will turn a conditional style into an unconditional style.

Returns
A reference to this StyleKey.

◆ UnsetFilter() [1/3]

StyleKey& HPS::StyleKey::UnsetFilter ( AttributeLock::Type  in_type)

Removes an attribute filter from this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_typeThe attribute filter to remove from this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::SetFilter
StyleKey::ShowFilter

◆ UnsetFilter() [2/3]

StyleKey& HPS::StyleKey::UnsetFilter ( size_t  in_count,
AttributeLock::Type const  in_types[] 
)

Removes an array of attribute filters from this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_countThe size of the attribute filter array.
in_typesThe array of attribute filters to remove from this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::SetFilter
StyleKey::ShowFilter

◆ UnsetFilter() [3/3]

StyleKey& HPS::StyleKey::UnsetFilter ( AttributeLockTypeArray const &  in_types)

Removes an array of attribute filters from this StyleKey. Attribute filters block the specified attributes set on the source style segment from taking effect for this StyleKey.

Parameters
in_typesThe array of attribute filters to remove from this StyleKey.
Returns
A reference to this StyleKey.
See also
StyleKey::SetFilter
StyleKey::ShowFilter

The documentation for this class was generated from the following file: