@@ -18,7 +18,7 @@ class R_ {
18
18
#endif
19
19
20
20
#ifdef HFSM2_ENABLE_LOG_INTERFACE
21
- using Logger = typename TConfig::Logger ;
21
+ using Logger = typename TConfig::LoggerInterface ;
22
22
#endif
23
23
24
24
using Apex = TApex;
@@ -28,21 +28,24 @@ class R_ {
28
28
using StateList = typename Info::StateList;
29
29
using RegionList = typename Info::RegionList;
30
30
31
- static constexpr LongIndex SUBSTITUTION_LIMIT = Info::SUBSTITUTION_LIMIT;
32
- static constexpr LongIndex TASK_CAPACITY = Info::TASK_CAPACITY;
31
+ static constexpr LongIndex SUBSTITUTION_LIMIT = Info::SUBSTITUTION_LIMIT;
32
+
33
+ #ifdef HFSM2_ENABLE_PLANS
34
+ static constexpr LongIndex TASK_CAPACITY = Info::TASK_CAPACITY;
35
+ #endif
33
36
34
37
public:
35
- static constexpr LongIndex REVERSE_DEPTH = ApexInfo::REVERSE_DEPTH;
36
- static constexpr ShortIndex COMPO_REGIONS = ApexInfo::COMPO_REGIONS;
37
- static constexpr LongIndex COMPO_PRONGS = ApexInfo::COMPO_PRONGS;
38
- static constexpr ShortIndex ORTHO_REGIONS = ApexInfo::ORTHO_REGIONS;
39
- static constexpr ShortIndex ORTHO_UNITS = ApexInfo::ORTHO_UNITS;
38
+ static constexpr LongIndex REVERSE_DEPTH = ApexInfo::REVERSE_DEPTH;
39
+ static constexpr ShortIndex COMPO_REGIONS = ApexInfo::COMPO_REGIONS;
40
+ static constexpr LongIndex COMPO_PRONGS = ApexInfo::COMPO_PRONGS;
41
+ static constexpr ShortIndex ORTHO_REGIONS = ApexInfo::ORTHO_REGIONS;
42
+ static constexpr ShortIndex ORTHO_UNITS = ApexInfo::ORTHO_UNITS;
40
43
41
- static constexpr LongIndex ACTIVE_BITS = ApexInfo::ACTIVE_BITS;
42
- static constexpr LongIndex RESUMABLE_BITS = ApexInfo::RESUMABLE_BITS;
44
+ static constexpr LongIndex ACTIVE_BITS = ApexInfo::ACTIVE_BITS;
45
+ static constexpr LongIndex RESUMABLE_BITS = ApexInfo::RESUMABLE_BITS;
43
46
44
- static constexpr LongIndex STATE_COUNT = ApexInfo::STATE_COUNT;
45
- static constexpr LongIndex REGION_COUNT = ApexInfo::REGION_COUNT;
47
+ static constexpr LongIndex STATE_COUNT = ApexInfo::STATE_COUNT;
48
+ static constexpr LongIndex REGION_COUNT = ApexInfo::REGION_COUNT;
46
49
47
50
static_assert (STATE_COUNT < (ShortIndex) -1 , " Too many states in the hierarchy. Change 'ShortIndex' type." );
48
51
static_assert (STATE_COUNT == (ShortIndex) StateList::SIZE, " STATE_COUNT != StateList::SIZE" );
@@ -57,9 +60,11 @@ class R_ {
57
60
using MaterialApex = Material<I_<0 , 0 , 0 , 0 >, Args, Apex>;
58
61
59
62
using Control = ControlT<Args>;
60
-
61
63
using PlanControl = PlanControlT<Args>;
64
+
65
+ #ifdef HFSM2_ENABLE_PLANS
62
66
using PlanData = PlanDataT <Args>;
67
+ #endif
63
68
64
69
using FullControl = FullControlT<Args>;
65
70
using Requests = typename FullControl::Requests;
@@ -454,7 +459,7 @@ class R_ {
454
459
HFSM2_IF_UTILITY_THEORY (RNG& _rng);
455
460
456
461
Registry _registry;
457
- PlanData _planData;
462
+ HFSM2_IF_PLANS ( PlanData _planData) ;
458
463
459
464
Requests _requests;
460
465
@@ -486,30 +491,34 @@ template <
486
491
typename TRNG,
487
492
#endif
488
493
LongIndex NSubstitutionLimit,
494
+
495
+ #ifdef HFSM2_ENABLE_PLANS
489
496
LongIndex NTaskCapacity,
497
+ #endif
498
+
490
499
typename TApex>
491
- class RW_ <::hfsm2::ConfigT<::hfsm2::EmptyContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility, TRNG,) NSubstitutionLimit, NTaskCapacity>, TApex> final
492
- : public R_<::hfsm2::ConfigT<::hfsm2::EmptyContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility, TRNG,) NSubstitutionLimit, NTaskCapacity>, TApex>
500
+ class RW_ <::hfsm2::ConfigT<::hfsm2::EmptyContext HFSM2_IF_UTILITY_THEORY (, TRank, TUtility, TRNG), NSubstitutionLimit HFSM2_IF_PLANS( , NTaskCapacity) >, TApex> final
501
+ : public R_<::hfsm2::ConfigT<::hfsm2::EmptyContext HFSM2_IF_UTILITY_THEORY(, TRank, TUtility, TRNG), NSubstitutionLimit HFSM2_IF_PLANS( , NTaskCapacity) >, TApex>
493
502
, ::hfsm2::EmptyContext
494
503
{
495
504
#ifdef HFSM2_ENABLE_UTILITY_THEORY
496
505
using RNG = TRNG;
497
506
#endif
498
507
499
508
using Context = ::hfsm2::EmptyContext;
500
- using Cfg = ::hfsm2::ConfigT<Context, HFSM2_IF_UTILITY_THEORY(TRank, TUtility, RNG,) NSubstitutionLimit, NTaskCapacity>;
509
+ using Cfg = ::hfsm2::ConfigT<Context HFSM2_IF_UTILITY_THEORY (, TRank, TUtility, RNG), NSubstitutionLimit HFSM2_IF_PLANS ( , NTaskCapacity) >;
501
510
using R = R_<Cfg, TApex>;
502
511
503
512
#ifdef HFSM2_ENABLE_LOG_INTERFACE
504
- using Logger = typename Cfg::Logger ;
513
+ using Logger = typename Cfg::LoggerInterface ;
505
514
#endif
506
515
507
516
public:
508
517
509
518
#ifdef HFSM2_ENABLE_UTILITY_THEORY
510
519
511
520
explicit HFSM2_INLINE RW_ (RNG& rng
512
- HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
521
+ HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
513
522
: R{static_cast <Context&>(*this ),
514
523
rng
515
524
HFSM2_IF_LOG_INTERFACE (, logger)}
@@ -533,30 +542,34 @@ template <typename TContext,
533
542
typename TUtility,
534
543
#endif
535
544
LongIndex NSubstitutionLimit,
545
+
546
+ #ifdef HFSM2_ENABLE_PLANS
536
547
LongIndex NTaskCapacity,
548
+ #endif
549
+
537
550
typename TApex>
538
- class RW_ <::hfsm2::ConfigT<TContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility, ::hfsm2::RandomT<TUtility>,) NSubstitutionLimit, NTaskCapacity>, TApex> final
539
- : public R_<::hfsm2::ConfigT<TContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility, ::hfsm2::RandomT<TUtility>,) NSubstitutionLimit, NTaskCapacity>, TApex>
551
+ class RW_ <::hfsm2::ConfigT<TContext HFSM2_IF_UTILITY_THEORY (, TRank, TUtility, ::hfsm2::RandomT<TUtility>), NSubstitutionLimit HFSM2_IF_PLANS( , NTaskCapacity) >, TApex> final
552
+ : public R_<::hfsm2::ConfigT<TContext HFSM2_IF_UTILITY_THEORY(, TRank, TUtility, ::hfsm2::RandomT<TUtility>), NSubstitutionLimit HFSM2_IF_PLANS( , NTaskCapacity) >, TApex>
540
553
HFSM2_IF_UTILITY_THEORY(, ::hfsm2::RandomT<TUtility>)
541
554
{
542
555
#ifdef HFSM2_ENABLE_UTILITY_THEORY
543
556
using RNG = ::hfsm2::RandomT<TUtility>;
544
557
#endif
545
558
546
559
using Context = TContext;
547
- using Cfg = ::hfsm2::ConfigT<Context, HFSM2_IF_UTILITY_THEORY (TRank, TUtility, RNG,) NSubstitutionLimit, NTaskCapacity>;
560
+ using Cfg = ::hfsm2::ConfigT<Context HFSM2_IF_UTILITY_THEORY (, TRank, TUtility, ::hfsm2::RandomT<TUtility>), NSubstitutionLimit HFSM2_IF_PLANS ( , NTaskCapacity) >;
548
561
using R = R_<Cfg, TApex>;
549
562
550
563
#ifdef HFSM2_ENABLE_LOG_INTERFACE
551
- using Logger = typename Cfg::Logger ;
564
+ using Logger = typename Cfg::LoggerInterface ;
552
565
#endif
553
566
554
567
555
568
public:
556
569
#ifdef HFSM2_ENABLE_UTILITY_THEORY
557
570
558
571
explicit HFSM2_INLINE RW_ (Context& context
559
- HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
572
+ HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
560
573
: R{context,
561
574
static_cast <RNG&>(*this )
562
575
HFSM2_IF_LOG_INTERFACE (, logger)}
@@ -566,7 +579,7 @@ class RW_ <::hfsm2::ConfigT<TContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility
566
579
#else
567
580
568
581
explicit HFSM2_INLINE RW_ (Context& context
569
- HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
582
+ HFSM2_IF_LOG_INTERFACE (, Logger* const logger = nullptr ))
570
583
: R{context
571
584
HFSM2_IF_LOG_INTERFACE (, logger)}
572
585
{}
@@ -581,20 +594,24 @@ class RW_ <::hfsm2::ConfigT<TContext, HFSM2_IF_UTILITY_THEORY(TRank, TUtility
581
594
template <typename TRank,
582
595
typename TUtility,
583
596
LongIndex NSubstitutionLimit,
597
+
598
+ #ifdef HFSM2_ENABLE_PLANS
584
599
LongIndex NTaskCapacity,
600
+ #endif
601
+
585
602
typename TApex>
586
- class RW_ <::hfsm2::ConfigT<::hfsm2::EmptyContext, TRank, TUtility, ::hfsm2::RandomT<TUtility>, NSubstitutionLimit, NTaskCapacity>, TApex> final
587
- : public R_<::hfsm2::ConfigT<::hfsm2::EmptyContext, TRank, TUtility, ::hfsm2::RandomT<TUtility>, NSubstitutionLimit, NTaskCapacity>, TApex>
603
+ class RW_ <::hfsm2::ConfigT<::hfsm2::EmptyContext, TRank, TUtility, ::hfsm2::RandomT<TUtility>, NSubstitutionLimit HFSM2_IF_PLANS ( , NTaskCapacity) >, TApex> final
604
+ : public R_<::hfsm2::ConfigT<::hfsm2::EmptyContext, TRank, TUtility, ::hfsm2::RandomT<TUtility>, NSubstitutionLimit HFSM2_IF_PLANS( , NTaskCapacity) >, TApex>
588
605
, ::hfsm2::EmptyContext
589
606
, ::hfsm2::RandomT<TUtility>
590
607
{
591
608
using Context = ::hfsm2::EmptyContext;
592
609
using RNG = ::hfsm2::RandomT<TUtility>;
593
- using Cfg = ::hfsm2::ConfigT<Context, TRank, TUtility, RNG, NSubstitutionLimit, NTaskCapacity>;
610
+ using Cfg = ::hfsm2::ConfigT<Context, TRank, TUtility, RNG, NSubstitutionLimit HFSM2_IF_PLANS ( , NTaskCapacity) >;
594
611
using R = R_<Cfg, TApex>;
595
612
596
613
#ifdef HFSM2_ENABLE_LOG_INTERFACE
597
- using Logger = typename Cfg::Logger ;
614
+ using Logger = typename Cfg::LoggerInterface ;
598
615
#endif
599
616
600
617
public:
0 commit comments