cfl_agenerator.h
Go to the documentation of this file.
1/** @file cfl_agenerator.h Attributed generator class TaGenerator */
2
3/* FAU Discrete Event Systems Library (libfaudes)
4
5Copyright (C) 2006 Bernd Opitz
6Copyright (C) 2007, 2024 Thomas Moor
7Exclusive copyright is granted to Klaus Schmidt
8
9This library is free software; you can redistribute it and/or
10modify it under the terms of the GNU Lesser General Public
11License as published by the Free Software Foundation; either
12version 2.1 of the License, or (at your option) any later version.
13
14This library is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
17Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public
20License along with this library; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23
24#ifndef FAUDES_AGENERATOR_H
25#define FAUDES_AGENERATOR_H
26
27#include "cfl_definitions.h"
28#include "cfl_exception.h"
29#include "cfl_symboltable.h"
30#include "cfl_indexset.h"
31#include "cfl_nameset.h"
32#include "cfl_transset.h"
33#include "cfl_token.h"
34#include "cfl_tokenreader.h"
35#include "cfl_tokenwriter.h"
36#include "cfl_generator.h"
37#include <map>
38#include <set>
39#include <sstream>
40#include <cstdlib>
41#include <assert.h>
42
43namespace faudes {
44
45/**
46 * Generator with specified attribute types.
47 *
48 * @subsection AGeneratorOverview Overview
49 *
50 * The TaGenerator takes four template parameters to specify attribute classes for
51 * the global attribute and state-, event- and transition-attributes.
52 *
53 * In the context of a TaGenerator, attributes still have only minimal sematics: they can be
54 * accessed in a per event, state and transition manner and they can have default or non-default value.
55 * The minimum interface that an attribute template parameter must provide, is given in
56 * faudes::AttributeVoid. Derived attribute classes are meant to provide addtional semantics, eg
57 * faudes::AttributeFlags for boolean flags and faudes::AttributeCFlags for controllability properties.
58 * The TaGenerator transparently supports extended attribute semantics, but does not provide
59 * taylored access functions. This is done in TaGenerator
60 * derivates eg TcGenerator.
61 *
62 * Technical detail: Attributes data types must be derived from AttributeVoid, which in turn is derived from
63 * the general purpose base faudes::Type. For your derived attribute class to be fully functional,
64 * you must reimplement the faudes::Type::New().
65 *
66 * @ingroup GeneratorClasses
67 */
68
69template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
71 public:
72
73
74 /** Convenience typdef for member transiton set */
76
77
78 /*****************************************
79 *****************************************
80 *****************************************
81 *****************************************/
82
83 /** @name Constructors & Destructor */
84 /** @{ doxygen group */
85
86 /**
87 * Construct an emtpy Generator
88 */
90
91 /**
92 * Copy-constructor (from TaGenerator, incl attributes)
93 *
94 * @param rOtherGen
95 */
96 TaGenerator(const TaGenerator& rOtherGen);
97
98 /**
99 * Copy-constructor (from vGenerator, set attributes to default)
100 *
101 * @param rOtherGen
102 */
103 TaGenerator(const vGenerator& rOtherGen);
104
105 /**
106 * Construct from file. This constructor
107 * effectively uses the Read(TokenReader&) function to read.
108 *
109 * @param rFileName
110 * Name of file
111 *
112 * @exception Exception
113 * - IO errors (id 1)
114 * - Token mismatch (id 50, 51, 52, 80, 85)
115 */
116 TaGenerator(const std::string& rFileName);
117
118 /**
119 * Construct on heap.
120 * Technically not a constructor, this function creates a TaGenerator with the
121 * same event symboltable and the same attribute types. It is the callers reponsebilty to
122 * delete the object when no longer needed.
123 *
124 * @return
125 * new Generator
126 */
127 virtual TaGenerator* New(void) const;
128
129 /**
130 * Construct copy on heap.
131 * Technically not a constructor, this function creates a TaGenerator with the
132 * same event symboltable and the same attribute types. It is the callers reponsebilty to
133 * delete the object when no longer needed.
134 *
135 * @return
136 * new Generator
137 */
138 virtual TaGenerator* Copy(void) const;
139
140 /**
141 * Construct on stack.
142 * Technically not a constructor, this function creates a TaGenerator with the
143 * same event symboltable and the same attribute type.
144 *
145 * @return
146 * new Generator
147 */
148 virtual TaGenerator NewAGen(void) const;
149
150 /**
151 * Type test.
152 * Uses C++ dynamic cast to test whether the specified object
153 * casts to a Generator.
154 *
155 * @return
156 * TcGenerator reference if dynamic cast succeeds, else NULL
157 */
158 virtual const Type* Cast(const Type* pOther) const;
159
160
161 /**
162 * Destructor
163 */
164 virtual ~TaGenerator(void);
165
166 /** @} doxygen group */
167
168 /*****************************************
169 *****************************************
170 *****************************************
171 *****************************************/
172
173 /** @name Copy and Assignment */
174 /** @{ doxygen group */
175
176
177 /**
178 * Copy from other faudes Type (try to cast to agenerator or pass to base)
179 *
180 * @param rSrc
181 * Source for copy operation.
182 */
183 virtual TaGenerator& Assign(const Type& rSrc);
184
185 /**
186 * Assignment operator (uses DoAssign(Generator&) )
187 *
188 * @param rOtherGen
189 * Other generator
190 */
191 TaGenerator& operator= (const TaGenerator& rOtherGen);
192
193
194 /**
195 * Destructive copy to other TaGenerator
196 * Copy method with increased performance at the cost of invalidating
197 * the source data. This version will copy attributes 1:1.
198 *
199 *
200 * @param rGen
201 * Destination for copy operation.
202 */
203 virtual void Move(TaGenerator& rGen);
204
205 /**
206 * Destructive copy to other Generator.
207 * Copy method with increased performance at the cost of invalidating
208 * the source data. Convert attributes if possible.
209 *
210 *
211 * @param rGen
212 * Destination for copy operation.
213 */
214 virtual void Move(Generator& rGen);
215
216
217 /** @} doxygen group */
218
219 /*****************************************
220 *****************************************
221 *****************************************
222 *****************************************/
223
224 /** @name Basic Maintenance */
225 /** @{ doxygen group */
226
227 /**
228 * Check if generator is valid
229 *
230 * @return
231 * Success
232 */
233 bool Valid(void) const;
234
235
236 /**
237 * Clear generator data.
238 * Clears state set, alphabet and transitionrealtion. Behavioural flags
239 * eg StateNamesEnabled are maintained.
240 */
241 virtual void Clear(void);
242
243
244
245 /** @} doxygen group */
246
247
248
249 /*****************************************
250 *****************************************
251 *****************************************
252 *****************************************/
253
254 /** @name Read Access to Core Members */
255 /** @{ doxygen group */
256
257 /**
258 * Return const reference to alphabet
259 *
260 * @return EventSet
261 * Reference to mpAlphabet
262 */
263 const TaEventSet<EventAttr>& Alphabet(void) const;
264
265 /**
266 * Return reference to state set
267 *
268 * @return
269 * StateSet reference incl actual attribute type
270 */
271 const TaStateSet<StateAttr>& States(void) const;
272
273 /**
274 * Return reference to transition relation
275 *
276 * @return TransRel
277 */
278 const ATransSet& TransRel(void) const;
279
280 /**
281 * Get copy of trantision relation sorted by other compare
282 * operator, e.g. "x2,ev,x1"
283 *
284 * @param res
285 * resulting transition relation
286 */
287 void TransRel(TransSetX1EvX2& res) const;
288 void TransRel(TransSetEvX1X2& res) const;
289 void TransRel(TransSetEvX2X1& res) const;
290 void TransRel(TransSetX2EvX1& res) const;
291 void TransRel(TransSetX2X1Ev& res) const;
292 void TransRel(TransSetX1X2Ev& res) const;
293
294 /** @} doxygen group */
295
296
297
298 /*****************************************
299 *****************************************
300 *****************************************
301 *****************************************/
302
303 /** @name Write Access to Core Members */
304 /** @{ doxygen group */
305
306
307 /**
308 * Add an existing event to alphabet by index. It is an error to insert
309 * an event index that is not known to the mpEventSymbolTable.
310 *
311 * @param index
312 * Event index
313 * @return
314 * True, if event was new to alphabet
315 */
316 bool InsEvent(Idx index);
317
318 /**
319 * Add named event to generator. An entry in the mpEventSymbolTable will
320 * be made if event name is not known so far.
321 *
322 * @param rName
323 * Name of the event to add
324 *
325 * @return
326 * New unique index
327 */
328 Idx InsEvent(const std::string& rName);
329
330 /**
331 * Add an existing event to alphabet by index, incl. attribute
332 * If the index allready exists, the attribute is overwritten by rAttr.
333 *
334 * @param rAttr
335 * Attribute of event
336 * @param index
337 * Event index
338 * @return
339 * True, if event was new to alphabet
340 */
341 bool InsEvent(Idx index, const EventAttr& rAttr);
342
343 /**
344 * Add named event with attribute to generator. An entry in the
345 * mpEventSymbolTable will be made if event is not kown so far.
346 * If the event allready exits in the generator, the attribute will be
347 * overwritten by rAttr.
348 *
349 * @param rName
350 * Name of the event to add
351 * @param rAttr
352 * Attribute of event
353 *
354 * @return
355 * New unique index
356 */
357 Idx InsEvent(const std::string& rName, const EventAttr& rAttr);
358
359 /**
360 * Set mpAlphabet without consistency check.
361 * Attributes will be casted if possible or silently ignored.
362 *
363 * @param rNewalphabet
364 * EventSet with new alphabet
365 */
366 void InjectAlphabet(const EventSet& rNewalphabet);
367
368 /**
369 * Set mpAlphabet without consistency check.
370 *
371 * @param rNewalphabet
372 * EventSet with new alphabet
373 */
374 void InjectAlphabet(const TaEventSet<EventAttr>& rNewalphabet);
375
376 /**
377 * Add new anonymous state to generator
378 *
379 * @return
380 * Index of new unique state
381 */
383
384 /**
385 * Add new anonymous state with attribute to generator
386 *
387 * @param attr
388 * attribute of new state
389 *
390 * @return
391 * Index of new unique state
392 */
393 Idx InsState(const StateAttr& attr);
394
395 /**
396 * Add (perhaps new) state to generator
397 *
398 * @return
399 * true to indicate that state was new to generator
400 */
401 bool InsState(Idx index);
402
403 /**
404 * Add new named state to generator.
405 *
406 * @param rName
407 * Name of the state to add
408 *
409 * @return
410 * Index of new unique state
411 *
412 * @exception Exception
413 * Name already exists (id 44)
414 */
415 Idx InsState(const std::string& rName);
416
417 /**
418 * Add new named state with attribute to generator.
419 *
420 * @param rName
421 * Name of the state to add
422 * @param attr
423 * attribute of new state
424 *
425 * @return
426 * Index of new unique state
427 * @exception Exception
428 * Name already exists (id 44)
429 */
430 Idx InsState(const std::string& rName, const StateAttr& attr);
431
432 /**
433 * Add (perhaps new) state with attribute to generator.
434 *
435 * @param index
436 * Index of state to add
437 * @param attr
438 * Attribute of new state
439 *
440 * @return
441 * True, if event was new to alphabet
442 *
443 */
444 bool InsState(Idx index, const StateAttr& attr);
445
446 /**
447 * Inject a complete state set without consistency checks.
448 * Attributes will be casted if possible or silently ignored.
449 *
450 * @param rNewStates
451 * StateSet
452 */
453 void InjectStates(const StateSet& rNewStates);
454
455
456 /**
457 * Inject a complete state set without consistency checks.
458 *
459 * @param rNewStates
460 * StateSet
461 */
462 void InjectStates(const TaStateSet<StateAttr>& rNewStates);
463
464
465 /**
466 * Add a transition to generator by indices. States and event
467 * must already exist!
468 *
469 * Define FAUDES_CHECKED for consistency checks.
470 *
471 * @param x1
472 * Predecessor state index
473 * @param ev
474 * Event index
475 * @param x2
476 * Successor state index
477 *
478 * @return
479 * True, if the transition was new the generator
480 *
481 * @exception Exception
482 * - state or event not in generator (id 95)
483 */
484 bool SetTransition(Idx x1, Idx ev, Idx x2);
485
486 /**
487 * Add a transition to generator by names. Statename and eventname
488 * must already exist!
489 *
490 * @param rX1
491 * Predecessor state name
492 * @param rEv
493 * Event name
494 * @param rX2
495 * Successor state name
496 *
497 * @return
498 * True, if the transition was new the generator
499 *
500 * @exception Exception
501 * - state or event not in generator (id 95)
502 * - state name not known (id 90)
503 * - event name not known (id 66)
504 */
505 bool SetTransition(const std::string& rX1, const std::string& rEv,
506 const std::string& rX2);
507
508 /**
509 * Add a transition to generator. States and event
510 * must already exist!
511 *
512 *
513 * @param rTransition
514 * Transition
515 *
516 * @return
517 * True, if the transition was new the generator
518 * @exception Exception
519 * - state or event not in generator (id 95)
520 */
521 bool SetTransition(const Transition& rTransition);
522
523 /**
524 * Add a transition with attribute to generator. States and event
525 * must already exist!
526 *
527 *
528 * @param rTransition
529 * transition
530 * @param rAttr
531 * attribute
532 * @return
533 * True, if the transition was new the generator
534 * @exception Exception
535 * - state or event not in generator (id 95)
536 *
537 */
538 bool SetTransition(const Transition& rTransition, const TransAttr& rAttr);
539
540 /**
541 * Set transition relation without consistency check.
542 * Attributes will be casted if possible or silently ignored.
543 *
544 * @param rNewtransrel
545 * TransRel to insert
546 */
547 void InjectTransRel(const TransSet& rNewtransrel);
548
549 /**
550 * Set transition relation without consistency check.
551 *
552 * @param rNewtransrel
553 * TransRel to insert
554 */
555 void InjectTransRel(const ATransSet& rNewtransrel);
556
557 /** @} doxygen group */
558
559
560
561 /*****************************************
562 *****************************************
563 *****************************************
564 *****************************************/
565
566 /** @name Attributes */
567 /** @{ doxygen group */
568
569
570 /**
571 * Set attribute for existing event
572 *
573 * @param index
574 * Event index
575 * @param rAttr
576 * New attribute
577 *
578 * @exception Exception
579 * Index not found in alphabet (id 60)
580 */
581 void EventAttribute(Idx index, const EventAttr& rAttr);
582
583 /**
584 * Set attribute for existing event.
585 * This version uses a dynamic cast
586 * to test the actual type of the provided attribute. An exception is
587 * thrown for an invalid attribute type.
588 *
589 * @param index
590 * Event index
591 * @param rAttr
592 * New attribute
593 *
594 * @exception Exception
595 * - Index not found in alphabet (id 60)
596 * - Cannot cast attribute (id 63)
597 */
598 void EventAttribute(Idx index, const Type& rAttr);
599
600 /**
601 * Event attribute lookup
602 *
603 * @param index
604 *
605 * @return
606 * reference to attribute
607 */
608 const EventAttr& EventAttribute(Idx index) const;
609
610 /**
611 * Event attribute lookup
612 *
613 * @param rName
614 *
615 * @return
616 * reference to attribute
617 */
618 const EventAttr& EventAttribute(const std::string& rName) const;
619
620 /**
621 * Event attribute pointer (to access Attribute methods)
622 * note: may insert explicit default attribute
623 *
624 * @param index
625 *
626 * @return
627 * pointer to attribute
628 */
629 EventAttr* EventAttributep(Idx index);
630
631 /**
632 * Event attribute pointer (to access Attribute methods)
633 * note: may insert explicit default attribute
634 *
635 * @param rName
636 *
637 * @return
638 * pointer to attribute
639 */
640 EventAttr* EventAttributep(const std::string& rName);
641
642
643 /**
644 * Set attribute for existing state
645 *
646 * @param index
647 * Index
648 * @param rAttr
649 * attriute
650 *
651 * @exception Exception
652 * Name already associated with another index (id 44)
653 */
654 void StateAttribute(Idx index, const StateAttr& rAttr);
655
656 /**
657 * Set attribute for existing state.
658 * This version uses a dynamic cast
659 * to test the actual type of the provided attribute. An exception is
660 * thrown for an invalid attribute type.
661 *
662 * @param index
663 * State index
664 * @param rAttr
665 * New attribute
666 *
667 * @exception Exception
668 * - Index not found in Stateset (id 60)
669 * - Cannot cast attribute (id 63)
670 */
671 void StateAttribute(Idx index, const Type& rAttr);
672
673 /**
674 * State attribute lookup
675 *
676 * @param index
677 *
678 * @return ref to attribute of state
679 */
680 const StateAttr& StateAttribute(Idx index) const;
681
682 /**
683 * State attribute pointer (to access Attribute methods)
684 * note: may insert explicit default attribute
685 *
686 * @param index
687 *
688 * @return pointer to attribute of state
689 */
690 StateAttr* StateAttributep(Idx index);
691
692 /**
693 * Set attribute for existing transition
694 *
695 * @param rTrans
696 * transition
697 * @param rAttr
698 * New attribute
699 *
700 */
701 void TransAttribute(const Transition& rTrans, const TransAttr& rAttr);
702
703 /**
704 * Set attribute for existing transition.
705 * This version uses a dynamic cast
706 * to test the actual type of the provided attribute. An exception is
707 * thrown for an invalid attribute type.
708 *
709 * @param rTrans
710 * transition
711 * @param rAttr
712 * New attribute
713 *
714 * @exception Exception
715 * - Transition not found in transition relation(id 60)
716 * - Cannot cast attribute (id 63)
717 */
718 void TransAttribute(const Transition& rTrans, const Type& rAttr);
719
720
721 /**
722 * Get attribute for existing transition
723 *
724 * @return
725 * attribute
726 *
727 */
728 const TransAttr& TransAttribute(const Transition& rTrans) const;
729
730 /**
731 * Get attribute pointer for existing transition
732 * note: may insert explicit default attribute
733 *
734 * @return
735 * attribute pointer
736 *
737 */
738 TransAttr* TransAttributep(const Transition& rTrans);
739
740 /**
741 * Set global attribute
742 *
743 * @param rAttr
744 * attribute
745 */
746 void GlobalAttribute(const GlobalAttr& rAttr) {*pGlobalAttribute=rAttr;};
747 void GlobalAttribute(const Type& rAttr) { const GlobalAttr* ap= dynamic_cast<const GlobalAttr*>(&rAttr); if(ap) *pGlobalAttribute=*ap;};
748
749 /**
750 * Get global attribute ref
751 */
752 const GlobalAttr& GlobalAttribute(void) const {return *pGlobalAttribute;};
753
754
755 /**
756 * Get global attribute pointer
757 */
758 GlobalAttr* GlobalAttributep(void) {return pGlobalAttribute;};
759
760
761 /** @} doxygen group */
762
763
764
765
766 protected:
767
768 /** Alphabet, pointer with actual attribute type */
770
771 /** State set, pointer with actual attribute type */
773
774 /** Transition relation, pointer with actual attribute type */
776
777 /** Global attribute, pointer with actual attribute type */
778 GlobalAttr* pGlobalAttribute;
779
780 /** Static default alphabet prototype (incl. attribute type) */
782
783 /** Static default state set prototype (incl. attribute type) */
785
786 /** Static default transition relation prototype (incl. attribute type) */
787 static const ATransSet& TransRelTaGen(void);
788
789 /** Static default global attribute prototype (configures global attribute type) */
790 static const GlobalAttr& GlobalTaGen(void);
791
792 /** Allocate my heap members (attribute dependent types) */
793 virtual void NewCore(void);
794
795 /** Update my secondary pointers for new core */
796 virtual void UpdateCore(void);
797
798 /** Assignment */
799 void DoAssign(const TaGenerator& rGen);
800
801
802};
803
804
805
806/* convenience access to relevant scopes */
807#define THIS TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr>
808#define TEMP template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
809#define BASE vGenerator
810
811// static default prototypes (construct on first use design pattern)
812TEMP const TaNameSet<EventAttr>& THIS::AlphabetTaGen(void) {
813 static TaNameSet<EventAttr> fls;
814 return fls;
815}
816TEMP const TaIndexSet<StateAttr>& THIS::StatesTaGen(void) {
817 static TaIndexSet<StateAttr> fls;
818 return fls;
819}
820TEMP const TaTransSet<TransAttr>& THIS::TransRelTaGen(void) {
821 static TaTransSet<TransAttr> fls;
822 return fls;
823}
824TEMP const GlobalAttr& THIS::GlobalTaGen(void) {
825 static GlobalAttr fls;;
826 return fls;
827}
828
829
830// TaGenerator::Generator(void)
831TEMP THIS::TaGenerator(void) :
832 // init base
833 vGenerator()
834{
835 FD_DG("TaGenerator(" << this << ")::TaGenerator()");
836 // re-allocate core members with nontrivial attribute types
838 NewCore();
839 FD_DG("TaGenerator(" << this << ")::TaGenerator(): done");
840}
841
842// TaGenerator::Generator(rOtherGen)
843TEMP THIS::TaGenerator(const TaGenerator& rOtherGen) :
844 // init base
845 vGenerator()
846{
847 FD_DG("TaGenerator(" << this << ")::TaGenerator(" << &rOtherGen << ")");
848 // re-allocate core members with nontrivial attribute types
850 NewCore();
851 // have a 1:1 copy (incl sym tables)
852 DoAssign(rOtherGen);
853}
854
855
856// TaGenerator::Generator(rOtherGen)
857TEMP THIS::TaGenerator(const vGenerator& rOtherGen) :
858 // init base
859 vGenerator()
860{
861 FD_DG("TaGenerator(" << this << ")::TaGenerator([v]" << &rOtherGen << ")");
862 // re-allocate core members with nontrivial attribute types
864 NewCore();
865 // have a 1:1 copy (incl sym tables)
866 Assign(rOtherGen);
867 FD_DG("TaGenerator(" << this << ")::TaGenerator([v]" << &rOtherGen << "): ok");
868}
869
870// TaGenerator::Generator(rFileName)
871TEMP THIS::TaGenerator(const std::string& rFileName) :
872 // init base
873 vGenerator()
874{
875 FD_DG("TaGenerator(" << this << ")::TaGenerator(" << rFileName << ")");
876 // re-allocate core members with nontrivial attribute types
878 NewCore();
879 // set some defaults
881 // do read
882 Read(rFileName);
883 // get original statenames default
885}
886
887// allocate core on heap
888TEMP void THIS::NewCore(void) {
889 FD_DG("TaGenerator(" << this << ")::NewCore()");
890
891 // MS Compilers did somehow mess up upcast with diamond inheritance of TaNameSet-member New()
892 // call base, incl virtual call back of UpdateCore
893 //BASE::NewCore();
894
895 DeleteCore();
896 // allocate by our typed prototypes
897 mpAlphabet= AlphabetTaGen().New();
898 mpStates=StatesTaGen().New();
899 mpTransRel=TransRelTaGen().New();
900 mpGlobalAttribute=GlobalTaGen().New();
901 // update callback
902 UpdateCore();
903}
904
905// indicate new core
906TEMP void THIS::UpdateCore(void) {
907 // let base do an update (fixes names)
908 BASE::UpdateCore();
909 // have pointer with my attribute
910 pGlobalAttribute = dynamic_cast< GlobalAttr* >(mpGlobalAttribute);
911 pAlphabet = dynamic_cast< TaNameSet<EventAttr>* >(mpAlphabet);
912 pStates = dynamic_cast< TaIndexSet<StateAttr>* >(mpStates);
913 pTransRel = dynamic_cast< ATransSet* >(mpTransRel);
914 // check for type mismatch
915 bool tmm=false;
916 if(pGlobalAttribute==0 && mpGlobalAttribute!=0) tmm=true;
917 if(pAlphabet==0 && mpAlphabet!=0) tmm=true;
918 if(pStates==0 && mpStates!=0) tmm=true;
919 if(pTransRel==0 && mpTransRel!=0) tmm=true;
920 if(tmm) {
921 std::stringstream errstr;
922 errstr << "cannot cast attributes for generator type " << typeid(*this).name();
923 errstr << " ptrs " << pGlobalAttribute << "-" << pAlphabet << "-" << pStates << "-" << pTransRel;
924 throw Exception("Generator::UpdateCore", errstr.str(), 63);
925 }
926}
927
928
929// Copy(gen) from identical type
930TEMP void THIS::DoAssign(const TaGenerator& rGen) {
931 FD_DG("TaGenerator(" << this << ")::DoAssign(" << &rGen << ")");
932 FD_DG("TaGenerator(" << this << ")::DoAssign(..): types " << typeid(*this).name() << " <= " << typeid(rGen).name());
933 // prepare result (call clear for virtual stuff)
934 Clear();
935 // have same event symboltable
936 EventSymbolTablep(rGen.mpEventSymbolTable);
937 // copy state symboltable
938 StateSymbolTable(rGen.mStateSymbolTable);
939 // set other members
940 Name(rGen.Name());
941 *pGlobalAttribute=*rGen.pGlobalAttribute;
942 *pStates= *rGen.pStates;
943 *pAlphabet = *rGen.pAlphabet;
944 *pTransRel= *rGen.pTransRel;
945 mInitStates = rGen.mInitStates;
946 mMarkedStates = rGen.mMarkedStates;
947 mStateNamesEnabled=rGen.mStateNamesEnabled;
948 mReindexOnWrite=rGen.mReindexOnWrite;
949 // copy add on stuff
950 mMinStateIndexMap=rGen.mMinStateIndexMap;
951#ifdef FAUDES_DEBUG_CODE
952 if(!Valid()) {
953 FD_DG("TaGenerator()::DoAssign(): invalid generator");
954 DWrite();
955 abort();
956 }
957#endif
958 FD_DG("TaGenerator(" << this << ")::DoAssign(" << &rGen << "): done");
959}
960
961// copy from other faudes type
962TEMP THIS& THIS::Assign(const Type& rSrc) {
963 FD_DG("TaGenerator(" << this << ")::Assign([type] " << &rSrc << ")");
964 FD_DG("TaGenerator(" << this << ")::Assign(..): types \n" << typeid(*this).name() << " <= \n" << typeid(rSrc).name());
965 FD_DG("TaGenerator(" << this << ")::Assign(..): match str " << (typeid(*this).name() == typeid(rSrc).name()));
966 FD_DG("TaGenerator(" << this << ")::Assign(..): match id " << (typeid(*this) == typeid(rSrc)));
967 // cast to this class
968 const TaGenerator* agen=dynamic_cast<const THIS*>(&rSrc);
969 FD_DG("TaGenerator(" << this << ")::Assign(..): agen " << agen);
970 // bail out on object match
971 if(this==agen) return *this;
972 // assign on type match
973 if(agen) {
974 FD_DG("TaGenerator(" << this << ")::Assign([type] " << &rSrc << "):: call aGenerator DoAssign");
975 DoAssign(*agen);
976 return *this;
977 }
978 FD_DG("TaGenerator(" << this << ")::Assign([type] " << &rSrc << "):: call vGenerator base");
979 // pass on to base
980 BASE::Assign(rSrc);
981 return *this;
982}
983
984
985// Move(gen) destructive copy
986TEMP void THIS::Move(TaGenerator& rGen) {
987 FD_DG("TaGenerator(" << this << ")::Move(" << &rGen << ")");
988 // call base
989 BASE::Move(rGen);
990}
991
992
993// Move(gen) destructive copy
994TEMP void THIS::Move(Generator& rGen) {
995 FD_DG("TaGenerator(" << this << ")::Move([v]" << &rGen << ")");
996 // call base
997 BASE::Move(rGen);
998}
999
1000// TaGenerator::~Generator
1001TEMP THIS::~TaGenerator(void) {
1002 FD_DG("TaGenerator(" << this << ")::~TaGenerator()");
1003}
1004
1005// New
1006TEMP THIS* THIS::New(void) const {
1007 // allocate
1008 THIS* res = new THIS;
1009 // fix base data
1010 res->EventSymbolTablep(BASE::mpEventSymbolTable);
1011 res->mStateNamesEnabled=BASE::mStateNamesEnabled;
1012 res->mReindexOnWrite=BASE::mReindexOnWrite;
1013 return res;
1014}
1015
1016// Copy
1017TEMP THIS* THIS::Copy(void) const {
1018 // allocate
1019 THIS* res = new THIS(*this);
1020 // done
1021 return res;
1022}
1023
1024// NewAGen()
1025TEMP THIS THIS::NewAGen(void) const {
1026 THIS res;
1027 // fix base data
1028 res.EventSymbolTablep(BASE::mpEventSymbolTable);
1029 res.StateNamesEnabled(BASE::mStateNamesEnabled);
1030 res.ReindexOnWrite(BASE::mReindexOnWrite);
1031 return res;
1032}
1033
1034
1035// CAST
1036TEMP const Type* THIS::Cast(const Type* pOther) const {
1037 return dynamic_cast< const THIS* > (pOther);
1038}
1039
1040
1041// operator=
1043 FD_DG("TaGenerator(" << this << ")::operator = [v]" << &rOtherGen);
1044 return Assign(rOtherGen);
1045}
1046
1047// Valid()
1048TEMP bool THIS::Valid(void) const {
1049 FD_DG("TaGenerator(" << this << ")::Valid()");
1050 if(!BASE::Valid()) return false;
1051 // test types
1052 bool tmm=false;
1053 if(typeid(Alphabet().AttributeType())!=typeid(const EventAttr*)) tmm=true;
1054 if(typeid(States().AttributeType())!=typeid(const StateAttr*)) tmm=true;
1055 if(typeid(TransRel().AttributeType())!=typeid(const TransAttr*)) tmm=true;
1056 if(typeid(GlobalAttribute())!=typeid(const GlobalAttr&)) tmm=true;
1057 if(tmm) {
1058 return false;
1059 //std::stringstream errstr;
1060 //errstr << "attribute type mismatch in generator " << Name();
1061 //throw Exception("Generator::Valid", errstr.str(), 63);
1062 }
1063 return true;
1064}
1065
1066// Clear()
1067TEMP void THIS::Clear(void) {
1068 FD_DG("TaGenerator(" << this << ")::Clear()");
1069 BASE::Clear();
1070}
1071
1072
1073// InjectAlphabet(newalphabet)
1074TEMP void THIS::InjectAlphabet(const EventSet& rNewAlphabet) {
1075 FD_DG("TaGenerator::InjectAlphabet() " << rNewAlphabet.ToString());
1076 BASE::InjectAlphabet(rNewAlphabet);
1077}
1078
1079// InjectAlphabet(newalphabet)
1080TEMP void THIS::InjectAlphabet(const TaEventSet<EventAttr>& rNewAlphabet) {
1081 FD_DG("TaGenerator::InjectAlphabet(TaEventSet<EventAttr>) " << rNewAlphabet.ToString());
1082#ifdef FAUDES_CHECKED
1083 if(rNewAlphabet.SymbolTablep()!=mpEventSymbolTable) {
1084 std::stringstream errstr;
1085 errstr << "symboltable mismatch aka not implemented" << std::endl;
1086 throw Exception("TaGenerator::InjectAlphabet", errstr.str(), 88);
1087 }
1088#endif
1089 *pAlphabet=rNewAlphabet;
1090 mpAlphabet->Name("Alphabet");
1091}
1092
1093// InsEvent(index)
1094TEMP bool THIS::InsEvent(Idx index) {
1095 FD_DG("TaGenerator(" << this << ")::InsEvent(" << index << ")");
1096 return pAlphabet->Insert(index);
1097}
1098
1099// InsEvent(rName)
1100TEMP Idx THIS::InsEvent(const std::string& rName) {
1101 FD_DG("TaGenerator(" << this << ")::InsEvent(\"" << rName << "\")");
1102 return pAlphabet->Insert(rName);
1103}
1104
1105// InsEvent(index, attr)
1106TEMP bool THIS::InsEvent(Idx index, const EventAttr& attr) {
1107 FD_DG("TaGenerator(" << this << ")::InsEvent(" << index << " " << attr.ToString() << ")");
1108 return pAlphabet->Insert(index, attr);
1109}
1110
1111// InsEvent(rName)
1112TEMP Idx THIS::InsEvent(const std::string& rName, const EventAttr& attr) {
1113 FD_DG("TaGenerator(" << this << ")::InsEvent(\"" << rName << attr.ToString() << "\")");
1114 return pAlphabet->Insert(rName, attr);
1115}
1116
1117// InsState()
1118TEMP Idx THIS::InsState(void) {
1119 FD_DG("TaGenerator(" << this << ")::InsState()");
1120 return pStates->Insert();
1121}
1122
1123// InsState(attr)
1124TEMP Idx THIS::InsState(const StateAttr& attr) {
1125 FD_DG("TaGenerator(" << this << ")::InsState(attr)");
1126 return pStates->Insert(attr);
1127}
1128
1129// InsState(index)
1130TEMP bool THIS::InsState(Idx index) {
1131 FD_DG("TaGenerator(" << this << ")::InsState(" << index << ")");
1132 return pStates->Insert(index);
1133}
1134
1135// InsState(index, attr)
1136TEMP bool THIS::InsState(Idx index, const StateAttr& rAttr) {
1137 FD_DG("TaGenerator(" << this << ")::InsState(" << index << ",rAttr)");
1138 return pStates->Insert(index,rAttr);
1139}
1140
1141// InsState(rName)
1142TEMP Idx THIS::InsState(const std::string& rName) {
1143 FD_DG("TaGenerator(" << this << ")::InsState(\"" << rName << "\")");
1144 Idx index=pStates->Insert();
1145 StateName(index,rName);
1146 return index;
1147}
1148
1149// InsState(rName, attr)
1150TEMP Idx THIS::InsState(const std::string& rName, const StateAttr& attr) {
1151 FD_DG("TaGenerator(" << this << ")::InsState(\"" << rName << "\", attr)");
1152 Idx index=pStates->Insert();
1153 StateName(index,rName);
1154 StateAttribute(index,attr);
1155 return index;
1156}
1157
1158
1159// InjectStates(rNewStates)
1160TEMP void THIS::InjectStates(const StateSet& rNewStates) {
1161 FD_DG("TaGenerator(" << this << ")::InjectStates("
1162 << rNewStates.ToString() << ")");
1163 BASE::InjectStates(rNewStates);
1164}
1165
1166// InjectStates(rNewStates)
1167TEMP void THIS::InjectStates(const TaStateSet<StateAttr>& rNewStates) {
1168 FD_DG("TaGenerator(" << this << ")::InjectStates("
1169 << rNewStates.ToString() << ")");
1170 *pStates=rNewStates;
1171 pStates->Name("States");
1172 mpStateSymbolTable->RestrictDomain(*mpStates);
1173}
1174
1175
1176
1177// InjectTransRel(rNewtransrel)
1178TEMP void THIS::InjectTransRel(const TransSet& rNewTransRel) {
1179 FD_DG("TaGenerator::InjectTransRel(...)");
1180 *pTransRel=rNewTransRel;
1181}
1182
1183// InjectTransRel(rNewtransrel)
1184TEMP void THIS::InjectTransRel(const ATransSet& rNewTransRel) {
1185 FD_DG("TaGenerator::InjectTransRel(...)");
1186 *pTransRel=rNewTransRel;
1187}
1188
1189
1190// SetTransition(rX1, rEv, rX2)
1191TEMP bool THIS::SetTransition(const std::string& rX1, const std::string& rEv, const std::string& rX2) {
1192 return BASE::SetTransition(rX1,rEv,rX2);
1193}
1194
1195
1196// SetTransition(x1, ev, x2)
1197TEMP bool THIS::SetTransition(Idx x1, Idx ev, Idx x2) {
1198 return SetTransition(Transition(x1,ev,x2));
1199}
1200
1201// SetTransition(rTransition)
1202TEMP bool THIS::SetTransition(const Transition& rTransition) {
1203 FD_DG("TaGenerator(" << this << ")::SetTransition(" << rTransition.X1 << ","
1204 << rTransition.Ev << "," << rTransition.X2 << ")");
1205#ifdef FAUDES_CHECKED
1206 if (! mpStates->Exists(rTransition.X1)) {
1207 std::stringstream errstr;
1208 errstr << "TaGenerator::SetTransition: state " << rTransition.X1
1209 << " not in stateset";
1210 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1211 }
1212 if (! mpAlphabet->Exists(rTransition.Ev)) {
1213 std::stringstream errstr;
1214 errstr << "TaGenerator::SetTransition: event " << rTransition.Ev
1215 << " not in alphabet ";
1216 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1217 }
1218 if (! mpStates->Exists(rTransition.X2)) {
1219 std::stringstream errstr;
1220 errstr << "TaGenerator::SetTransition: state " << rTransition.X2
1221 << " not in stateset";
1222 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1223 }
1224#endif
1225 return pTransRel->Insert(rTransition);
1226}
1227
1228// SetTransition(rTransition, rAttr)
1229TEMP bool THIS::SetTransition(const Transition& rTransition, const TransAttr& rAttr) {
1230 FD_DG("TaGenerator(" << this << ")::SetTransition(" << rTransition.X1 << ","
1231 << rTransition.Ev << "," << rTransition.X2 << ", [attr:]" << rAttr.ToString() << ")");
1232#ifdef FAUDES_CHECKED
1233 if (! mpStates->Exists(rTransition.X1)) {
1234 std::stringstream errstr;
1235 errstr << "TaGenerator::SetTransition: state " << rTransition.X1
1236 << " not in stateset";
1237 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1238 }
1239 if (! mpAlphabet->Exists(rTransition.Ev)) {
1240 std::stringstream errstr;
1241 errstr << "TaGenerator::SetTransition: event " << rTransition.Ev
1242 << " not in alphabet ";
1243 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1244 }
1245 if (! mpStates->Exists(rTransition.X2)) {
1246 std::stringstream errstr;
1247 errstr << "TaGenerator::SetTransition: state " << rTransition.X2
1248 << " not in stateset";
1249 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95);
1250 }
1251#endif
1252 return pTransRel->Insert(rTransition,rAttr);
1253}
1254
1255// TransAttribute(trans, attr)
1256TEMP void THIS::TransAttribute(const Transition& rTrans, const TransAttr& rAttr) {
1257 FD_DG("TaGenerator(" << this << ")::TransAttribute("
1258 << TStr(rTrans) << ",\"" << rAttr.ToString() << "\")");
1259 pTransRel->Attribute(rTrans, rAttr);
1260}
1261
1262// TransAttribute(index, attr)
1263TEMP void THIS::TransAttribute(const Transition& rTrans, const Type& rAttr) {
1264 FD_DG("TaGenerator(" << this << ")::TransAttribute("
1265 << TStr(rTrans) << ",\"" << rAttr.ToString() << "\")");
1266 const TransAttr* attrp = dynamic_cast<const TransAttr*>(&rAttr);
1267 if(!attrp) {
1268 std::stringstream errstr;
1269 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name();
1270 throw Exception("TaGenerator::TransAttribute", errstr.str(), 63);
1271 }
1272 pTransRel->Attribute(rTrans, *attrp);
1273}
1274
1275// TransAttributep(trans)
1276TEMP TransAttr* THIS::TransAttributep(const Transition& rTrans) {
1277 return pTransRel->Attributep(rTrans);
1278}
1279
1280
1281// TransAttribute(trans)
1282TEMP const TransAttr& THIS::TransAttribute(const Transition& rTrans) const {
1283 return pTransRel->Attribute(rTrans);
1284}
1285
1286// EventAttribute(index, attr)
1287TEMP void THIS::EventAttribute(Idx index, const EventAttr& rAttr) {
1288 FD_DG("TaGenerator(" << this << ")::EventAttribute("
1289 << EStr(index) << ",\"" << rAttr.ToString() << "\")");
1290 pAlphabet->Attribute(index, rAttr);
1291}
1292
1293// EventAttribute(index, attr)
1294TEMP void THIS::EventAttribute(Idx index, const Type& rAttr) {
1295 FD_DG("TaGenerator(" << this << ")::EventAttribute("
1296 << EStr(index) << ",\"" << rAttr.ToString() << "\")");
1297 const EventAttr* attrp = dynamic_cast<const EventAttr*>(&rAttr);
1298 if(!attrp) {
1299 std::stringstream errstr;
1300 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name();
1301 throw Exception("TaGenerator::EventAttribute", errstr.str(), 63);
1302 }
1303 pAlphabet->Attribute(index, *attrp);
1304}
1305
1306// EventAttribute(index)
1307TEMP const EventAttr& THIS::EventAttribute(Idx index) const {
1308 return pAlphabet->Attribute(index);
1309}
1310
1311// EventAttributep(index)
1312TEMP EventAttr* THIS::EventAttributep(Idx index) {
1313 return pAlphabet->Attributep(index);
1314}
1315
1316// EventAttribute(rName)
1317TEMP const EventAttr& THIS::EventAttribute(const std::string& rName) const {
1318 return EventAttribute(EventIndex(rName));
1319}
1320
1321// EventAttributep(rName)
1322TEMP EventAttr* THIS::EventAttributep(const std::string& rName) {
1323 return EventAttributep(EventIndex(rName));
1324}
1325
1326// StateAttribute(index, attr)
1327TEMP void THIS::StateAttribute(Idx index, const StateAttr& rAttr) {
1328 FD_DG("TaGenerator(" << this << ")::StateAttribute("
1329 << index << ",\"" << rAttr.ToString() << "\")");
1330 pStates->Attribute(index, rAttr);
1331}
1332
1333// StateAttribute(index, attr)
1334TEMP void THIS::StateAttribute(Idx index, const Type& rAttr) {
1335 FD_DG("TaGenerator(" << this << ")::StateAttribute("
1336 << SStr(index) << ",\"" << rAttr.ToString() << "\")");
1337 const StateAttr* attrp = dynamic_cast<const StateAttr*>(&rAttr);
1338 if(!attrp) {
1339 std::stringstream errstr;
1340 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name();
1341 throw Exception("TaGenerator::StateAttribute", errstr.str(), 63);
1342 }
1343 pStates->Attribute(index, *attrp);
1344}
1345
1346
1347// StateAttribute(index)
1348TEMP const StateAttr& THIS::StateAttribute(Idx index) const {
1349 return pStates->Attribute(index);
1350}
1351
1352// StateAttributep(index)
1353TEMP StateAttr* THIS::StateAttributep(Idx index) {
1354 return pStates->Attributep(index);
1355}
1356
1357// Alphabet()
1358TEMP const TaEventSet<EventAttr>& THIS::Alphabet(void) const {
1359 return *pAlphabet;
1360}
1361
1362// States()
1363TEMP const TaStateSet<StateAttr>& THIS::States(void) const {
1364 return *pStates;
1365}
1366
1367// TransRel()
1368TEMP const typename THIS::ATransSet& THIS::TransRel(void) const {
1369 return *pTransRel;
1370}
1371
1372// TransRel(res)
1373TEMP void THIS::TransRel(TransSetX1EvX2& res) const { mpTransRel->ReSort(res); }
1374TEMP void THIS::TransRel(TransSetEvX1X2& res) const { mpTransRel->ReSort(res); }
1375TEMP void THIS::TransRel(TransSetEvX2X1& res) const { mpTransRel->ReSort(res); }
1376TEMP void THIS::TransRel(TransSetX2EvX1& res) const { mpTransRel->ReSort(res); }
1377TEMP void THIS::TransRel(TransSetX2X1Ev& res) const { mpTransRel->ReSort(res); }
1378TEMP void THIS::TransRel(TransSetX1X2Ev& res) const { mpTransRel->ReSort(res); }
1379
1380
1381#undef THIS
1382#undef TEMP
1383#undef BASE
1384
1385
1386
1387} // namespace faudes
1388
1389#endif
1390
#define TEMP
#define THIS
#define FD_DG(message)
Classes IndexSet, TaIndexSet.
Classes NameSet, TaNameSet.
#define FAUDES_TAPI
Class SymbolTable.
Class Token.
Class TokenReader.
Class TokenWriter.
Classes Transition, TTransSet and TaTransSet.
const std::string & Name(void) const
TaNameSet< EventAttr > * pAlphabet
TaIndexSet< StateAttr > * pStates
const EventAttr & EventAttribute(const std::string &rName) const
virtual TaGenerator NewAGen(void) const
void InjectStates(const StateSet &rNewStates)
void TransRel(TransSetEvX1X2 &res) const
TransAttr * TransAttributep(const Transition &rTrans)
void TransRel(TransSetX2X1Ev &res) const
bool SetTransition(const Transition &rTransition)
bool SetTransition(const Transition &rTransition, const TransAttr &rAttr)
void TransRel(TransSetEvX2X1 &res) const
bool SetTransition(const std::string &rX1, const std::string &rEv, const std::string &rX2)
TaTransSet< TransAttr > ATransSet
const TransAttr & TransAttribute(const Transition &rTrans) const
virtual ~TaGenerator(void)
void TransRel(TransSetX2EvX1 &res) const
void EventAttribute(Idx index, const EventAttr &rAttr)
void TransAttribute(const Transition &rTrans, const Type &rAttr)
virtual TaGenerator * New(void) const
Idx InsEvent(const std::string &rName, const EventAttr &rAttr)
Idx InsState(const std::string &rName)
void GlobalAttribute(const Type &rAttr)
TaGenerator(const TaGenerator &rOtherGen)
TaGenerator(const std::string &rFileName)
virtual void Clear(void)
Idx InsEvent(const std::string &rName)
void TransAttribute(const Transition &rTrans, const TransAttr &rAttr)
EventAttr * EventAttributep(Idx index)
virtual TaGenerator & Assign(const Type &rSrc)
void InjectStates(const TaStateSet< StateAttr > &rNewStates)
bool InsEvent(Idx index)
const TaStateSet< StateAttr > & States(void) const
virtual const Type * Cast(const Type *pOther) const
virtual void Move(TaGenerator &rGen)
const TaEventSet< EventAttr > & Alphabet(void) const
static const TaIndexSet< StateAttr > & StatesTaGen(void)
virtual void NewCore(void)
bool SetTransition(Idx x1, Idx ev, Idx x2)
virtual TaGenerator * Copy(void) const
void TransRel(TransSetX1EvX2 &res) const
virtual void UpdateCore(void)
void InjectTransRel(const ATransSet &rNewtransrel)
const StateAttr & StateAttribute(Idx index) const
void InjectTransRel(const TransSet &rNewtransrel)
GlobalAttr * GlobalAttributep(void)
Idx InsState(const StateAttr &attr)
const GlobalAttr & GlobalAttribute(void) const
void EventAttribute(Idx index, const Type &rAttr)
const ATransSet & TransRel(void) const
TaGenerator(const vGenerator &rOtherGen)
GlobalAttr * pGlobalAttribute
const EventAttr & EventAttribute(Idx index) const
bool InsEvent(Idx index, const EventAttr &rAttr)
void GlobalAttribute(const GlobalAttr &rAttr)
bool InsState(Idx index)
bool InsState(Idx index, const StateAttr &attr)
EventAttr * EventAttributep(const std::string &rName)
void InjectAlphabet(const TaEventSet< EventAttr > &rNewalphabet)
static const TaNameSet< EventAttr > & AlphabetTaGen(void)
void StateAttribute(Idx index, const StateAttr &rAttr)
virtual void Move(Generator &rGen)
static const GlobalAttr & GlobalTaGen(void)
void TransRel(TransSetX1X2Ev &res) const
static const ATransSet & TransRelTaGen(void)
Idx InsState(const std::string &rName, const StateAttr &attr)
void DoAssign(const TaGenerator &rGen)
void StateAttribute(Idx index, const Type &rAttr)
StateAttr * StateAttributep(Idx index)
void InjectAlphabet(const EventSet &rNewalphabet)
bool Valid(void) const
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
std::string ToString(const std::string &rLabel="", const Type *pContext=0) const
SymbolTable mStateSymbolTable
SymbolTable * mpEventSymbolTable
void ConfigureAttributeTypes(const AttributeVoid *pNewGlobalPrototype, const StateSet *pNewStatesPrototype, const EventSet *pNewAlphabetPrototype, const TransSet *pNewTransRelPrototype)
static bool msStateNamesEnabledDefault
std::map< Idx, Idx > mMinStateIndexMap
TaNameSet< AttributeCFlags > Alphabet
TTransSet< TransSort::X1X2Ev > TransSetX1X2Ev
uint32_t Idx

libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen