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 * Copy 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 DoCopy(const IndexSet& rSource);
209
210 /**
211 * Move my members. This method maintains attributes
212 * provided that the type can be appropriately casted.
213 *
214 * @param rSource
215 * Source to copy from
216 */
217 void DoMove(IndexSet& rSource);
218
219 /**
220 * Write to TokenWriter, see Type::Write for public wrappers.
221 * Appends the IndexSet to
222 * TokenWriter. This will write a section with label as specified that holds
223 * integer tokens to represent the IndexSet. For non-default attribute values,
224 * the respective index is followed by the attribute value. The latter may
225 * consist of sections (or tokens different from integer or string) to allow
226 * for transparent reading; see AttributeVoid and AttributeFlags. Example for
227 * a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
228 * nontrivial attribute attached:
229 * \code
230 * <Myset>
231 * 17
232 * 25 <AValue> "Some Value" </AValue>
233 * 40
234 * </MySet>
235 * \endcode
236 *
237 * @param tw
238 * Reference to TokenWriter
239 * @param rLabel
240 * Label of section to write, defaults to name of set or "IndexSet"
241 * @param pContext
242 * Write context to provide contextual information
243 *
244 * @exception Exception
245 * - IO errors (id 2)
246 */
247 virtual void DoWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
248
249 /**
250 * Write to TokenWriter, see Type::Write for public wrappers. Appends the IndexSet to
251 * TokenWriter using XML format.
252 *
253 * @param tw
254 * Reference to TokenWriter
255 * @param rLabel
256 * Label of section to write, defaults to name of set or "IndexSet"
257 * @param pContext
258 * Write context to provide contextual information
259 *
260 * @exception Exception
261 * - IO errors (id 2)
262 */
263 virtual void DoXWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
264
265 /**
266 * Token output for an individual element of the set, strict debug variant. See also
267 * DoWriteElement
268 *
269 * @param rTw
270 * Reference to TokenWriter
271 * @param rElem
272 * The element to write
273 * @param rLabel
274 * Label of section to write, defaults to ElemenTag
275 * @param pContext
276 * Write context to provide contextual information
277 */
278 virtual void DoDWriteElement(TokenWriter& rTw, const Idx& rElem, const std::string &rLabel="", const Type* pContext=0) const;
279
280 /**
281 * Read from TokenReader, see Type::Read for public wrappers.
282 * This method invokes TokenReader::ReadBegin() to seek the specified
283 * section, reads subsequent integer tokens as indexes, and calls matching TokenReader::ReadEnd().
284 * If no section is specified, the section is assumed to start at the current position
285 * of the token stream. If the current position is no begin token,
286 * the section "IndexSet" is read.
287 * When used by a derived class with attributes, attributes are read, too.
288 *
289 * @param rTr
290 * Reference to tokenreader
291 * @param rLabel
292 * Section to read, defaults to current begin label or else "IndexSet"
293 * @param pContext
294 * Read context to provide contextual information
295 *
296 * @exception Exception
297 * - IO errors (id 1)
298 * - token mismatch (id 50, 51, 52)
299 */
300 virtual void DoRead(TokenReader& rTr, const std::string& rLabel="", const Type* pContext=0);
301
302};
303
304/* convenience typedef for stateset */
306
307
308/**
309 * Convenience typedef for vectors of indexsets
310 * \ingroup GeneratorClasses
311 */
314
315
316/**
317 * Set of indices with attributes. A TaIndexSet<Attr> is a template derived from IndexSet,
318 * such that each set element has an Attribute of class Attr.
319 * The template parameter Attr must provide basic functions for file IO and must define a default
320 * value, see AttributeVoid and AttributeFlags for an examples.
321 * Attributes are maintained by an STL map to associate indices
322 * with attributes different from the default value. Thus, attributes with default value
323 * do not take up any memeory.
324 *
325 * @param mAttributeMap
326 * STL map of type std::map<Idx,Attr> to hold attributes
327 *
328 * The copy constructor copies attributes; the methods InsertSet(), EraseSet() and
329 * RestrictSet() maintain attributes; all other set operations derived from IndexSet
330 * either return a IndexSet (no attributes) or set all attributes to the dafault value.
331 * To set or get an attribute of an index that does not exist in the set is considered
332 * as an error and triggers an exception (id 60) when the macro FAUDES_CHECKED is defined.
333 *
334 * The format for token IO is demonstrated by the following example
335 * of a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
336 * nontrivial attribute attached:
337 * \code
338 * <Myset>
339 * 17
340 * 25 <AValue> "Some Value" </AValue>
341 * 40
342 * </MySet>
343 * \endcode
344 * Note that attributes may be either subsections or tokens of type different from integer and string.
345 * This is to allow reading a token stream to a class with incompatible (or no) attributes.
346 */
347
348
349
350template<class Attr>
351class FAUDES_TAPI TaIndexSet : public IndexSet, public TAttrMap<Idx,Attr> {
352
353public:
354
356
357 using IndexSet::operator=;
358 using IndexSet::operator==;
359 using IndexSet::operator!=;
360
361
362 /**
363 * We implement "protected privacy for template classes" by friendship.
364 * This is used for the pragmatic implemention conversion constructors.
365 */
366 friend class IndexSet;
367
368
369 /**
370 * Constructor.
371 */
373
374 /**
375 * Copy-constructor (from TaIndexSet, incl attributes)
376 */
377 TaIndexSet(const TaIndexSet& rOtherSet);
378
379 /**
380 * Copy-constructor (from IndexSet, sets attributes to default)
381 */
382 TaIndexSet(const IndexSet& rOtherSet);
383
384 /**
385 * Construct from file.
386 * This constructor uses the Read(TokenReader&, const std::string&) function to read.
387 *
388 * @param rFilename
389 * Name of file
390 * @param rLabel
391 * Section for the set in file
392 *
393 * @exception Exception
394 * - IO errors (id 1)
395 * - token mismatch (id 50, 51, 52)
396 */
397 TaIndexSet(const std::string& rFilename, const std::string& rLabel = "");
398
399 /**
400 * Virtual destructor
401 */
402 virtual ~TaIndexSet(void) {};
403
404 /** Relaxed assignment method. 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& Copy(const TBaseSet<Idx>& rSrc);
412
413 /** Relaxed assignment operator. Maintain attributes provided they can be casted.
414 *
415 * @param rSrc
416 * Source from which to assign
417 * @return
418 * Ref to this set
419 */
420 virtual TaIndexSet& operator=(const IndexSet& rSrc) { return Copy(rSrc); };
421
422 /**
423 * Iterators on indexset.
424 */
425 using IndexSet::Iterator;
426
427 /**
428 * Insert new index to set using default attribute.
429 *
430 * @return
431 * New index
432 */
433 Idx Insert(void);
434
435 /**
436 * Insert new index with attribute.
437 * If the index allready exists, the
438 * attribute is overwritten by rAttr.
439 *
440 * @param rAttr
441 * Specify attribute of new element
442 * @return
443 * new index
444 */
445 Idx Insert(const Attr& rAttr);
446
447 /**
448 * Insert element. If the element exists, the attribute is maintained.
449 * If the element does not exist, it is inserted with default attribute.
450 *
451 * @param rIndex
452 * Index to specify element
453 * @return
454 * True if element was new to set
455 */
456 bool Insert(const Idx& rIndex);
457
458 /**
459 * Insert element with attribute.
460 *
461 * @param rIndex
462 * Index to specify element
463 * @param attr
464 * Specify attribute of (new) element
465 * @return
466 * True if element was new to set
467 */
468 bool Insert(const Idx& rIndex, const Attr& attr);
469
470 /**
471 * Inserts elements of rOtherSet.
472 *
473 * Attributes of this set are maintained, newly inserted elements attain the
474 * attribute from rOtherSet if it can be casted appropriately.
475 *
476 *
477 * @param rOtherSet
478 * Other IndexSet
479 */
480 virtual void InsertSet(const IndexSet& rOtherSet);
481
482 /**
483 * Inserts elements of rOtherSet.
484 *
485 * This variant uses a runtime cast to access attributes.
486 *
487 * @param rOtherSet
488 * Other IndexSet
489 * @exception Exception
490 * - cast failed (id 67)
491 */
492 virtual void InsertSet(const TBaseSet<Idx>& rOtherSet);
493
494
495 /**
496 * Erase Element (incl its attribute)
497 *
498 * @param rIndex
499 * Index to specify element
500 * @return
501 * True if element used to exist
502 */
503 bool Erase(const Idx& rIndex);
504
505
506 /**
507 * Erase element by iterator (incl attribute)
508 *
509 * @param pos
510 * Iterator to specify element
511 * @return
512 * Iterator to next element or End()
513 */
514 IndexSet::Iterator Erase(const Iterator& pos);
515
516
517 /**
518 * Erase elements given by other set.
519 *
520 * This function ignores the attributes of the other set
521 * and maintains the attributes of the remaining elements in this set.
522 *
523 * @param rOtherSet
524 * Elements to erase
525 */
526 void EraseSet(const IndexSet& rOtherSet);
527
528 /**
529 * Erase elements given by other set.
530 *
531 * This variant uses a runtime cast to access attributes.
532 *
533 * @param rOtherSet
534 * Other IndexSet
535 * @exception Exception
536 * - cast failed (id 67)
537 */
538 virtual void EraseSet(const TBaseSet<Idx>& rOtherSet);
539
540 /**
541 * Restrict to specified subset.
542 *
543 * Erases any elements no in the specified set. This function
544 * ignores the attributes of the other set and maintains the attributes
545 * of the remaining elements in this set.
546 *
547 * @param rOtherSet
548 * Elements to erase
549 */
550 void RestrictSet(const IndexSet& rOtherSet);
551
552 /**
553 * Restrict to specified subset.
554 *
555 * This variant uses a runtime cast to access attributes.
556 *
557 * @param rOtherSet
558 * Other IndexSet
559 * @exception Exception
560 * - cast failed (id 67)
561 */
562 virtual void RestrictSet(const TBaseSet<Idx>& rOtherSet);
563
564
565 /** resolve ambiguities from attribute interface ("using" wont do the job)*/
566 const Attr* AttributeType(void) const { return TAttrMap<Idx,Attr>::AttributeType(); };
567 Attr* Attributep(const Idx& rElem) { return TAttrMap<Idx,Attr>::Attributep(rElem); };
568 const Attr& Attribute(const Idx& rElem) const { return TAttrMap<Idx,Attr>::Attribute(rElem); };
569 void Attribute(const Idx& rElem, const Attr& rAttr) { return TAttrMap<Idx,Attr>::Attribute(rElem,rAttr); };
570 void Attribute(const Idx& rElem, const Type& rAttr) { return TAttrMap<Idx,Attr>::Attribute(rElem,rAttr); };
571 void AttributeTry(const Idx& rElem, const Type& rAttr) { return TAttrMap<Idx,Attr>::AttributeTry(rElem,rAttr); };
572
573
574 protected:
575
576 /**
577 * Copy my members. This method maintains attributes.
578 *
579 * @param rSource
580 * Source to copy from
581 */
582 void DoCopy(const TaIndexSet& rSource);
583
584
585};
586
587/** Convenience Macro (pre C++11) */
588//#define TaStateSet TaIndexSet //
589/** Convenience Typedef (C++11) */
590template <class Attr> using TaStateSet = TaIndexSet<Attr>;
591
592
593/** @} doxygen group */
594
595
596/*
597*************************************************************************************
598*************************************************************************************
599 Implementation
600*************************************************************************************
601*************************************************************************************
602*/
603
604
605// std faudes type
607
608
609// TaIndexSet()
610template<class Attr>
612 IndexSet(),
613 TAttrMap<Idx,Attr>(this)
614{
615 FD_DC("TaIndexSet(" << this << ")::TaIndexSet()");
616}
617
618// TaIndexSet(rOtherSet)
619template<class Attr>
621 IndexSet(),
622 TAttrMap<Idx,Attr>(this)
623{
624 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
625 // copy my members
626 DoCopy(rOtherSet);
627}
628
629// TaIndexSet(rOtherSet)
630template<class Attr>
632 IndexSet(),
633 TAttrMap<Idx,Attr>(this)
634{
635 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
636 // copy my members
637 Copy(rOtherSet);
638}
639
640
641// File constructor
642template<class Attr>
643 TaIndexSet<Attr>::TaIndexSet(const std::string& rFilename, const std::string& rLabel) :
644 IndexSet(),
645 TAttrMap<Idx,Attr>(this)
646{
647 FD_DC("TaIndexSet(" << this << ")::TaIndexSet(" << rFilename << ")");
648 Read(rFilename, rLabel);
649}
650
651
652// DoCopy (attributes known and match)
653template<class Attr>
655 FD_DC("TaIndexSet(" << this << ")::DoCopy( [a] " << &rSourceSet<<")");
656 // call base incl attributes
657 IndexSet::DoCopy(rSourceSet);
658}
659
660// Relaxed Copy()
661template<class Attr>
663 FD_DC("TaIndexSet(" << this << ")::Copy([v] " << &rSourceSet<<")");
664 FD_DC("TaIndexSet(" << this << ")::Copy(): src type " << typeid(rSourceSet).name());
665 FD_DC("TaIndexSet(" << this << ")::Copy(): dst type " << typeid(*this).name());
666#ifdef FAUDES_CHECKED
667 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rSourceSet);
668 if(!iset) {
669 std::stringstream errstr;
670 errstr << "cannot cast to indexset" << std::endl;
671 throw Exception("TaIndexSet::InsertSet", errstr.str(), 67);
672 }
673#endif
674 // call attribute smart base
676 // done
677 return *this;
678}
679
680
681
682// Insert()
683template<class Attr>
685 FD_DC("TaIndexSet(" << this << ")::Insert()");
686 Idx index=MaxIndex()+1;
688 return index;
689}
690
691//Insert(idx)
692template<class Attr>
693bool TaIndexSet<Attr>::Insert(const Idx& rIndex) {
694 FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<")");
695 return TAttrMap<Idx,Attr>::Insert(rIndex);
696}
697
698// Insert(attr)
699template<class Attr>
700Idx TaIndexSet<Attr>::Insert(const Attr& attr) {
701 FD_DC("TaIndexSet(" << this << ")::Insert(" << attr.ToString() << ")");
702 Idx index = Insert();
703 if(!attr.IsDefault()) {
705 }
706 return index;
707}
708
709//Insert(idx,attr)
710template<class Attr>
711bool TaIndexSet<Attr>::Insert(const Idx& rIndex, const Attr& attr) {
712 FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<",attr)");
713 return TAttrMap<Idx,Attr>::Insert(rIndex,attr);
714}
715
716
717// InsertSet(set)
718template<class Attr>
719void TaIndexSet<Attr>::InsertSet(const IndexSet& rOtherSet) {
720 FD_DC("TaIndexSet(" << this << ")::InsertSet(" << &rOtherSet << ")");
722}
723
724//InsertSet(set)
725template<class Attr>
727#ifdef FAUDES_CHECKED
728 FD_DC("TaIndexSet(" << this << ")::InsertSet(" << rOtherSet.ToString() << ")");
729 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
730 if(!iset) {
731 std::stringstream errstr;
732 errstr << "cannot cast to indexset" << std::endl;
733 throw Exception("TaIndexSet::InsertSet", errstr.str(), 67);
734 }
735#endif
737}
738
739//Erase(idx)
740template<class Attr>
741bool TaIndexSet<Attr>::Erase(const Idx& rIndex) {
742 return TAttrMap<Idx,Attr>::Erase(rIndex);
743}
744
745//Erase(pos)
746template<class Attr>
747typename IndexSet::Iterator TaIndexSet<Attr>::Erase(const Iterator& pos) {
748 return TAttrMap<Idx,Attr>::Erase(pos);
749}
750
751
752//EraseSet(set)
753template<class Attr>
754void TaIndexSet<Attr>::EraseSet(const IndexSet& rOtherSet) {
755 FD_DC("TaIndexSet(" << this << ")::EraseSet(" << rOtherSet.ToString() << ")");
757}
758
759//EraseSet(set)
760template<class Attr>
762#ifdef FAUDES_CHECKED
763 FD_DC("TaIndexSet(" << this << ")::EraseSet(" << rOtherSet.ToString() << ")");
764 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
765 if(!iset) {
766 std::stringstream errstr;
767 errstr << "cannot cast to indexset" << std::endl;
768 throw Exception("TaIndexSet::EraseSet", errstr.str(), 67);
769 }
770#endif
772}
773
774//RestrictSet(set)
775template<class Attr>
777 FD_DC("TaIndexSet(" << this << ")::RestrictSet(" << rOtherSet.ToString() << ")");
779}
780
781//RestrictSet(set)
782template<class Attr>
784#ifdef FAUDES_CHECKED
785 FD_DC("TaIndexSet(" << this << ")::RestrictSet(" << rOtherSet.ToString() << ")");
786 const IndexSet* iset = dynamic_cast<const IndexSet*>(&rOtherSet);
787 if(!iset) {
788 std::stringstream errstr;
789 errstr << "cannot cast to indexset" << std::endl;
790 throw Exception("TaIndexSet::RestrictSet", errstr.str(), 67);
791 }
792#endif
794}
795
796
797
798
799} // namespace faudes
800
801
802
803#endif
804
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:931
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
Definition cfl_types.h:918
#define FAUDES_TYPE_TIMPLEMENTATION(ftype, ctype, cbase, ctemp)
Definition cfl_types.h:1050
virtual ~IndexSet(void)
virtual std::string Str(void) const
virtual std::string Str(const Idx &rIndex) const
void DoCopy(const IndexSet &rSource)
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 CopyWithAttributes(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 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)
virtual TaIndexSet & Copy(const TBaseSet< Idx > &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)
IndexSet::Iterator Erase(const Iterator &pos)
bool Insert(const Idx &rIndex, const Attr &attr)
void DoCopy(const TaIndexSet &rSource)
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.34d --- 2026.03.11 --- c++ api documentaion by doxygen