cfl_indexset.h
Go to the documentation of this file.
1/** @file cfl_indexset.h @brief Classes IndexSet, TaIndexSet */
2
3
4/* FAU Discrete Event Systems Library (libfaudes)
5
6 Copyright (C) 2006 Bernd Opitz
7 Copyright (C) 2007, 2024 Thomas Moor
8 Exclusive copyright is granted to Klaus Schmidt
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24
25
26#ifndef FAUDES_INDEXSET_H
27#define FAUDES_INDEXSET_H
28
29#include "cfl_definitions.h"
30#include "cfl_exception.h"
31#include "cfl_attrmap.h"
32#include "cfl_symboltable.h"
33#include "cfl_registry.h"
34#include "cfl_basevector.h"
35#include <algorithm>
36
37
38namespace faudes {
39
40
41
42/** @addtogroup ContainerClasses */
43/** @{*/
44
45// Forward declaration for the attributed version of indexset
46template<class Attr> class TaIndexSet;
47
48/**
49 * Set of indices. This class is built on top of the faudes version
50 * TBaseSet of STL sets. It provides the essentials of the STL interface
51 * and inherits the standard token IO interface from Type, so you may
52 * use Read and Write for file/string/console IO.
53 *
54 * IndexSet is used as common base for TaIndexSet (indices with attributes),
55 * NameSet (indices with symbolic names) and TaNameSet (indices with
56 * attributes and symbolic names).
57 *
58 * The index of value 0 is reserved to indicate the invalid index. If the macro FAUDES_CHECKED
59 * is defined, the attempt to insert an index 0 triggers an exception (id 61). Invalid
60 * iterators throw an exception (id 62) when used as an argument to a IndexSet function.
61 *
62 * Technically, file IO is done by TaIndexSet functions. This requires a copy and for
63 * that reason may be reimplemented in a future versions.
64 * The format is demonstrated by the following example
65 * of a set with name "MySet" consisting of indices 17, 25, 26, 27, 28, 40:
66 * \code
67 * <Myset>
68 * 17
69 * <Consecutive> 25 4 </Consecutive>
70 * 40
71 * </MySet>
72 * \endcode
73 * Theere is a minimum number of consecutive indices for the use of the consecutive
74 * section defined in definitions.h.
75 *
76 */
77
78class FAUDES_API IndexSet : public TBaseSet<Idx> {
79
80public:
81
83
84 using TBaseSet<Idx>::operator=;
85 using TBaseSet<Idx>::operator==;
86 using TBaseSet<Idx>::operator!=;
87
88 /**
89 * We implement "protected privacy for template classes" by friendship.
90 * This is used for the pragmatic implemention conversion constructors.
91 */
92 template<class Attr> friend class TaIndexSet;
93
94
95 /**
96 * Constructor.
97 */
98 IndexSet(void);
99
100 /**
101 * Copy-constructor.
102 */
103 IndexSet(const IndexSet& rOtherSet);
104
105 /**
106 * Copy-constructor.
107 */
108 IndexSet(const TBaseSet<Idx>& rOtherSet);
109
110 /**
111 * Construct from file. Uses the Read(TokenReader&, const std::string&) function to read.
112 * a IndexSet from section rLabel in file rFilename.
113 *
114 * @param rFilename
115 * Name of file to read
116 * @param rLabel
117 * Section to read
118 *
119 * @exception Exception
120 * - IO Errors (id 1)
121 * - Token mismatch (id 50, 51, 52)
122 */
123 IndexSet(const std::string& rFilename, const std::string& rLabel = "");
124
125 /**
126 * Virtual destructor
127 */
128 virtual ~IndexSet(void) {};
129
130 /**
131 * Get maximum index used in this set (0 for emptyset)
132 *
133 * @return
134 * max indices
135 */
136 Idx MaxIndex(void) const;
137
138 /**
139 * Test whether index is not 0
140 * @param rIndex
141 * Index to test
142 * @return
143 * True if idx!=0
144 */
145 bool Valid(const Idx& rIndex) const;
146
147 /**
148 * Iterators on indexset.
149 */
150 using TBaseSet<Idx>::Iterator;
151
152 /**
153 * Insert new index to set
154 *
155 * @return
156 * New index
157 */
158 Idx Insert(void);
159
160 /**
161 * Insert specified index
162 *
163 * @param rIndex
164 * Index to insert
165 * @return
166 * True if index was new to set
167 */
168 bool Insert(const Idx& rIndex);
169
170 /**
171 * Compute an Idx type signature for a Set. The value is computed by
172 * summing up the product of every index with an integer starting at
173 * 1 (for the first index) and ending at Size() (for the last index).
174 *
175 * @return
176 * Idx type set signature
177 */
178 Idx Signature(void) const;
179
180 /**
181 * Return pretty printable index.
182 *
183 * @param rIndex
184 * Index to print
185 *
186 * @return
187 * String
188 */
189 virtual std::string Str(const Idx& rIndex) const {return ToStringInteger(rIndex); };
190
191 /**
192 * Return pretty printable set.
193 *
194 * @return
195 * String
196 */
197 virtual std::string Str(void) const {return TBaseSet<Idx>::Str(); };
198
199 protected:
200
201 /**
202 * Assign my members. This method maintains attributes
203 * provided that the type can be appropriately casted.
204 *
205 * @param rSource
206 * Source to copy from
207 */
208 void DoAssign(const IndexSet& rSource);
209
210 /**
211 * Write to TokenWriter, see Type::Write for public wrappers.
212 * Appends the IndexSet to
213 * TokenWriter. This will write a section with label as specified that holds
214 * integer tokens to represent the IndexSet. For non-default attribute values,
215 * the respective index is followed by the attribute value. The latter may
216 * consist of sections (or tokens different from integer or string) to allow
217 * for transparent reading; see AttributeVoid and AttributeFlags. Example for
218 * a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
219 * nontrivial attribute attached:
220 * \code
221 * <Myset>
222 * 17
223 * 25 <AValue> "Some Value" </AValue>
224 * 40
225 * </MySet>
226 * \endcode
227 *
228 * @param tw
229 * Reference to TokenWriter
230 * @param rLabel
231 * Label of section to write, defaults to name of set or "IndexSet"
232 * @param pContext
233 * Write context to provide contextual information
234 *
235 * @exception Exception
236 * - IO errors (id 2)
237 */
238 virtual void DoWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
239
240 /**
241 * Write to TokenWriter, see Type::Write for public wrappers. Appends the IndexSet to
242 * TokenWriter using XML format.
243 *
244 * @param tw
245 * Reference to TokenWriter
246 * @param rLabel
247 * Label of section to write, defaults to name of set or "IndexSet"
248 * @param pContext
249 * Write context to provide contextual information
250 *
251 * @exception Exception
252 * - IO errors (id 2)
253 */
254 virtual void DoXWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
255
256 /**
257 * Token output for an individual element of the set, strict debug variant. See also
258 * DoWriteElement
259 *
260 * @param rTw
261 * Reference to TokenWriter
262 * @param rElem
263 * The element to write
264 * @param rLabel
265 * Label of section to write, defaults to ElemenTag
266 * @param pContext
267 * Write context to provide contextual information
268 */
269 virtual void DoDWriteElement(TokenWriter& rTw, const Idx& rElem, const std::string &rLabel="", const Type* pContext=0) const;
270
271 /**
272 * Read from TokenReader, see Type::Read for public wrappers.
273 * This method invokes TokenReader::ReadBegin() to seek the specified
274 * section, reads subsequent integer tokens as indexes, and calls matching TokenReader::ReadEnd().
275 * If no section is specified, the section is assumed to start at the current position
276 * of the token stream. If the current position is no begin token,
277 * the section "IndexSet" is read.
278 * When used by a derived class with attributes, attributes are read, too.
279 *
280 * @param rTr
281 * Reference to tokenreader
282 * @param rLabel
283 * Section to read, defaults to current begin label or else "IndexSet"
284 * @param pContext
285 * Read context to provide contextual information
286 *
287 * @exception Exception
288 * - IO errors (id 1)
289 * - token mismatch (id 50, 51, 52)
290 */
291 virtual void DoRead(TokenReader& rTr, const std::string& rLabel="", const Type* pContext=0);
292
293};
294
295/* convenience typedef for stateset */
297
298
299/**
300 * Convenience typedef for vectors of indexsets
301 * \ingroup GeneratorClasses
302 */
305
306
307/**
308 * Set of indices with attributes. A TaIndexSet<Attr> is a template derived from IndexSet,
309 * such that each set element has an Attribute of class Attr.
310 * The template parameter Attr must provide basic functions for file IO and must define a default
311 * value, see AttributeVoid and AttributeFlags for an examples.
312 * Attributes are maintained by an STL map to associate indices
313 * with attributes different from the default value. Thus, attributes with default value
314 * do not take up any memeory.
315 *
316 * @param mAttributeMap
317 * STL map of type std::map<Idx,Attr> to hold attributes
318 *
319 * The copy constructor copies attributes; the methods InsertSet(), EraseSet() and
320 * RestrictSet() maintain attributes; all other set operations derived from IndexSet
321 * either return a IndexSet (no attributes) or set all attributes to the dafault value.
322 * To set or get an attribute of an index that does not exist in the set is considered
323 * as an error and triggers an exception (id 60) when the macro FAUDES_CHECKED is defined.
324 *
325 * The format for token IO is demonstrated by the following example
326 * of a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
327 * nontrivial attribute attached:
328 * \code
329 * <Myset>
330 * 17
331 * 25 <AValue> "Some Value" </AValue>
332 * 40
333 * </MySet>
334 * \endcode
335 * Note that attributes may be either subsections or tokens of type different from integer and string.
336 * This is to allow reading a token stream to a class with incompatible (or no) attributes.
337 */
338
339
340
341template<class Attr>
342class FAUDES_TAPI TaIndexSet : public IndexSet, public TAttrMap<Idx,Attr> {
343
344public:
345
347
348 using IndexSet::operator=;
349 using IndexSet::operator==;
350 using IndexSet::operator!=;
351
352
353 /**
354 * We implement "protected privacy for template classes" by friendship.
355 * This is used for the pragmatic implemention conversion constructors.
356 */
357 friend class IndexSet;
358
359
360 /**
361 * Constructor.
362 */
364
365 /**
366 * Copy-constructor (from TaIndexSet, incl attributes)
367 */
368 TaIndexSet(const TaIndexSet& rOtherSet);
369
370 /**
371 * Copy-constructor (from IndexSet, sets attributes to default)
372 */
373 TaIndexSet(const IndexSet& rOtherSet);
374
375 /**
376 * Construct from file.
377 * This constructor uses the Read(TokenReader&, const std::string&) function to read.
378 *
379 * @param rFilename
380 * Name of file
381 * @param rLabel
382 * Section for the set in file
383 *
384 * @exception Exception
385 * - IO errors (id 1)
386 * - token mismatch (id 50, 51, 52)
387 */
388 TaIndexSet(const std::string& rFilename, const std::string& rLabel = "");
389
390 /**
391 * Virtual destructor
392 */
393 virtual ~TaIndexSet(void) {};
394
395 /** Relaxed assignment method. Maintain attributes provided they can be casted.
396 *
397 * @param rSrc
398 * Source from which to assign
399 * @return
400 * Ref to this set
401 */
402 virtual TaIndexSet& Assign(const TBaseSet<Idx>& rSrc);
403
404 /** Relaxed assignment operator. Maintain attributes provided they can be casted.
405 *
406 * @param rSrc
407 * Source from which to assign
408 * @return
409 * Ref to this set
410 */
411 virtual TaIndexSet& operator=(const IndexSet& rSrc) { return Assign(rSrc); };
412
413 /**
414 * Iterators on indexset.
415 */
416 using IndexSet::Iterator;
417
418 /**
419 * Insert new index to set using default attribute.
420 *
421 * @return
422 * New index
423 */
424 Idx Insert(void);
425
426 /**
427 * Insert new index with attribute.
428 * If the index allready exists, the
429 * attribute is overwritten by rAttr.
430 *
431 * @param rAttr
432 * Specify attribute of new element
433 * @return
434 * new index
435 */
436 Idx Insert(const Attr& rAttr);
437
438 /**
439 * Insert element. If the element exists, the attribute is maintained.
440 * If the element does not exist, it is inserted with default attribute.
441 *
442 * @param rIndex
443 * Index to specify element
444 * @return
445 * True if element was new to set
446 */
447 bool Insert(const Idx& rIndex);
448
449 /**
450 * Insert element with attribute.
451 *
452 * @param rIndex
453 * Index to specify element
454 * @param attr
455 * Specify attribute of (new) element
456 * @return
457 * True if element was new to set
458 */
459 bool Insert(const Idx& rIndex, const Attr& attr);
460
461 /**
462 * Inserts elements of rOtherSet.
463 *
464 * Attributes of this set are maintained, newly inserted elements attain the
465 * attribute from rOtherSet if it can be casted appropriately.
466 *
467 *
468 * @param rOtherSet
469 * Other IndexSet
470 */
471 virtual void InsertSet(const IndexSet& rOtherSet);
472
473 /**
474 * Inserts elements of rOtherSet.
475 *
476 * This variant uses a runtime cast to access attributes.
477 *
478 * @param rOtherSet
479 * Other IndexSet
480 * @exception Exception
481 * - cast failed (id 67)
482 */
483 virtual void InsertSet(const TBaseSet<Idx>& rOtherSet);
484
485
486 /**
487 * Erase Element (incl its attribute)
488 *
489 * @param rIndex
490 * Index to specify element
491 * @return
492 * True if element used to exist
493 */
494 bool Erase(const Idx& rIndex);
495
496
497 /**
498 * Erase element by iterator (incl attribute)
499 *
500 * @param pos
501 * Iterator to specify element
502 * @return
503 * Iterator to next element or End()
504 */
505 IndexSet::Iterator Erase(const Iterator& pos);
506
507
508 /**
509 * Erase elements given by other set.
510 *
511 * This function ignores the attributes of the other set
512 * and maintains the attributes of the remaining elements in this set.
513 *
514 * @param rOtherSet
515 * Elements to erase
516 */
517 void EraseSet(const IndexSet& rOtherSet);
518
519 /**
520 * Erase elements given by other set.
521 *
522 * This variant uses a runtime cast to access attributes.
523 *
524 * @param rOtherSet
525 * Other IndexSet
526 * @exception Exception
527 * - cast failed (id 67)
528 */
529 virtual void EraseSet(const TBaseSet<Idx>& rOtherSet);
530
531 /**
532 * Restrict to specified subset.
533 *
534 * Erases any elements no in the specified set. This function
535 * ignores the attributes of the other set and maintains the attributes
536 * of the remaining elements in this set.
537 *
538 * @param rOtherSet
539 * Elements to erase
540 */
541 void RestrictSet(const IndexSet& rOtherSet);
542
543 /**
544 * Restrict to specified subset.
545 *
546 * This variant uses a runtime cast to access attributes.
547 *
548 * @param rOtherSet
549 * Other IndexSet
550 * @exception Exception
551 * - cast failed (id 67)
552 */
553 virtual void RestrictSet(const TBaseSet<Idx>& rOtherSet);
554
555
556 /** resolve ambiguities from attribute interface ("using" wont do the job)*/
557 const Attr* AttributeType(void) const { return TAttrMap<Idx,Attr>::AttributeType(); };
558 Attr* Attributep(const Idx& rElem) { return TAttrMap<Idx,Attr>::Attributep(rElem); };
559 const Attr& Attribute(const Idx& rElem) const { return TAttrMap<Idx,Attr>::Attribute(rElem); };
560 void Attribute(const Idx& rElem, const Attr& rAttr) { return TAttrMap<Idx,Attr>::Attribute(rElem,rAttr); };
561 void Attribute(const Idx& rElem, const Type& rAttr) { return TAttrMap<Idx,Attr>::Attribute(rElem,rAttr); };
562 void AttributeTry(const Idx& rElem, const Type& rAttr) { return TAttrMap<Idx,Attr>::AttributeTry(rElem,rAttr); };
563
564
565 protected:
566
567 /**
568 * Assign my members. This method maintains attributes.
569 *
570 * @param rSource
571 * Source to copy from
572 */
573 void DoAssign(const TaIndexSet& rSource);
574
575
576};
577
578/** Convenience Macro (pre C++11) */
579//#define TaStateSet TaIndexSet //
580/** Convenience Typedef (C++11) */
581template <class Attr> using TaStateSet = TaIndexSet<Attr>;
582
583
584/** @} doxygen group */
585
586
587/*
588*************************************************************************************
589*************************************************************************************
590 Implementation
591*************************************************************************************
592*************************************************************************************
593*/
594
595
596// std faudes type
598
599
600// TaIndexSet()
601template<class Attr>
603 IndexSet(),
604 TAttrMap<Idx,Attr>(this)
605{
606 FD_DC("TaIndexSet(" << this << ")::TaIndexSet()");
607}
608
609// TaIndexSet(rOtherSet)
610template<class Attr>
612 IndexSet(),
613 TAttrMap<Idx,Attr>(this)
614{
615 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
616 // copy my members
617 DoAssign(rOtherSet);
618}
619
620// TaIndexSet(rOtherSet)
621template<class Attr>
623 IndexSet(),
624 TAttrMap<Idx,Attr>(this)
625{
626 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
627 // copy my members
628 Assign(rOtherSet);
629}
630
631
632// File constructor
633template<class Attr>
634 TaIndexSet<Attr>::TaIndexSet(const std::string& rFilename, const std::string& rLabel) :
635 IndexSet(),
636 TAttrMap<Idx,Attr>(this)
637{
638 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(" << rFilename << ")");
639 Read(rFilename, rLabel);
640}
641
642
643// DoAssign (attributes known and match)
644template<class Attr>
646 FD_DC("TaIndexSet(" << this << ")::DoAssign( [a] " << &rSourceSet<<")");
647 // call base incl attributes
648 IndexSet::DoAssign(rSourceSet);
649}
650
651// Relaxed Assign()
652template<class Attr>
654 FD_DC("TaIndexSet(" << this << ")::Assign([v] " << &rSourceSet<<")");
655 FD_DC("TaIndexSet(" << this << ")::Assign(): src type " << typeid(rSourceSet).name());
656 FD_DC("TaIndexSet(" << this << ")::Assign(): dst type " << typeid(*this).name());
657#ifdef FAUDES_CHECKED
658 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rSourceSet);
659 if(!iset) {
660 std::stringstream errstr;
661 errstr << "cannot cast to indexset" << std::endl;
662 throw Exception("TaIndexSet::InsertSet", errstr.str(), 67);
663 }
664#endif
665 // call attribute smart base
667 // done
668 return *this;
669}
670
671
672
673// Insert()
674template<class Attr>
676 FD_DC("TaIndexSet(" << this << ")::Insert()");
677 Idx index=MaxIndex()+1;
679 return index;
680}
681
682//Insert(idx)
683template<class Attr>
684bool TaIndexSet<Attr>::Insert(const Idx& rIndex) {
685 FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<")");
686 return TAttrMap<Idx,Attr>::Insert(rIndex);
687}
688
689// Insert(attr)
690template<class Attr>
691Idx TaIndexSet<Attr>::Insert(const Attr& attr) {
692 FD_DC("TaIndexSet(" << this << ")::Insert(" << attr.ToString() << ")");
693 Idx index = Insert();
694 if(!attr.IsDefault()) {
696 }
697 return index;
698}
699
700//Insert(idx,attr)
701template<class Attr>
702bool TaIndexSet<Attr>::Insert(const Idx& rIndex, const Attr& attr) {
703 FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<",attr)");
704 return TAttrMap<Idx,Attr>::Insert(rIndex,attr);
705}
706
707
708// InsertSet(set)
709template<class Attr>
710void TaIndexSet<Attr>::InsertSet(const IndexSet& rOtherSet) {
711 FD_DC("TaIndexSet(" << this << ")::InsertSet(" << &rOtherSet << ")");
713}
714
715//InsertSet(set)
716template<class Attr>
718#ifdef FAUDES_CHECKED
719 FD_DC("TaIndexSet(" << this << ")::InsertSet(" << rOtherSet.ToString() << ")");
720 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
721 if(!iset) {
722 std::stringstream errstr;
723 errstr << "cannot cast to indexset" << std::endl;
724 throw Exception("TaIndexSet::InsertSet", errstr.str(), 67);
725 }
726#endif
728}
729
730//Erase(idx)
731template<class Attr>
732bool TaIndexSet<Attr>::Erase(const Idx& rIndex) {
733 return TAttrMap<Idx,Attr>::Erase(rIndex);
734}
735
736//Erase(pos)
737template<class Attr>
738typename IndexSet::Iterator TaIndexSet<Attr>::Erase(const Iterator& pos) {
739 return TAttrMap<Idx,Attr>::Erase(pos);
740}
741
742
743//EraseSet(set)
744template<class Attr>
745void TaIndexSet<Attr>::EraseSet(const IndexSet& rOtherSet) {
746 FD_DC("TaIndexSet(" << this << ")::EraseSet(" << rOtherSet.ToString() << ")");
748}
749
750//EraseSet(set)
751template<class Attr>
753#ifdef FAUDES_CHECKED
754 FD_DC("TaIndexSet(" << this << ")::EraseSet(" << rOtherSet.ToString() << ")");
755 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
756 if(!iset) {
757 std::stringstream errstr;
758 errstr << "cannot cast to indexset" << std::endl;
759 throw Exception("TaIndexSet::EraseSet", errstr.str(), 67);
760 }
761#endif
763}
764
765//RestrictSet(set)
766template<class Attr>
768 FD_DC("TaIndexSet(" << this << ")::RestrictSet(" << rOtherSet.ToString() << ")");
770}
771
772//RestrictSet(set)
773template<class Attr>
775#ifdef FAUDES_CHECKED
776 FD_DC("TaIndexSet(" << this << ")::RestrictSet(" << rOtherSet.ToString() << ")");
777 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
778 if(!iset) {
779 std::stringstream errstr;
780 errstr << "cannot cast to indexset" << std::endl;
781 throw Exception("TaIndexSet::RestrictSet", errstr.str(), 67);
782 }
783#endif
785}
786
787
788
789
790} // namespace faudes
791
792
793
794#endif
795
Class TAttrMap.
Class TBaseVector.
#define FD_DC(message)
#define FAUDES_API
#define FAUDES_TAPI
Class SymbolTable.
#define FAUDES_TYPE_TDECLARATION(ftype, ctype, cbase)
Definition cfl_types.h:890
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
Definition cfl_types.h:879
#define FAUDES_TYPE_TIMPLEMENTATION(ftype, ctype, cbase, ctemp)
Definition cfl_types.h:984
virtual ~IndexSet(void)
virtual std::string Str(void) const
void DoAssign(const IndexSet &rSource)
virtual std::string Str(const Idx &rIndex) const
const Attr & Attribute(const T &rElem) const
bool Erase(const T &rElem)
void EraseSet(const TBaseSet< T, Cmp > &rOtherSet)
void InsertSet(const TBaseSet< T, Cmp > &rOtherSet)
void RestrictSet(const TBaseSet< T, Cmp > &rOtherSet)
void AssignWithAttributes(const TBaseSet< T, Cmp > &rSourceSet)
bool Insert(const T &rElem)
bool Erase(const Idx &rIndex)
TaIndexSet(const std::string &rFilename, const std::string &rLabel="")
TaIndexSet(const IndexSet &rOtherSet)
Attr * Attributep(const Idx &rElem)
virtual void InsertSet(const IndexSet &rOtherSet)
virtual TaIndexSet & Assign(const TBaseSet< Idx > &rSrc)
virtual void EraseSet(const TBaseSet< Idx > &rOtherSet)
bool Insert(const Idx &rIndex)
const Attr * AttributeType(void) const
void Attribute(const Idx &rElem, const Type &rAttr)
void AttributeTry(const Idx &rElem, const Type &rAttr)
virtual TaIndexSet & operator=(const IndexSet &rSrc)
void EraseSet(const IndexSet &rOtherSet)
Idx Insert(const Attr &rAttr)
void RestrictSet(const IndexSet &rOtherSet)
void Attribute(const Idx &rElem, const Attr &rAttr)
virtual void InsertSet(const TBaseSet< Idx > &rOtherSet)
const Attr & Attribute(const Idx &rElem) const
TaIndexSet(const TaIndexSet &rOtherSet)
void DoAssign(const TaIndexSet &rSource)
IndexSet::Iterator Erase(const Iterator &pos)
bool Insert(const Idx &rIndex, const Attr &attr)
virtual ~TaIndexSet(void)
virtual void RestrictSet(const TBaseSet< Idx > &rOtherSet)
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
TBaseVector< StateSet > StateSetVector
IndexSet StateSet
TBaseVector< IndexSet > IndexSetVector
uint32_t Idx
std::string ToStringInteger(Int number)
Definition cfl_utils.cpp:43

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