@@ -274,22 +274,24 @@ namespace cycfi::elements
274
274
*
275
275
* @tparam Subject
276
276
* The Subject of the label that must fulfill the `Element` concept.
277
+ *
277
278
* @tparam T
278
279
* The type of value that is converted to the label's text.
280
+ *
279
281
* @tparam F
280
282
* The type of user-defined function that is used for conversion of the
281
283
* value into text.
282
284
*/
283
- template <concepts::LabelStyler Label , typename T, typename F>
284
- class as_label_element : public receiver <T>, public proxy<Label >
285
+ template <concepts::Element Subject , typename T, typename F>
286
+ class as_label_element : public receiver <T>, public proxy<Subject >
285
287
{
286
288
public:
287
289
288
- using base_type = proxy<Label >;
290
+ using base_type = proxy<Subject >;
289
291
using param_type = typename receiver<T>::param_type;
290
292
using getter_type = typename receiver<T>::getter_type;
291
293
292
- as_label_element (F&& as_string, Label label);
294
+ as_label_element (F&& as_string, Subject label);
293
295
294
296
void value (param_type val) override ;
295
297
getter_type value () const override ;
@@ -300,9 +302,9 @@ namespace cycfi::elements
300
302
T _value;
301
303
};
302
304
303
- template <typename T, concepts::LabelStyler Label , typename F>
304
- inline as_label_element<remove_cvref_t <Label >, T, remove_cvref_t <F>>
305
- as_label (F&& as_string, Label && label );
305
+ template <typename T, concepts::Element Subject , typename F>
306
+ inline as_label_element<remove_cvref_t <Subject >, T, remove_cvref_t <F>>
307
+ as_label (F&& as_string, Subject && subject );
306
308
307
309
// //////////////////////////////////////////////////////////////////////////
308
310
// Inlines
@@ -532,8 +534,8 @@ namespace cycfi::elements
532
534
/* *
533
535
* @brief Construct a new `as_label_element`.
534
536
*
535
- * @tparam Label
536
- * A type that fulfills the `LabelStyler ` concept.
537
+ * @tparam Subject
538
+ * A type that fulfills the `Element ` concept.
537
539
*
538
540
* @tparam T
539
541
* The type of value that is converted to the label's text.
@@ -545,13 +547,13 @@ namespace cycfi::elements
545
547
* @param as_string
546
548
* The function to convert the value into the label's text.
547
549
*
548
- * @param label
549
- * The label .
550
+ * @param subject
551
+ * The subject .
550
552
*/
551
- template <concepts::LabelStyler Label , typename T, typename F>
552
- inline as_label_element<Label , T, F>::as_label_element(F&& as_string, Label label )
553
+ template <concepts::Element Subject , typename T, typename F>
554
+ inline as_label_element<Subject , T, F>::as_label_element(F&& as_string, Subject subject )
553
555
: _as_string(as_string)
554
- , base_type(std::move(label ))
556
+ , base_type(std::move(subject ))
555
557
{}
556
558
557
559
/* *
@@ -571,8 +573,8 @@ namespace cycfi::elements
571
573
* @param val
572
574
* The value to be set.
573
575
*/
574
- template <concepts::LabelStyler Label , typename T, typename F>
575
- inline void as_label_element<Label , T, F>::value(param_type val)
576
+ template <concepts::Element Subject , typename T, typename F>
577
+ inline void as_label_element<Subject , T, F>::value(param_type val)
576
578
{
577
579
_value = val;
578
580
if (auto tw = find_subject<text_writer_u8*>(this ))
@@ -583,12 +585,22 @@ namespace cycfi::elements
583
585
* @brief
584
586
* Get the value of the label.
585
587
*
588
+ * @tparam Subject
589
+ * A type that fulfills the `Element` concept.
590
+ *
591
+ * @tparam T
592
+ * The type of value that is converted to the label's text.
593
+ *
594
+ * @tparam F
595
+ * The type of user-defined function that is used for conversion of the
596
+ * value into text.
597
+ *
586
598
* @return
587
599
* The value of the label.
588
600
*/
589
- template <concepts::LabelStyler Label , typename T, typename F>
590
- inline typename as_label_element<Label , T, F>::getter_type
591
- as_label_element<Label , T, F>::value() const
601
+ template <concepts::Element Subject , typename T, typename F>
602
+ inline typename as_label_element<Subject , T, F>::getter_type
603
+ as_label_element<Subject , T, F>::value() const
592
604
{
593
605
return _value;
594
606
}
@@ -600,8 +612,8 @@ namespace cycfi::elements
600
612
* @tparam T
601
613
* The type of value that is converted to the label's text.
602
614
*
603
- * @tparam Label
604
- * A type that fulfills the `LabelStyler ` concept.
615
+ * @tparam Subject
616
+ * A type that fulfills the `Element ` concept.
605
617
*
606
618
* @tparam F
607
619
* The type of user-defined function that is used for conversion of the
@@ -610,18 +622,18 @@ namespace cycfi::elements
610
622
* @param as_string
611
623
* The function to convert the value into the label's text.
612
624
*
613
- * @param label
614
- * The label .
625
+ * @param subject
626
+ * The subject .
615
627
*
616
628
* @return
617
- * A new `as_label_element` with the processed Subject and Function.
629
+ * A new `as_label_element` given Subject and as_string Function.
618
630
*/
619
- template <typename T, concepts::LabelStyler Label , typename F>
620
- inline as_label_element<remove_cvref_t <Label >, T, remove_cvref_t <F>>
621
- as_label (F&& as_string, Label && label )
631
+ template <typename T, concepts::Element Subject , typename F>
632
+ inline as_label_element<remove_cvref_t <Subject >, T, remove_cvref_t <F>>
633
+ as_label (F&& as_string, Subject && subject )
622
634
{
623
635
using ftype = remove_cvref_t <F>;
624
- return {std::forward<ftype>(as_string), std::forward<Label>(label )};
636
+ return {std::forward<ftype>(as_string), std::forward<Subject>(subject )};
625
637
}
626
638
627
639
/* *
0 commit comments