About
User Reference
C++ API
luafaudes
Developer
Links
libFAUDES online
libFAUDES

Sections

Index

cfl_indexset.h

Go to the documentation of this file.
00001 /** @file cfl_indexset.h @brief Classes IndexSet, TaIndexSet */
00002 
00003 
00004 /* FAU Discrete Event Systems Library (libfaudes)
00005 
00006    Copyright (C) 2006  Bernd Opitz
00007    Copyright (C) 2007  Thomas Moor
00008    Exclusive copyright is granted to Klaus Schmidt
00009 
00010    This library is free software; you can redistribute it and/or
00011    modify it under the terms of the GNU Lesser General Public
00012    License as published by the Free Software Foundation; either
00013    version 2.1 of the License, or (at your option) any later version.
00014 
00015    This library is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018    Lesser General Public License for more details.
00019 
00020    You should have received a copy of the GNU Lesser General Public
00021    License along with this library; if not, write to the Free Software
00022    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00023 
00024 
00025 
00026 #ifndef FAUDES_INDEXSET_H
00027 #define FAUDES_INDEXSET_H
00028 
00029 #include "cfl_definitions.h"
00030 #include "cfl_exception.h"
00031 #include "cfl_abaseset.h"
00032 #include "cfl_symboltable.h"
00033 #include "cfl_registry.h"
00034 #include <algorithm>
00035 
00036 
00037 namespace faudes {
00038 
00039 
00040 
00041 /** @addtogroup ContainerClasses */
00042 /** @{*/
00043 
00044 // Forward declaration for the attributed version of indexset
00045 template<class Attr> class TaIndexSet;
00046 
00047 /**
00048  * Set of indices. This class is built on top of the faudes version
00049  * TBaseSet of STL sets. It provides the essentials of the STL interface
00050  * and inherits the standard token IO interface from Type, so you may 
00051  * use Read and Write for file/string/console IO.
00052  *
00053  * IndexSet is used as common base for TaIndexSet (indices with attributes),
00054  * NameSet (indices with symbolic names) and TaNameSet (indices with
00055  * attributes and symbolic names).
00056  *
00057  * The index of value 0 is reserved to indicate the invalid index. If the macro FAUDES_CHECKED
00058  * is defined, the attempt to insert an index 0 triggers an exception (id 61). Invalid
00059  * iterators throw an exception (id 62) when used as an argument to a IndexSet function. 
00060  *
00061  * Technically, file IO is done by TaIndexSet functions. This requires a copy and for
00062  * that reason may be reimplemented in a future versions.
00063  * The format is demonstrated by the following example
00064  * of a set with name "MySet" consisting of indices 17, 25, 26, 27, 28, 40:
00065  * \code
00066  * <Myset> 
00067  * 17 
00068  * <Consecutive> 25 4 </Consecutive> 
00069  * 40 
00070  * </MySet>  
00071  * \endcode
00072  * Theere is a minimum number of consecutive indices for the use of the consecutive
00073  * section defined in definitions.h.
00074  *
00075  */
00076 
00077 class IndexSet : public virtual TBaseSet<Idx> {
00078 
00079 FAUDES_TYPE_DECLARATION(IndexSet,IndexSet,TBaseSet<Idx>)
00080 
00081 public:
00082 
00083   /** 
00084    * We implement "protected privacy for template classes" by friendship.
00085    * This is used for the pragmatic implemention conversion constructors.
00086    */
00087   template<class Attr> friend class TaIndexSet;
00088 
00089 
00090   /**
00091    * Constructor. 
00092    */
00093   IndexSet(void);
00094 
00095   /**
00096    * Copy-constructor. 
00097    */
00098   IndexSet(const IndexSet& rOtherSet);
00099 
00100   /**
00101    * Copy-constructor. 
00102    */
00103   IndexSet(const TBaseSet<Idx>& rOtherSet);
00104 
00105   /**
00106    * Construct from file. Uses the Read(TokenReader&, const std::string&) function to read.
00107    * a IndexSet from section rLabel in file rFilename.
00108    *
00109    * @param rFilename
00110    *   Name of file to read
00111    * @param rLabel
00112    *   Section to read
00113    *
00114    * @exception Exception
00115    *   - IO Errors (id 1)
00116    *   - Token mismatch (id 50, 51, 52)
00117    */
00118   IndexSet(const std::string& rFilename, const std::string& rLabel = "");
00119 
00120   /**
00121    * Virtual destructor
00122    */
00123   virtual ~IndexSet(void) {};
00124 
00125   /**
00126    * Get maximum index used in this set (0 for emptyset)
00127    *
00128    * @return 
00129    *   max  indices 
00130    */
00131   Idx MaxIndex(void) const;
00132 
00133   /**
00134    * Test whether index is not 0
00135    * @param rIndex
00136    *    Index to test
00137    * @return
00138    *    True if idx!=0
00139    */
00140    bool Valid(const Idx& rIndex) const;
00141    
00142   /** 
00143    * Iterators on indexset. 
00144    */
00145   typedef TBaseSet<Idx>::Iterator Iterator;
00146 
00147   /**
00148    * Insert new index to set
00149    *
00150    * @return
00151    *   New index 
00152    */
00153   Idx Insert(void);
00154 
00155   /** 
00156    * Insert specified index
00157    *
00158    * @param rIndex
00159    *    Index to insert
00160    * @return
00161    *   True if index was new to set 
00162    */
00163   bool Insert(const Idx& rIndex);
00164 
00165   /**
00166    * Compute an Idx type signature for a Set. The value is computed by 
00167    * summing up the product of every index with an integer starting at
00168    * 1 (for the first index) and ending at Size() (for the last index).
00169    *
00170    * @return
00171    *   Idx type set signature
00172    */
00173   Idx Signature(void) const;
00174 
00175   /**
00176    * Return pretty printable index. 
00177    *
00178    * @param rIndex
00179    *   Index to print
00180    *
00181    * @return
00182    *   String
00183    */
00184   std::string Str(const Idx& rIndex) const {return ToStringInteger(rIndex); };
00185 
00186  protected:
00187 
00188   /**
00189    * Assign my members. This method maintains attributes
00190    * provided that the type can be appropriately casted.
00191    *
00192    * @param rSource 
00193    *    Source to copy from
00194    * @return
00195    *    Ref to this set
00196    */
00197   virtual void DoAssign(const IndexSet& rSource);
00198 
00199   /** 
00200    * Write to TokenWriter, see Type::Write for public wrappers.
00201    * Appends the IndexSet to 
00202    * TokenWriter. This will write a section with label as specified that holds
00203    * integer tokens to represent the IndexSet. For non-default attribute values,
00204    * the respective index is followed by the attribute value. The latter may 
00205    * consist of sections (or tokens different from integer or string) to allow
00206    * for transparent reading; see AttributeVoid and AttributeFlags. Example for
00207    * a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
00208    * nontrivial attribute attached:
00209    * \code
00210    * <Myset> 
00211    * 17 
00212    * 25 <AValue> "Some Value" </AValue> 
00213    * 40 
00214    * </MySet>  
00215    * \endcode
00216    *
00217    * @param tw
00218    *   Reference to TokenWriter
00219    * @param rLabel
00220    *   Label of section to write, defaults to name of set or "IndexSet"
00221    * @param pContext
00222    *   Write context to provide contextual information
00223    *
00224    * @exception Exception
00225    *   - IO errors (id 2)
00226    */
00227   virtual void DoWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
00228 
00229   /** 
00230    * Write to TokenWriter, see Type::Write for public wrappers. Appends the IndexSet to 
00231    * TokenWriter using XML format. 
00232    *
00233    * @param tw
00234    *   Reference to TokenWriter
00235    * @param rLabel
00236    *   Label of section to write, defaults to name of set or "IndexSet"
00237    * @param pContext
00238    *   Write context to provide contextual information
00239    *
00240    * @exception Exception
00241    *   - IO errors (id 2)
00242    */
00243   virtual void DoXWrite(TokenWriter& tw, const std::string& rLabel="", const Type* pContext=0) const;
00244 
00245   /**
00246    * Read from TokenReader, see Type::Read for public wrappers. 
00247    * This method invokes TokenReader::ReadBegin() to seek the specified
00248    * section, reads subsequent integer tokens as indexes, and calls matching TokenReader::ReadEnd(). 
00249    * If no section is specified, the section is assumed to start at the current position
00250    * of the token stream. If the current position is no begin token, 
00251    * the section "IndexSet" is read.
00252    * When used by a derived class with attributes, attributes are read, too. 
00253    *
00254    * @param rTr
00255    *   Reference to tokenreader
00256    * @param rLabel
00257    *   Section to read, defaults to current begin label or else "IndexSet"
00258    * @param pContext
00259    *   Read context to provide contextual information
00260    *
00261    * @exception Exception
00262    *   - IO errors (id 1)
00263    *   - token mismatch (id 50, 51, 52)
00264    */
00265   virtual void DoRead(TokenReader& rTr, const std::string& rLabel="", const Type* pContext=0);
00266 
00267 };
00268 
00269 /* convenience typedef for stateset */
00270 typedef IndexSet StateSet;
00271 
00272 
00273 
00274 /**
00275  * Set of indices with attributes. A TaIndexSet<Attr> is a template derived from IndexSet,
00276  * such that  each set element has an Attribute of class Attr.
00277  * The template parameter Attr must provide basic functions for file IO and must define a default
00278  * value, see AttributeVoid and AttributeFlags for an examples.
00279  * Attributes are maintained by an STL map to associate indices
00280  * with attributes different from the default value. Thus, attributes with default value 
00281  * do not take up any memeory.
00282  *
00283  * @param mAttributeMap
00284  *   STL map of type std::map<Idx,Attr> to hold attributes
00285  *
00286  * The copy constructor copies attributes; the methods InsertSet(), EraseSet() and
00287  * RestrictSet() maintain attributes; all other set operations derived from IndexSet  
00288  * either return a IndexSet (no attributes) or set all attributes to the dafault value.
00289  * To set or get an attribute of an index that does not exist in the set is considered
00290  * as an error and triggers an exception (id 60) when the macro FAUDES_CHECKED is defined. 
00291  *
00292  * The format for token IO is demonstrated by the following example
00293  * of a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a
00294  * nontrivial attribute attached:
00295  * \code
00296  * <Myset> 
00297  * 17 
00298  * 25 <AValue> "Some Value" </AValue> 
00299  * 40 
00300  * </MySet>  
00301  * \endcode
00302  * Note that attributes may be either subsections or tokens of type different from integer and string.
00303  * This is to allow reading a token stream to a class with incompatible (or no) attributes. 
00304  */
00305 
00306 
00307 
00308 template<class Attr>
00309 class TaIndexSet : public IndexSet, public TaBaseSet<Idx,Attr> {
00310 
00311 FAUDES_TYPE_TDECLARATION(Void,TaIndexSet,IndexSet)
00312 
00313  public:
00314 
00315   /** 
00316    * We implement "protected privacy for template classes" by friendship.
00317    * This is used for the pragmatic implemention conversion constructors.
00318    */
00319   friend class IndexSet;
00320 
00321 
00322   /**
00323    * Constructor. 
00324    */
00325   TaIndexSet(void);
00326 
00327   /**
00328    * Copy-constructor (from TaIndexSet, incl attributes) 
00329    */
00330   TaIndexSet(const TaIndexSet& rOtherSet);
00331 
00332   /**
00333    * Copy-constructor (from IndexSet, sets attributes to default) 
00334    */
00335   TaIndexSet(const IndexSet& rOtherSet);
00336 
00337   /**
00338    * Construct from file. 
00339    * This constructor uses the Read(TokenReader&, const std::string&) function to read.
00340    *
00341    * @param rFilename
00342    *   Name of file
00343    * @param rLabel
00344    *   Section for the set in file
00345    *
00346    * @exception Exception
00347    *   - IO errors (id 1)
00348    *   - token mismatch (id 50, 51, 52)
00349    */
00350   TaIndexSet(const std::string& rFilename, const std::string& rLabel = "");
00351 
00352   /**
00353    * Virtual destructor
00354    */
00355   virtual ~TaIndexSet(void) {};
00356 
00357   /** Relaxed assignment method. Maintain provided they can be casted..
00358    *
00359    * @param rSrc 
00360    *    Source from which to assign
00361    * @return
00362    *    Ref to this set
00363    */
00364   virtual TaIndexSet& Assign(const IndexSet& rSrc);
00365 
00366   /** Relaxed assignment operator. Maintain attributes provided they can be casted.
00367    *
00368    * @param rSrc 
00369    *    Source from which to assign
00370    * @return
00371    *    Ref to this set
00372    */
00373   virtual TaIndexSet& operator=(const IndexSet& rSrc);
00374 
00375   /**
00376    * Set attributes. Provided that rOtherSet has attributes that can be
00377    * casted to the appropriate type, attributes are copied per element from rOtherSet. 
00378    * Elements of this set which are not in rOtherSet maintain their attribute. 
00379    *
00380    * @param rOtherSet
00381    *   Other IndexSet
00382    * @exception Exception
00383    *   - Element does not exist (63)
00384    *   - Cannot cast attribute type (63)
00385    */
00386    virtual void Attributes(const IndexSet& rOtherSet);
00387 
00388   /**
00389    * Set attributes. Attributes are copied per element from rOtherSet. 
00390    * Elements of this set which are not in rOtherSet maintain their attribute. 
00391    *
00392    * @param rOtherSet
00393    *   Other IndexSet
00394    */
00395    virtual void Attributes(const TaIndexSet& rOtherSet);
00396 
00397   /** 
00398    * Iterators on indexset. 
00399    */
00400   typedef IndexSet::Iterator Iterator;
00401 
00402   /** 
00403    * Erase Element (incl its attribute) 
00404    *
00405    * @param rIndex
00406    *    Index to specify element
00407    * @return
00408    *    True if element used to exist
00409    */
00410   bool Erase(const Idx& rIndex);
00411 
00412 
00413   /** 
00414    * Erase element by iterator (incl attribute) 
00415    *
00416    * @param pos
00417    *    Iterator to specify element
00418    * @return 
00419    *    Iterator to next element or End()
00420    */
00421   Iterator Erase(const Iterator& pos); 
00422 
00423 
00424   /** 
00425    * Erase elements given by other set. This function
00426    * ignores the attributes of the other set and maintains the attributes 
00427    * of the remaining elements in this set.
00428    *
00429    * @param rOtherSet 
00430    *    Elements to erase
00431    */
00432    void EraseSet(const IndexSet& rOtherSet);
00433 
00434   /** 
00435    * Restrict to specified subset. Erases any elements no in
00436    * the specified set. This function
00437    * ignores the attributes of the other set and maintains the attributes 
00438    * of the remaining elements in this set.
00439    *
00440    * @param rOtherSet 
00441    *    Elements to erase
00442    */
00443    void RestrictSet(const IndexSet& rOtherSet);
00444 
00445 
00446   /**
00447    * Insert new index to set using default attribute.
00448    *
00449    * @return
00450    *   New index 
00451    */
00452   Idx Insert(void);
00453 
00454   /** 
00455    * Insert new index with attribute. 
00456    * If the index allready exists, the
00457    * attribute is overwritten by rAttr.
00458    *
00459    * @param rAttr
00460    *   Specify attribute of new element
00461    * @return
00462    *   new index 
00463    */
00464   Idx Insert(const Attr& rAttr);
00465 
00466   /** 
00467    * Insert element. If the element exists, the attribute is maintained.
00468    * If the element does not exist, it is inserted with default attribute.
00469    *
00470    * @param rIndex
00471    *   Index to specify element
00472    * @return
00473    *   True if element was new to set 
00474    */
00475   bool Insert(const Idx& rIndex);
00476 
00477   /** 
00478    * Insert element with attribute. 
00479    *
00480    * @param rIndex
00481    *   Index to specify element
00482    * @param attr
00483    *   Specify attribute of (new) element
00484    * @return
00485    *   True if element was new to set 
00486    */
00487   bool Insert(const Idx& rIndex, const Attr& attr);
00488 
00489   /**
00490    * Inserts elements of rOtherSet.
00491    * Attributes of this set are maintained, newly inserted elements have default attribute.
00492    *
00493    *
00494    * @param rOtherSet
00495    *   Other IndexSet
00496    */
00497    virtual void InsertSet(const IndexSet& rOtherSet);
00498 
00499   /**
00500    * Inserts elements of rOtherSet.
00501    * Attributes of this set are maintained, new elements are inserted with attribute.
00502    *
00503    * @param rOtherSet
00504    *   Other IndexSet
00505    */
00506    virtual void InsertSet(const TaIndexSet& rOtherSet);
00507 
00508   /** 
00509    * Clear all set.
00510    */
00511   virtual void Clear(void);
00512       
00513 
00514  
00515  protected:
00516 
00517   /**
00518    * Assign my members. This method maintains attributes.
00519    *
00520    * @param rSource 
00521    *    Source to copy from
00522    * @return
00523    *    Ref to this set
00524    */
00525   virtual void DoAssign(const TaIndexSet& rSource);
00526 
00527 
00528 };
00529 
00530 /** Convenience Macro */
00531 //template<class Attr> typedef TaStateSet<class Attr> TaIndexSet<class Attr>
00532 #define TaStateSet TaIndexSet
00533 
00534 
00535 /** @} doxygen group */
00536 
00537 
00538 /*
00539 *************************************************************************************
00540 *************************************************************************************
00541  Implementation
00542 *************************************************************************************
00543 *************************************************************************************
00544 */
00545 
00546 
00547 // std faudes type
00548 FAUDES_TYPE_TIMPLEMENTATION(Void,TaIndexSet<Attr>,IndexSet,template<class Attr>)
00549 
00550 
00551 // TaIndexSet()
00552 template<class Attr>
00553 TaIndexSet<Attr>::TaIndexSet(void) : 
00554   TBaseSet<Idx>(),
00555   IndexSet(),
00556   TaBaseSet<Idx,Attr>()
00557 {
00558   FD_DC("TaIndexSet(" << this << ")::TaIndexSet()");
00559 }
00560 
00561 // TaIndexSet(rOtherSet)
00562 template<class Attr>
00563 TaIndexSet<Attr>::TaIndexSet(const TaIndexSet& rOtherSet) : 
00564   TBaseSet<Idx>(),
00565   IndexSet(),
00566   TaBaseSet<Idx,Attr>()
00567 {
00568   FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
00569   // copy my members
00570   DoAssign(rOtherSet);
00571 }
00572 
00573 // TaIndexSet(rOtherSet)
00574 template<class Attr>
00575 TaIndexSet<Attr>::TaIndexSet(const IndexSet& rOtherSet) :
00576   TBaseSet<Idx>(),
00577   IndexSet(),
00578   TaBaseSet<Idx,Attr>()
00579 {
00580   FD_DC("TaIndexSet(" << this << ")::TaIndexSet(rOtherSet " << &rOtherSet << ")");
00581   // copy my members
00582   Assign(rOtherSet);
00583 }
00584 
00585 
00586 // File constructor
00587 template<class Attr>
00588   TaIndexSet<Attr>::TaIndexSet(const std::string& rFilename, const std::string& rLabel) :
00589   TBaseSet<Idx>(),
00590   IndexSet(),
00591   TaBaseSet<Idx,Attr>()
00592 {
00593   FD_DC("TaIndexSet(" << this << ")::TaIndexSet(" << rFilename << ")");
00594   Read(rFilename, rLabel);
00595 }
00596 
00597 
00598 // DoAssign (attributes known and match)
00599 template<class Attr>
00600 void TaIndexSet<Attr>::DoAssign(const TaIndexSet<Attr>& rSourceSet) {
00601   FD_DC("TaIndexSet(" << this << ")::DoAssign( [a] " << &rSourceSet<<")");
00602   // call base incl attributes
00603   TaBaseSet<Idx,Attr>::DoAssign(rSourceSet);
00604 }  
00605 
00606 // Relaxed Assign()
00607 template<class Attr>
00608 TaIndexSet<Attr>& TaIndexSet<Attr>::Assign(const IndexSet& rSourceSet) {
00609   FD_DC("TaIndexSet(" << this << ")::Assign([v] " << &rSourceSet<<")");
00610   FD_DC("TaIndexSet(" << this << ")::Assign(): src type " << typeid(rSourceSet).name());
00611   FD_DC("TaIndexSet(" << this << ")::Assign(): dst type " << typeid(*this).name());
00612   // call attribute smart base
00613   TaBaseSet<Idx,Attr>::Assign(rSourceSet);
00614   // done
00615   return *this;
00616 }
00617 
00618 // Relaxed Assignment Operator(rSet)
00619 template<class Attr>
00620 TaIndexSet<Attr>& TaIndexSet<Attr>::operator=(const IndexSet& rSourceSet) {
00621   return Assign(rSourceSet);
00622 }
00623 
00624 
00625 // Attributes(set)
00626 template<class Attr>
00627 void TaIndexSet<Attr>::Attributes(const TaIndexSet& rOtherSet) {
00628   FD_DC("TaIndexSet(" << this << ")::Attributes(set) with type " << typeid(rOtherSet.Attribute()).name());
00629   TaBaseSet<Idx,Attr>::Attributes(rOtherSet);
00630 }
00631 
00632 // Attributes(set)
00633 template<class Attr>
00634 void TaIndexSet<Attr>::Attributes(const IndexSet& rOtherSet) {
00635   FD_DC("TaIndexSet(" << this << ")::Attributes(set) with type " << typeid(rOtherSet.Attribute()).name());
00636   TaBaseSet<Idx,Attr>::Attributes(rOtherSet);
00637 }
00638 
00639 
00640 //Clear
00641 template<class Attr>
00642 void TaIndexSet<Attr>::Clear(void) {
00643   FD_DC("TaIndexSet(" << this << ")::Clear()");
00644   TaBaseSet<Idx,Attr>::Clear();
00645 }  
00646 
00647 // Insert()
00648 template<class Attr>
00649 Idx TaIndexSet<Attr>::Insert(void) {
00650   FD_DC("TaIndexSet(" << this << ")::Insert()");
00651   Idx index=MaxIndex()+1;
00652   TaBaseSet<Idx,Attr>::Insert(index);
00653   return index;
00654 }
00655 
00656 //Insert(idx)
00657 template<class Attr>
00658 bool TaIndexSet<Attr>::Insert(const Idx& rIndex) {
00659   FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<")");
00660   bool ret=IndexSet::Insert(rIndex); // automatic: keep attribute if exists
00661   return ret;
00662 }
00663 
00664 // Insert(attr)
00665 template<class Attr>
00666 Idx TaIndexSet<Attr>::Insert(const Attr& attr) {
00667   FD_DC("TaIndexSet(" << this << ")::Insert(" << attr.ToString() << ")");
00668   Idx index = Insert();
00669   if(!attr.IsDefault()) {
00670     TaBaseSet<Idx,Attr>::Attribute(index,attr);
00671   }
00672   return index;
00673 }
00674 
00675 //Insert(idx,attr)
00676 template<class Attr>
00677 bool TaIndexSet<Attr>::Insert(const Idx& rIndex, const Attr& attr) {
00678   FD_DC("TaIndexSet(" << this << ")::Insert("<< rIndex <<",attr)");
00679   return TaBaseSet<Idx,Attr>::Insert(rIndex,attr);
00680 }
00681 
00682 
00683 // InsertSet(set)
00684 template<class Attr>
00685 void TaIndexSet<Attr>::InsertSet(const TaIndexSet& rOtherSet) {
00686   FD_DC("TaIndexSet(" << this << ")::InsertSet( T " << &rOtherSet << ")");
00687   TaBaseSet<Idx,Attr>::InsertSet(rOtherSet);
00688 }
00689 
00690 // InsertSet(set)
00691 template<class Attr>
00692 void TaIndexSet<Attr>::InsertSet(const IndexSet& rOtherSet) {
00693   FD_DC("TaIndexSet(" << this << ")::InsertSet(" << &rOtherSet << ")");
00694   IndexSet::InsertSet(rOtherSet);
00695 }
00696 
00697 //Erase(idx)
00698 template<class Attr>
00699 bool TaIndexSet<Attr>::Erase(const Idx& rIndex) {
00700   return TaBaseSet<Idx,Attr>::Erase(rIndex);
00701 }
00702 
00703 //Erase(pos)
00704 template<class Attr>
00705 typename TaIndexSet<Attr>::Iterator TaIndexSet<Attr>::Erase(const Iterator& pos) { 
00706   return TaBaseSet<Idx,Attr>::Erase(pos);
00707 }
00708 
00709 
00710 //EraseSet(set)
00711 template<class Attr>
00712 void TaIndexSet<Attr>::EraseSet(const IndexSet& rOtherSet) {
00713   FD_DC("TaIndexSet(" << this << ")::EraseSet(" << rOtherSet.ToString() << ")");
00714   TaBaseSet<Idx,Attr>::EraseSet(rOtherSet);
00715 }
00716 
00717 //RestrictSet(set)
00718 template<class Attr>
00719 void TaIndexSet<Attr>::RestrictSet(const IndexSet& rOtherSet) {
00720   FD_DC("TaIndexSet(" << this << ")::RestrictSet(" << rOtherSet.ToString() << ")");
00721   TaBaseSet<Idx,Attr>::RestrictSet(rOtherSet);
00722 }
00723 
00724 
00725 
00726 
00727 } // namespace faudes
00728 
00729 #endif 

libFAUDES 2.20s --- 2011.10.12 --- c++ source docu by doxygen