cfl_agenerator.hGo to the documentation of this file.00001 /** @file cfl_agenerator.h Attributed generator class TaGenerator */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2006 Bernd Opitz 00006 Copyright (C) 2007 Thomas Moor 00007 Exclusive copyright is granted to Klaus Schmidt 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with this library; if not, write to the Free Software 00021 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00022 00023 00024 #ifndef FAUDES_AGENERATOR_H 00025 #define FAUDES_AGENERATOR_H 00026 00027 #include "cfl_definitions.h" 00028 #include "cfl_exception.h" 00029 #include "cfl_symboltable.h" 00030 #include "cfl_indexset.h" 00031 #include "cfl_nameset.h" 00032 #include "cfl_transset.h" 00033 #include "cfl_token.h" 00034 #include "cfl_tokenreader.h" 00035 #include "cfl_tokenwriter.h" 00036 #include "cfl_generator.h" 00037 #include <map> 00038 #include <set> 00039 #include <sstream> 00040 #include <cstdlib> 00041 #include <assert.h> 00042 00043 namespace faudes { 00044 00045 /** 00046 * Generator with specified attribute types. 00047 * 00048 * @section Overview 00049 * 00050 * The TaGenerator takes four template parameters to specify attribute classes for 00051 * the global attribute and state-, event- and transition-attributes. 00052 * 00053 * In the context of a TaGenerator, attributes still have only minimal sematics: they can be 00054 * accessed in a per event, state and transition manner and they can have default or non-default value. 00055 * The minimum interface that an attribute template parameter must provide, is given in 00056 * faudes::AttributeVoid. Derived attribute classes are meant to provide addtional semantics, eg 00057 * faudes::AttributeFlags for boolean flags and faudes::AttributeCFlags for controllability properties. 00058 * The TaGenerator transparently supports extended attribute semantics, buit does not provide 00059 * taylored access functions. This is done in TaGenerator 00060 * derivates eg TcGenerator. 00061 * 00062 * Technical detail: Attributes data types must be derived from AttributeVoid, which in turn is derived from 00063 * the general purpose base faudes::Type. For your derived attribute class to be fully functional, 00064 * you must reimplement the faudes::Type::New(). 00065 * 00066 * @ingroup GeneratorClasses 00067 */ 00068 00069 template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr> 00070 class TaGenerator : public vGenerator { 00071 public: 00072 00073 /** Convenience typdef for member transiton set */ 00074 typedef TaTransSet<TransAttr> ATransSet; 00075 00076 /***************************************** 00077 ***************************************** 00078 ***************************************** 00079 *****************************************/ 00080 00081 /** @name Constructors & Destructor */ 00082 /** @{ doxygen group */ 00083 00084 /** 00085 * Construct an emtpy Generator 00086 */ 00087 TaGenerator(void); 00088 00089 /** 00090 * Copy-constructor (from TaGenerator, incl attributes) 00091 * 00092 * @param rOtherGen 00093 */ 00094 TaGenerator(const TaGenerator& rOtherGen); 00095 00096 /** 00097 * Copy-constructor (from vGenerator, set attributes to default) 00098 * 00099 * @param rOtherGen 00100 */ 00101 TaGenerator(const vGenerator& rOtherGen); 00102 00103 /** 00104 * Construct from file. This constructor 00105 * effectively uses the Read(TokenReader&) function to read. 00106 * 00107 * @param rFileName 00108 * Name of file 00109 * 00110 * @exception Exception 00111 * - IO errors (id 1) 00112 * - Token mismatch (id 50, 51, 52, 80, 85) 00113 */ 00114 TaGenerator(const std::string& rFileName); 00115 00116 /** 00117 * Construct on heap. 00118 * Technically not a constructor, this function creates a TaGenerator with the 00119 * same event symboltable and the same attribute types. It is the callers reponsebilty to 00120 * delete the object when no longer needed. 00121 * 00122 * @return 00123 * new Generator 00124 */ 00125 virtual TaGenerator* New(void) const; 00126 00127 /** 00128 * Construct copy on heap. 00129 * Technically not a constructor, this function creates a TaGenerator with the 00130 * same event symboltable and the same attribute types. It is the callers reponsebilty to 00131 * delete the object when no longer needed. 00132 * 00133 * @return 00134 * new Generator 00135 */ 00136 virtual TaGenerator* Copy(void) const; 00137 00138 /** 00139 * Construct on stack. 00140 * Technically not a constructor, this function creates a TaGenerator with the 00141 * same event symboltable and the same attribute type. 00142 * 00143 * @return 00144 * new Generator 00145 */ 00146 virtual TaGenerator NewAGen(void) const; 00147 00148 /** 00149 * Type test. 00150 * Uses C++ dynamic cast to test whether the specified object 00151 * casts to a Generator. 00152 * 00153 * @return 00154 * TcGenerator reference if dynamic cast succeeds, else NULL 00155 */ 00156 virtual const Type* Cast(const Type* pOther) const; 00157 00158 00159 /** 00160 * Destructor 00161 */ 00162 virtual ~TaGenerator(void); 00163 00164 /** @} doxygen group */ 00165 00166 /***************************************** 00167 ***************************************** 00168 ***************************************** 00169 *****************************************/ 00170 00171 /** @name Copy and Assignment */ 00172 /** @{ doxygen group */ 00173 00174 00175 /** 00176 * Copy from other TaGenerator (incl attributes) 00177 * 00178 * @param rGen 00179 * Source for copy operation. 00180 */ 00181 virtual TaGenerator& Assign(const TaGenerator& rGen); 00182 00183 /** 00184 * Copy from other Generator (try to maintain attributes) 00185 * 00186 * @param rGen 00187 * Source for copy operation. 00188 */ 00189 virtual TaGenerator& Assign(const vGenerator& rGen); 00190 00191 00192 /** 00193 * Copy from other faudes Type 00194 * 00195 * @param rSrc 00196 * Source for copy operation. 00197 */ 00198 virtual TaGenerator& Assign(const Type& rSrc); 00199 00200 /** 00201 * Destructive copy to other TaGenerator 00202 * Copy method with increased performance at the cost of invalidating 00203 * the source data. This version will copy attributes 1:1. 00204 * 00205 * 00206 * @param rGen 00207 * Destination for copy operation. 00208 */ 00209 virtual void Move(TaGenerator& rGen); 00210 00211 /** 00212 * Destructive copy to other Generator. 00213 * Copy method with increased performance at the cost of invalidating 00214 * the source data. Convert attributes if possible. 00215 * 00216 * 00217 * @param rGen 00218 * Destination for copy operation. 00219 */ 00220 virtual void Move(Generator& rGen); 00221 00222 /** 00223 * Assignment operator (uses Copy(TaGenerator&) ) 00224 * 00225 * @param rOtherGen 00226 * Other generator 00227 */ 00228 virtual TaGenerator& operator= (const TaGenerator& rOtherGen); 00229 00230 /** 00231 * Assignment operator (uses Copy(Generator&) ) 00232 * 00233 * @param rOtherGen 00234 * Other generator 00235 */ 00236 virtual TaGenerator& operator= (const vGenerator& rOtherGen); 00237 00238 00239 /** @} doxygen group */ 00240 00241 /***************************************** 00242 ***************************************** 00243 ***************************************** 00244 *****************************************/ 00245 00246 /** @name Basic Maintenance */ 00247 /** @{ doxygen group */ 00248 00249 /** 00250 * Check if generator is valid 00251 * 00252 * @return 00253 * Success 00254 */ 00255 bool Valid(void); 00256 00257 00258 /** 00259 * Clear generator data. 00260 * Clears state set, alphabet and transitionrealtion. Behavioural flags 00261 * eg StateNamesEnabled are maintained. 00262 */ 00263 virtual void Clear(void); 00264 00265 00266 00267 /** @} doxygen group */ 00268 00269 00270 00271 /***************************************** 00272 ***************************************** 00273 ***************************************** 00274 *****************************************/ 00275 00276 /** @name Read Access to Core Members */ 00277 /** @{ doxygen group */ 00278 00279 /** 00280 * Return const reference to alphabet 00281 * 00282 * @return EventSet 00283 * Reference to mpAlphabet 00284 */ 00285 const TaEventSet<EventAttr>& Alphabet(void) const; 00286 00287 /** 00288 * Return reference to state set 00289 * 00290 * @return 00291 * StateSet reference incl actual attribute type 00292 */ 00293 const TaStateSet<StateAttr>& States(void) const; 00294 00295 /** 00296 * Return reference to transition relation 00297 * 00298 * @return TransRel 00299 */ 00300 const ATransSet& TransRel(void) const; 00301 00302 /** 00303 * Get copy of trantision relation sorted by other compare 00304 * operator, e.g. "x2,ev,x1" 00305 * 00306 * @param res 00307 * resulting transition relation 00308 */ 00309 void TransRel(TransSetX1EvX2& res) const; 00310 void TransRel(TransSetEvX1X2& res) const; 00311 void TransRel(TransSetEvX2X1& res) const; 00312 void TransRel(TransSetX2EvX1& res) const; 00313 void TransRel(TransSetX2X1Ev& res) const; 00314 void TransRel(TransSetX1X2Ev& res) const; 00315 00316 /** @} doxygen group */ 00317 00318 00319 00320 /***************************************** 00321 ***************************************** 00322 ***************************************** 00323 *****************************************/ 00324 00325 /** @name Write Access to Core Members */ 00326 /** @{ doxygen group */ 00327 00328 00329 /** 00330 * Add an existing event to alphabet by index. It is an error to insert 00331 * an event index that is not known to the mpEventSymbolTable. 00332 * 00333 * @param index 00334 * Event index 00335 * @return 00336 * True, if event was new to alphabet 00337 */ 00338 bool InsEvent(Idx index); 00339 00340 /** 00341 * Add named event to generator. An entry in the mpEventSymbolTable will 00342 * be made if event name is not known so far. 00343 * 00344 * @param rName 00345 * Name of the event to add 00346 * 00347 * @return 00348 * New unique index 00349 */ 00350 Idx InsEvent(const std::string& rName); 00351 00352 /** 00353 * Add an existing event to alphabet by index, incl. attribute 00354 * If the index allready exists, the attribute is overwritten by rAttr. 00355 * 00356 * @param rAttr 00357 * Attribute of event 00358 * @param index 00359 * Event index 00360 * @return 00361 * True, if event was new to alphabet 00362 */ 00363 bool InsEvent(Idx index, const EventAttr& rAttr); 00364 00365 /** 00366 * Add named event with attribute to generator. An entry in the 00367 * mpEventSymbolTable will be made if event is not kown so far. 00368 * If the event allready exits in the generator, the attribute will be 00369 * overwritten by rAttr. 00370 * 00371 * @param rName 00372 * Name of the event to add 00373 * @param rAttr 00374 * Attribute of event 00375 * 00376 * @return 00377 * New unique index 00378 */ 00379 Idx InsEvent(const std::string& rName, const EventAttr& rAttr); 00380 00381 /** 00382 * Set mpAlphabet without consistency check. 00383 * Attributes will be casted if possible or silently ignored. 00384 * 00385 * @param rNewalphabet 00386 * EventSet with new alphabet 00387 */ 00388 void InjectAlphabet(const EventSet& rNewalphabet); 00389 00390 /** 00391 * Set mpAlphabet without consistency check. 00392 * 00393 * @param rNewalphabet 00394 * EventSet with new alphabet 00395 */ 00396 void InjectAlphabet(const TaEventSet<EventAttr>& rNewalphabet); 00397 00398 /** 00399 * Add new anonymous state to generator 00400 * 00401 * @return 00402 * Index of new unique state 00403 */ 00404 Idx InsState(void); 00405 00406 /** 00407 * Add new anonymous state with attribute to generator 00408 * 00409 * @param attr 00410 * attribute of new state 00411 * 00412 * @return 00413 * Index of new unique state 00414 */ 00415 Idx InsState(const StateAttr& attr); 00416 00417 /** 00418 * Add (perhaps new) state to generator 00419 * 00420 * @return 00421 * true to indicate that state was new to generator 00422 */ 00423 bool InsState(Idx index); 00424 00425 /** 00426 * Add new named state to generator. 00427 * 00428 * @param rName 00429 * Name of the state to add 00430 * 00431 * @return 00432 * Index of new unique state 00433 * 00434 * @exception Exception 00435 * Name already exists (id 44) 00436 */ 00437 Idx InsState(const std::string& rName); 00438 00439 /** 00440 * Add new named state with attribute to generator. 00441 * 00442 * @param rName 00443 * Name of the state to add 00444 * @param attr 00445 * attribute of new state 00446 * 00447 * @return 00448 * Index of new unique state 00449 * @exception Exception 00450 * Name already exists (id 44) 00451 */ 00452 Idx InsState(const std::string& rName, const StateAttr& attr); 00453 00454 /** 00455 * Add (perhaps new) state with attribute to generator. 00456 * 00457 * @param index 00458 * Index of state to add 00459 * @param attr 00460 * Attribute of new state 00461 * 00462 * @return 00463 * True, if event was new to alphabet 00464 * 00465 */ 00466 bool InsState(Idx index, const StateAttr& attr); 00467 00468 /** 00469 * Inject a complete state set without consistency checks. 00470 * Attributes will be casted if possible or silently ignored. 00471 * 00472 * @param rNewStates 00473 * StateSet 00474 */ 00475 void InjectStates(const StateSet& rNewStates); 00476 00477 00478 /** 00479 * Inject a complete state set without consistency checks. 00480 * 00481 * @param rNewStates 00482 * StateSet 00483 */ 00484 void InjectStates(const TaStateSet<StateAttr>& rNewStates); 00485 00486 00487 /** 00488 * Add a transition to generator by indices. States and event 00489 * must already exist! 00490 * 00491 * Define FAUDES_CHECKED for consistency checks. 00492 * 00493 * @param x1 00494 * Predecessor state index 00495 * @param ev 00496 * Event index 00497 * @param x2 00498 * Successor state index 00499 * 00500 * @return 00501 * True, if the transition was new the generator 00502 * 00503 * @exception Exception 00504 * - state or event not in generator (id 95) 00505 */ 00506 bool SetTransition(Idx x1, Idx ev, Idx x2); 00507 00508 /** 00509 * Add a transition to generator by names. Statename and eventname 00510 * must already exist! 00511 * 00512 * @param rX1 00513 * Predecessor state name 00514 * @param rEv 00515 * Event name 00516 * @param rX2 00517 * Successor state name 00518 * 00519 * @return 00520 * True, if the transition was new the generator 00521 * 00522 * @exception Exception 00523 * - state or event not in generator (id 95) 00524 * - state name not known (id 90) 00525 * - event name not known (id 66) 00526 */ 00527 bool SetTransition(const std::string& rX1, const std::string& rEv, 00528 const std::string& rX2); 00529 00530 /** 00531 * Add a transition to generator. States and event 00532 * must already exist! 00533 * 00534 * 00535 * @param rTransition 00536 * Transition 00537 * 00538 * @return 00539 * True, if the transition was new the generator 00540 * @exception Exception 00541 * - state or event not in generator (id 95) 00542 */ 00543 bool SetTransition(const Transition& rTransition); 00544 00545 /** 00546 * Add a transition with attribute to generator. States and event 00547 * must already exist! 00548 * 00549 * 00550 * @param rTransition 00551 * transition 00552 * @param rAttr 00553 * attribute 00554 * @return 00555 * True, if the transition was new the generator 00556 * @exception Exception 00557 * - state or event not in generator (id 95) 00558 * 00559 */ 00560 bool SetTransition(const Transition& rTransition, const TransAttr& rAttr); 00561 00562 /** 00563 * Set transition relation without consistency check. 00564 * Attributes will be casted if possible or silently ignored. 00565 * 00566 * @param rNewtransrel 00567 * TransRel to insert 00568 */ 00569 void InjectTransRel(const TransSet& rNewtransrel); 00570 00571 /** 00572 * Set transition relation without consistency check. 00573 * 00574 * @param rNewtransrel 00575 * TransRel to insert 00576 */ 00577 void InjectTransRel(const ATransSet& rNewtransrel); 00578 00579 /** @} doxygen group */ 00580 00581 00582 00583 /***************************************** 00584 ***************************************** 00585 ***************************************** 00586 *****************************************/ 00587 00588 /** @name Attributes */ 00589 /** @{ doxygen group */ 00590 00591 00592 /** 00593 * Set attribute for existing event 00594 * 00595 * @param index 00596 * Event index 00597 * @param rAttr 00598 * New attribute 00599 * 00600 * @exception Exception 00601 * Index not found in alphabet (id 60) 00602 */ 00603 void EventAttribute(Idx index, const EventAttr& rAttr); 00604 00605 /** 00606 * Set attribute for existing event. 00607 * This version uses a dynamic cast 00608 * to test the actual type of the provided attribute. An exception is 00609 * thrown for an invalid attribute type. 00610 * 00611 * @param index 00612 * Event index 00613 * @param rAttr 00614 * New attribute 00615 * 00616 * @exception Exception 00617 * - Index not found in alphabet (id 60) 00618 * - Cannot cast attribute (id 63) 00619 */ 00620 void EventAttribute(Idx index, const Type& rAttr); 00621 00622 /** 00623 * Event attribute lookup 00624 * 00625 * @param index 00626 * 00627 * @return 00628 * reference to attribute 00629 */ 00630 const EventAttr& EventAttribute(Idx index) const; 00631 00632 /** 00633 * Event attribute lookup 00634 * 00635 * @param rName 00636 * 00637 * @return 00638 * reference to attribute 00639 */ 00640 const EventAttr& EventAttribute(const std::string& rName) const; 00641 00642 /** 00643 * Event attribute pointer (to access Attribute methods) 00644 * note: may insert explicit default attribute 00645 * 00646 * @param index 00647 * 00648 * @return 00649 * pointer to attribute 00650 */ 00651 EventAttr* EventAttributep(Idx index); 00652 00653 /** 00654 * Event attribute pointer (to access Attribute methods) 00655 * note: may insert explicit default attribute 00656 * 00657 * @param rName 00658 * 00659 * @return 00660 * pointer to attribute 00661 */ 00662 EventAttr* EventAttributep(const std::string& rName); 00663 00664 00665 /** 00666 * Set attribute for existing state 00667 * 00668 * @param index 00669 * Index 00670 * @param rAttr 00671 * attriute 00672 * 00673 * @exception Exception 00674 * Name already associated with another index (id 44) 00675 */ 00676 void StateAttribute(Idx index, const StateAttr& rAttr); 00677 00678 /** 00679 * Set attribute for existing state. 00680 * This version uses a dynamic cast 00681 * to test the actual type of the provided attribute. An exception is 00682 * thrown for an invalid attribute type. 00683 * 00684 * @param index 00685 * State index 00686 * @param rAttr 00687 * New attribute 00688 * 00689 * @exception Exception 00690 * - Index not found in Stateset (id 60) 00691 * - Cannot cast attribute (id 63) 00692 */ 00693 void StateAttribute(Idx index, const Type& rAttr); 00694 00695 /** 00696 * State attribute lookup 00697 * 00698 * @param index 00699 * 00700 * @return ref to attribute of state 00701 */ 00702 const StateAttr& StateAttribute(Idx index) const; 00703 00704 /** 00705 * State attribute pointer (to access Attribute methods) 00706 * note: may insert explicit default attribute 00707 * 00708 * @param index 00709 * 00710 * @return pointer to attribute of state 00711 */ 00712 StateAttr* StateAttributep(Idx index); 00713 00714 /** 00715 * Set attribute for existing transition 00716 * 00717 * @param rTrans 00718 * transition 00719 * @param rAttr 00720 * New attribute 00721 * 00722 */ 00723 void TransAttribute(const Transition& rTrans, const TransAttr& rAttr); 00724 00725 /** 00726 * Set attribute for existing transition. 00727 * This version uses a dynamic cast 00728 * to test the actual type of the provided attribute. An exception is 00729 * thrown for an invalid attribute type. 00730 * 00731 * @param rTrans 00732 * transition 00733 * @param rAttr 00734 * New attribute 00735 * 00736 * @exception Exception 00737 * - Transition not found in transition relation(id 60) 00738 * - Cannot cast attribute (id 63) 00739 */ 00740 void TransAttribute(const Transition& rTrans, const Type& rAttr); 00741 00742 00743 /** 00744 * Get attribute for existing transition 00745 * 00746 * @return 00747 * attribute 00748 * 00749 */ 00750 const TransAttr& TransAttribute(const Transition& rTrans) const; 00751 00752 /** 00753 * Get attribute pointer for existing transition 00754 * note: may insert explicit default attribute 00755 * 00756 * @return 00757 * attribute pointer 00758 * 00759 */ 00760 TransAttr* TransAttributep(const Transition& rTrans); 00761 00762 /** 00763 * Set global attribute 00764 * 00765 * @param rAttr 00766 * attribute 00767 */ 00768 void GlobalAttribute(const GlobalAttr& rAttr) {*pGlobalAttribute=rAttr;}; 00769 00770 /** 00771 * Get global attribute ref 00772 */ 00773 const GlobalAttr& GlobalAttribute(void) const {return *pGlobalAttribute;}; 00774 00775 00776 /** 00777 * Get global attribute pointer 00778 */ 00779 GlobalAttr* GlobalAttributep(void) {return pGlobalAttribute;}; 00780 00781 00782 /** @} doxygen group */ 00783 00784 00785 00786 00787 protected: 00788 00789 /** Alphabet, pointer with actual attribute type */ 00790 TaNameSet<EventAttr>* pAlphabet; 00791 00792 /** State set, pointer with actual attribute type */ 00793 TaIndexSet<StateAttr>* pStates; 00794 00795 /** Transition relation, pointer with actual attribute type */ 00796 ATransSet* pTransRel; 00797 00798 /** Global attribute, pointer with actual attribute type */ 00799 GlobalAttr* pGlobalAttribute; 00800 00801 /** Static default alphabet prototype (incl. attribute type) */ 00802 static const TaNameSet<EventAttr>& AlphabetTaGen(void); 00803 00804 /** Static default state set prototype (incl. attribute type) */ 00805 static const TaIndexSet<StateAttr>& StatesTaGen(void); 00806 00807 /** Static default transition relation prototype (incl. attribute type) */ 00808 static const ATransSet& TransRelTaGen(void); 00809 00810 /** Static default global attribute prototype (configures global attribute type) */ 00811 static const GlobalAttr& GlobalTaGen(void); 00812 00813 /** Allocate my heap members (attribute dependent types) */ 00814 virtual void NewCore(void); 00815 00816 /** Update my secondary pointers for new core */ 00817 virtual void UpdateCore(void); 00818 00819 00820 }; 00821 00822 00823 00824 /* convenience access to relevant scopes */ 00825 #define THIS TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr> 00826 #define TEMP template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr> 00827 #define BASE vGenerator 00828 00829 // static default prototypes (construct on first use design pattern) 00830 TEMP const TaNameSet<EventAttr>& THIS::AlphabetTaGen(void) { 00831 static TaNameSet<EventAttr>* pstatic = new TaNameSet<EventAttr>(); 00832 return *pstatic; 00833 } 00834 TEMP const TaIndexSet<StateAttr>& THIS::StatesTaGen(void) { 00835 static TaIndexSet<StateAttr>* pstatic = new TaIndexSet<StateAttr>(); 00836 return *pstatic; 00837 } 00838 TEMP const TaTransSet<TransAttr>& THIS::TransRelTaGen(void) { 00839 static TaTransSet<TransAttr>* pstatic = new TaTransSet<TransAttr>(); 00840 return *pstatic; 00841 } 00842 TEMP const GlobalAttr& THIS::GlobalTaGen(void) { 00843 static GlobalAttr* pstatic = new GlobalAttr(); 00844 return *pstatic; 00845 } 00846 00847 00848 // TaGenerator::Generator(void) 00849 TEMP THIS::TaGenerator(void) : 00850 // init base 00851 vGenerator() 00852 { 00853 FD_DG("TaGenerator(" << this << ")::TaGenerator()"); 00854 // re-allocate core members with nontrivial attribute types 00855 ConfigureAttributeTypes(&GlobalTaGen(),&StatesTaGen(),&AlphabetTaGen(),&TransRelTaGen()); 00856 NewCore(); 00857 FD_DG("TaGenerator(" << this << ")::TaGenerator(): done"); 00858 } 00859 00860 // TaGenerator::Generator(rOtherGen) 00861 TEMP THIS::TaGenerator(const TaGenerator& rOtherGen) : 00862 // init base 00863 vGenerator() 00864 { 00865 FD_DG("TaGenerator(" << this << ")::TaGenerator(" << &rOtherGen << ")"); 00866 // re-allocate core members with nontrivial attribute types 00867 ConfigureAttributeTypes(&GlobalTaGen(),&StatesTaGen(),&AlphabetTaGen(),&TransRelTaGen()); 00868 NewCore(); 00869 // have a 1:1 copy (incl sym tables) 00870 Assign(rOtherGen); 00871 } 00872 00873 00874 // TaGenerator::Generator(rOtherGen) 00875 TEMP THIS::TaGenerator(const vGenerator& rOtherGen) : 00876 // init base 00877 vGenerator() 00878 { 00879 FD_DG("TaGenerator(" << this << ")::TaGenerator([v]" << &rOtherGen << ")"); 00880 // re-allocate core members with nontrivial attribute types 00881 ConfigureAttributeTypes(&GlobalTaGen(),&StatesTaGen(),&AlphabetTaGen(),&TransRelTaGen()); 00882 NewCore(); 00883 // have a 1:1 copy (incl sym tables) 00884 Assign(rOtherGen); 00885 } 00886 00887 // TaGenerator::Generator(rFileName) 00888 TEMP THIS::TaGenerator(const std::string& rFileName) : 00889 // init base 00890 vGenerator() 00891 { 00892 FD_DG("TaGenerator(" << this << ")::TaGenerator(" << rFileName << ")"); 00893 // re-allocate core members with nontrivial attribute types 00894 ConfigureAttributeTypes(&GlobalTaGen(),&StatesTaGen(),&AlphabetTaGen(),&TransRelTaGen()); 00895 NewCore(); 00896 // set some defaults 00897 mStateNamesEnabled=true; 00898 // do read 00899 Read(rFileName); 00900 // get original statenames default 00901 mStateNamesEnabled=msStateNamesEnabledDefault; 00902 } 00903 00904 // allocate core on heap 00905 TEMP void THIS::NewCore(void) { 00906 FD_DG("TaGenerator(" << this << ")::NewCore()"); 00907 // call base, incl virtual call back of UpdateCore 00908 BASE::NewCore(); 00909 } 00910 00911 // indicate new core 00912 TEMP void THIS::UpdateCore(void) { 00913 // let base do an update (fixes names) 00914 BASE::UpdateCore(); 00915 // have pointer with my attribute 00916 pGlobalAttribute = dynamic_cast< GlobalAttr* >(mpGlobalAttribute); 00917 pAlphabet = dynamic_cast< TaNameSet<EventAttr>* >(mpAlphabet); 00918 pStates = dynamic_cast< TaIndexSet<StateAttr>* >(mpStates); 00919 pTransRel = dynamic_cast< ATransSet* >(mpTransRel); 00920 // check for type mismatche 00921 bool tmm=false; 00922 if(pGlobalAttribute==0 && mpGlobalAttribute!=0) tmm=true; 00923 if(pAlphabet==0 && mpAlphabet!=0) tmm=true; 00924 if(pStates==0 && mpStates!=0) tmm=true; 00925 if(pTransRel==0 && mpTransRel!=0) tmm=true; 00926 if(tmm) { 00927 std::stringstream errstr; 00928 errstr << "cannot cast attributes for generator " << Name(); 00929 throw Exception("Generator::UpdateCore", errstr.str(), 63); 00930 } 00931 } 00932 00933 00934 // Copy(gen) from identical type 00935 TEMP THIS& THIS::Assign(const TaGenerator& rGen) { 00936 FD_DG("TaGenerator(" << this << ")::Assign(" << &rGen << ")"); 00937 // prepare result (call clear for virtual stuff) 00938 Clear(); 00939 // have same event symboltable 00940 EventSymbolTablep(rGen.mpEventSymbolTable); 00941 // copy state symboltable 00942 StateSymbolTable(rGen.mStateSymbolTable); 00943 // set other members 00944 Name(rGen.Name()); 00945 *pGlobalAttribute=*rGen.pGlobalAttribute; 00946 *pStates= *rGen.pStates; 00947 *pAlphabet = *rGen.pAlphabet; 00948 *pTransRel= *rGen.pTransRel; 00949 mInitStates = rGen.mInitStates; 00950 mMarkedStates = rGen.mMarkedStates; 00951 mStateNamesEnabled=rGen.mStateNamesEnabled; 00952 mReindexOnWrite=rGen.mReindexOnWrite; 00953 // copy add on stuff 00954 mMinStateIndexMap=rGen.mMinStateIndexMap; 00955 #ifdef FAUDES_DEBUG_CODE 00956 if(!Valid()) { 00957 FD_DG("TaGenerator()::Assign(): invalid generator"); 00958 DWrite(); 00959 abort(); 00960 } 00961 #endif 00962 return *this; 00963 } 00964 00965 // Copy(gen) to other generator type 00966 TEMP THIS& THIS::Assign(const vGenerator& rGen) { 00967 FD_DG("TaGenerator(" << this << ")::Assign([v]" << &rGen << ")"); 00968 FD_DG("TaGenerator(" << this << ")::Assign(): src type " << typeid(rGen).name()); 00969 FD_DG("TaGenerator(" << this << ")::Assign(): dst type " << typeid(*this).name()); 00970 // call base 00971 BASE::Assign(rGen); 00972 // report 00973 #ifdef FAUDES_DEBUG_GENERATOR 00974 // FD_DG("TaGenerator(" << this << ")::Copy([type " << typeid(rGen).name() <<"]" << &rGen << "): report"); 00975 // Write(); 00976 // rGen.Write(); 00977 #endif 00978 return *this; 00979 } 00980 00981 00982 // copy from other Generator (try to convert attributes) 00983 TEMP THIS& THIS::Assign(const Type& rSrc) { 00984 FD_DG("TaGenerator(" << this << ")::Assign([type] " << &rSrc << ")"); 00985 // bail out on match 00986 if(&rSrc==this) return *this; 00987 Clear(); 00988 const vGenerator* vgen=dynamic_cast<const vGenerator*>(&rSrc); 00989 if(vgen) Assign(*vgen); 00990 return *this; 00991 } 00992 00993 00994 // Move(gen) destructive copy 00995 TEMP void THIS::Move(TaGenerator& rGen) { 00996 FD_DG("TaGenerator(" << this << ")::Move(" << &rGen << ")"); 00997 // call base 00998 BASE::Move(rGen); 00999 } 01000 01001 01002 // Move(gen) destructive copy 01003 TEMP void THIS::Move(Generator& rGen) { 01004 FD_DG("TaGenerator(" << this << ")::Move([v]" << &rGen << ")"); 01005 // call base 01006 BASE::Move(rGen); 01007 } 01008 01009 // TaGenerator::~Generator 01010 TEMP THIS::~TaGenerator(void) { 01011 FD_DG("TaGenerator(" << this << ")::~TaGenerator()"); 01012 } 01013 01014 // New 01015 TEMP THIS* THIS::New(void) const { 01016 // allocate 01017 THIS* res = new THIS; 01018 // fix base data 01019 res->EventSymbolTablep(BASE::mpEventSymbolTable); 01020 res->mStateNamesEnabled=BASE::mStateNamesEnabled; 01021 res->mReindexOnWrite=BASE::mReindexOnWrite; 01022 return res; 01023 } 01024 01025 // Copy 01026 TEMP THIS* THIS::Copy(void) const { 01027 // allocate 01028 THIS* res = new THIS(*this); 01029 // done 01030 return res; 01031 } 01032 01033 // NewAGen() 01034 TEMP THIS THIS::NewAGen(void) const { 01035 THIS res; 01036 // fix base data 01037 res.EventSymbolTablep(BASE::mpEventSymbolTable); 01038 res.mStateNamesEnabled=BASE::mStateNamesEnabled; 01039 res.mReindexOnWrite=BASE::mReindexOnWrite; 01040 return res; 01041 } 01042 01043 01044 // CAST 01045 TEMP const Type* THIS::Cast(const Type* pOther) const { 01046 return dynamic_cast< const THIS* > (pOther); 01047 } 01048 01049 // operator= 01050 TEMP TaGenerator<GlobalAttr,StateAttr,EventAttr,TransAttr>& THIS::operator= (const TaGenerator& rOtherGen) { 01051 FD_DG("TaGenerator(" << this << ")::operator = " << &rOtherGen); 01052 return Assign(rOtherGen); 01053 } 01054 01055 // operator= 01056 TEMP TaGenerator<GlobalAttr,StateAttr,EventAttr,TransAttr>& THIS::operator= (const vGenerator& rOtherGen) { 01057 FD_DG("TaGenerator(" << this << ")::operator = [v]" << &rOtherGen); 01058 return Assign(rOtherGen); 01059 } 01060 01061 // Valid() 01062 TEMP bool THIS::Valid(void) { 01063 FD_DG("TaGenerator(" << this << ")::Valid()"); 01064 if(!BASE::Valid()) return false; 01065 // test types 01066 bool tmm=false; 01067 if(typeid(Alphabet().Attribute())!=typeid(const EventAttr&)) tmm=true; 01068 if(typeid(States().Attribute())!=typeid(const StateAttr&)) tmm=true; 01069 if(typeid(TransRel().Attribute())!=typeid(const TransAttr&)) tmm=true; 01070 if(typeid(GlobalAttribute())!=typeid(const GlobalAttr&)) tmm=true; 01071 if(tmm) { 01072 return false; 01073 //std::stringstream errstr; 01074 //errstr << "attribute type mismatch in generator " << Name(); 01075 //throw Exception("Generator::Valid", errstr.str(), 63); 01076 } 01077 return true; 01078 } 01079 01080 // Clear() 01081 TEMP void THIS::Clear(void) { 01082 FD_DG("TaGenerator(" << this << ")::Clear()"); 01083 BASE::Clear(); 01084 } 01085 01086 01087 // InjectAlphabet(newalphabet) 01088 TEMP void THIS::InjectAlphabet(const EventSet& rNewAlphabet) { 01089 FD_DG("TaGenerator::InjectAlphabet() " << rNewAlphabet.ToString()); 01090 BASE::InjectAlphabet(rNewAlphabet); 01091 } 01092 01093 // InjectAlphabet(newalphabet) 01094 TEMP void THIS::InjectAlphabet(const TaEventSet<EventAttr>& rNewAlphabet) { 01095 FD_DG("TaGenerator::InjectAlphabet(TaEventSet<EventAttr>) " << rNewAlphabet.ToString()); 01096 #ifdef FAUDES_CHECKED 01097 if(rNewAlphabet.SymbolTablep()!=mpEventSymbolTable) { 01098 std::stringstream errstr; 01099 errstr << "symboltable mismatch aka not implemented" << std::endl; 01100 throw Exception("TaGenerator::InjectAlphabet", errstr.str(), 88); 01101 } 01102 #endif 01103 *pAlphabet=rNewAlphabet; 01104 mpAlphabet->Name("Alphabet"); 01105 } 01106 01107 // InsEvent(index) 01108 TEMP bool THIS::InsEvent(Idx index) { 01109 FD_DG("TaGenerator(" << this << ")::InsEvent(" << index << ")"); 01110 return pAlphabet->Insert(index); 01111 } 01112 01113 // InsEvent(rName) 01114 TEMP Idx THIS::InsEvent(const std::string& rName) { 01115 FD_DG("TaGenerator(" << this << ")::InsEvent(\"" << rName << "\")"); 01116 return pAlphabet->Insert(rName); 01117 } 01118 01119 // InsEvent(index, attr) 01120 TEMP bool THIS::InsEvent(Idx index, const EventAttr& attr) { 01121 FD_DG("TaGenerator(" << this << ")::InsEvent(" << index << " " << attr.ToString() << ")"); 01122 return pAlphabet->Insert(index, attr); 01123 } 01124 01125 // InsEvent(rName) 01126 TEMP Idx THIS::InsEvent(const std::string& rName, const EventAttr& attr) { 01127 FD_DG("TaGenerator(" << this << ")::InsEvent(\"" << rName << attr.ToString() << "\")"); 01128 return pAlphabet->Insert(rName, attr); 01129 } 01130 01131 // InsState() 01132 TEMP Idx THIS::InsState(void) { 01133 FD_DG("TaGenerator(" << this << ")::InsState()"); 01134 return mpStates->Insert(); 01135 } 01136 01137 // InsState(attr) 01138 TEMP Idx THIS::InsState(const StateAttr& attr) { 01139 FD_DG("TaGenerator(" << this << ")::InsState(attr)"); 01140 return pStates->Insert(attr); 01141 } 01142 01143 // InsState(index) 01144 TEMP bool THIS::InsState(Idx index) { 01145 FD_DG("TaGenerator(" << this << ")::InsState(" << index << ")"); 01146 return mpStates->Insert(index); 01147 } 01148 01149 // InsState(index, attr) 01150 TEMP bool THIS::InsState(Idx index, const StateAttr& rAttr) { 01151 FD_DG("TaGenerator(" << this << ")::InsState(" << index << ",rAttr)"); 01152 return pStates->Insert(index,rAttr); 01153 } 01154 01155 // InsState(rName) 01156 TEMP Idx THIS::InsState(const std::string& rName) { 01157 FD_DG("TaGenerator(" << this << ")::InsState(\"" << rName << "\")"); 01158 Idx index=mpStates->Insert(); 01159 StateName(index,rName); 01160 return index; 01161 } 01162 01163 // InsState(rName, attr) 01164 TEMP Idx THIS::InsState(const std::string& rName, const StateAttr& attr) { 01165 FD_DG("TaGenerator(" << this << ")::InsState(\"" << rName << "\", attr)"); 01166 Idx index=mpStates->Insert(); 01167 StateName(index,rName); 01168 StateAttribute(index,attr); 01169 return index; 01170 } 01171 01172 01173 // InjectStates(rNewStates) 01174 TEMP void THIS::InjectStates(const StateSet& rNewStates) { 01175 FD_DG("TaGenerator(" << this << ")::InjectStates(" 01176 << rNewStates.ToString() << ")"); 01177 BASE::InjectStates(rNewStates); 01178 } 01179 01180 // InjectStates(rNewStates) 01181 TEMP void THIS::InjectStates(const TaStateSet<StateAttr>& rNewStates) { 01182 FD_DG("TaGenerator(" << this << ")::InjectStates(" 01183 << rNewStates.ToString() << ")"); 01184 *pStates=rNewStates; 01185 mpStates->Name("States"); 01186 mpStateSymbolTable->RestrictDomain(*mpStates); 01187 } 01188 01189 01190 01191 // InjectTransRel(rNewtransrel) 01192 TEMP void THIS::InjectTransRel(const TransSet& rNewTransRel) { 01193 FD_DG("TaGenerator::InjectTransRel(...)"); 01194 *mpTransRel=rNewTransRel; 01195 } 01196 01197 // InjectTransRel(rNewtransrel) 01198 TEMP void THIS::InjectTransRel(const ATransSet& rNewTransRel) { 01199 FD_DG("TaGenerator::InjectTransRel(...)"); 01200 *pTransRel=rNewTransRel; 01201 } 01202 01203 01204 // SetTransition(rX1, rEv, rX2) 01205 TEMP bool THIS::SetTransition(const std::string& rX1, const std::string& rEv, const std::string& rX2) { 01206 return BASE::SetTransition(rX1,rEv,rX2); 01207 } 01208 01209 01210 // SetTransition(x1, ev, x2) 01211 TEMP bool THIS::SetTransition(Idx x1, Idx ev, Idx x2) { 01212 return SetTransition(Transition(x1,ev,x2)); 01213 } 01214 01215 // SetTransition(rTransition) 01216 TEMP bool THIS::SetTransition(const Transition& rTransition) { 01217 FD_DG("TaGenerator(" << this << ")::SetTransition(" << rTransition.X1 << "," 01218 << rTransition.Ev << "," << rTransition.X2 << ")"); 01219 #ifdef FAUDES_CHECKED 01220 if (! mpStates->Exists(rTransition.X1)) { 01221 std::stringstream errstr; 01222 errstr << "TaGenerator::SetTransition: state " << rTransition.X1 01223 << " not in stateset"; 01224 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01225 } 01226 if (! mpAlphabet->Exists(rTransition.Ev)) { 01227 std::stringstream errstr; 01228 errstr << "TaGenerator::SetTransition: event " << rTransition.Ev 01229 << " not in alphabet "; 01230 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01231 } 01232 if (! mpStates->Exists(rTransition.X2)) { 01233 std::stringstream errstr; 01234 errstr << "TaGenerator::SetTransition: state " << rTransition.X2 01235 << " not in stateset"; 01236 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01237 } 01238 #endif 01239 return mpTransRel->Insert(rTransition); 01240 } 01241 01242 // SetTransition(rTransition, rAttr) 01243 TEMP bool THIS::SetTransition(const Transition& rTransition, const TransAttr& rAttr) { 01244 FD_DG("TaGenerator(" << this << ")::SetTransition(" << rTransition.X1 << "," 01245 << rTransition.Ev << "," << rTransition.X2 << ", [attr:]" << rAttr.ToString() << ")"); 01246 #ifdef FAUDES_CHECKED 01247 if (! mpStates->Exists(rTransition.X1)) { 01248 std::stringstream errstr; 01249 errstr << "TaGenerator::SetTransition: state " << rTransition.X1 01250 << " not in stateset"; 01251 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01252 } 01253 if (! mpAlphabet->Exists(rTransition.Ev)) { 01254 std::stringstream errstr; 01255 errstr << "TaGenerator::SetTransition: event " << rTransition.Ev 01256 << " not in alphabet "; 01257 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01258 } 01259 if (! mpStates->Exists(rTransition.X2)) { 01260 std::stringstream errstr; 01261 errstr << "TaGenerator::SetTransition: state " << rTransition.X2 01262 << " not in stateset"; 01263 throw Exception("TaGenerator::SetTransition(..)", errstr.str(), 95); 01264 } 01265 #endif 01266 return pTransRel->Insert(rTransition,rAttr); 01267 } 01268 01269 // TransAttribute(trans, attr) 01270 TEMP void THIS::TransAttribute(const Transition& rTrans, const TransAttr& rAttr) { 01271 FD_DG("TaGenerator(" << this << ")::TransAttribute(" 01272 << TStr(rTrans) << ",\"" << rAttr.ToString() << "\")"); 01273 pTransRel->Attribute(rTrans, rAttr); 01274 } 01275 01276 // TransAttribute(index, attr) 01277 TEMP void THIS::TransAttribute(const Transition& rTrans, const Type& rAttr) { 01278 FD_DG("TaGenerator(" << this << ")::TransAttribute(" 01279 << TStr(rTrans) << ",\"" << rAttr.ToString() << "\")"); 01280 const TransAttr* attrp = dynamic_cast<const TransAttr*>(&rAttr); 01281 if(!attrp) { 01282 std::stringstream errstr; 01283 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name(); 01284 throw Exception("TaGenerator::TransAttribute", errstr.str(), 63); 01285 } 01286 mpTransRel->Attribute(rTrans, *attrp); 01287 } 01288 01289 // TransAttributep(trans) 01290 TEMP TransAttr* THIS::TransAttributep(const Transition& rTrans) { 01291 return pTransRel->Attributep(rTrans); 01292 } 01293 01294 01295 // TransAttribute(trans) 01296 TEMP const TransAttr& THIS::TransAttribute(const Transition& rTrans) const { 01297 return pTransRel->Attribute(rTrans); 01298 } 01299 01300 // EventAttribute(index, attr) 01301 TEMP void THIS::EventAttribute(Idx index, const EventAttr& rAttr) { 01302 FD_DG("TaGenerator(" << this << ")::EventAttribute(" 01303 << EStr(index) << ",\"" << rAttr.ToString() << "\")"); 01304 pAlphabet->Attribute(index, rAttr); 01305 } 01306 01307 // EventAttribute(index, attr) 01308 TEMP void THIS::EventAttribute(Idx index, const Type& rAttr) { 01309 FD_DG("TaGenerator(" << this << ")::EventAttribute(" 01310 << EStr(index) << ",\"" << rAttr.ToString() << "\")"); 01311 const EventAttr* attrp = dynamic_cast<const EventAttr*>(&rAttr); 01312 if(!attrp) { 01313 std::stringstream errstr; 01314 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name(); 01315 throw Exception("TaGenerator::EventAttribute", errstr.str(), 63); 01316 } 01317 pAlphabet->Attribute(index, *attrp); 01318 } 01319 01320 // EventAttribute(index) 01321 TEMP const EventAttr& THIS::EventAttribute(Idx index) const { 01322 return pAlphabet->Attribute(index); 01323 } 01324 01325 // EventAttributep(index) 01326 TEMP EventAttr* THIS::EventAttributep(Idx index) { 01327 return pAlphabet->Attributep(index); 01328 } 01329 01330 // EventAttribute(rName) 01331 TEMP const EventAttr& THIS::EventAttribute(const std::string& rName) const { 01332 return EventAttribute(EventIndex(rName)); 01333 } 01334 01335 // EventAttributep(rName) 01336 TEMP EventAttr* THIS::EventAttributep(const std::string& rName) { 01337 return EventAttributep(EventIndex(rName)); 01338 } 01339 01340 // StateAttribute(index, attr) 01341 TEMP void THIS::StateAttribute(Idx index, const StateAttr& rAttr) { 01342 FD_DG("TaGenerator(" << this << ")::StateAttribute(" 01343 << index << ",\"" << rAttr.ToString() << "\")"); 01344 mpStates->Attribute(index, rAttr); 01345 } 01346 01347 // StateAttribute(index, attr) 01348 TEMP void THIS::StateAttribute(Idx index, const Type& rAttr) { 01349 FD_DG("TaGenerator(" << this << ")::StateAttribute(" 01350 << SStr(index) << ",\"" << rAttr.ToString() << "\")"); 01351 const StateAttr* attrp = dynamic_cast<const StateAttr*>(&rAttr); 01352 if(!attrp) { 01353 std::stringstream errstr; 01354 errstr << "cannot cast event attribute " << rAttr.ToString() << " for generator " << Name(); 01355 throw Exception("TaGenerator::StateAttribute", errstr.str(), 63); 01356 } 01357 mpStates->Attribute(index, *attrp); 01358 } 01359 01360 01361 // StateAttribute(index) 01362 TEMP const StateAttr& THIS::StateAttribute(Idx index) const { 01363 return pStates->Attribute(index); 01364 } 01365 01366 // StateAttributep(index) 01367 TEMP StateAttr* THIS::StateAttributep(Idx index) { 01368 return pStates->Attributep(index); 01369 } 01370 01371 // Alphabet() 01372 TEMP const TaEventSet<EventAttr>& THIS::Alphabet(void) const { 01373 return *pAlphabet; 01374 } 01375 01376 // States() 01377 TEMP const TaStateSet<StateAttr>& THIS::States(void) const { 01378 return *pStates; 01379 } 01380 01381 // TransRel() 01382 TEMP const typename THIS::ATransSet& THIS::TransRel(void) const { 01383 return *pTransRel; 01384 } 01385 01386 // TransRel(res) 01387 TEMP void THIS::TransRel(TransSetX1EvX2& res) const { mpTransRel->ReSort(res); } 01388 TEMP void THIS::TransRel(TransSetEvX1X2& res) const { mpTransRel->ReSort(res); } 01389 TEMP void THIS::TransRel(TransSetEvX2X1& res) const { mpTransRel->ReSort(res); } 01390 TEMP void THIS::TransRel(TransSetX2EvX1& res) const { mpTransRel->ReSort(res); } 01391 TEMP void THIS::TransRel(TransSetX2X1Ev& res) const { mpTransRel->ReSort(res); } 01392 TEMP void THIS::TransRel(TransSetX1X2Ev& res) const { mpTransRel->ReSort(res); } 01393 01394 01395 #undef THIS 01396 #undef TEMP 01397 #undef BASE 01398 01399 01400 01401 } // namespace faudes 01402 01403 #endif 01404 libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |