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

libFAUDES 2.33h --- 2025.06.18 --- c++ api documentaion by doxygen