Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

datamap-inline.h

Go to the documentation of this file.
00001 // Data map implementation -*- C++ -*-
00002 
00003 // Copyright (C) 2001-2003 Hermann Schichl
00004 //
00005 // This file is part of the COCONUT API.  This library
00006 // is free software; you can redistribute it and/or modify it under the
00007 // terms of the Library GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // Library GNU General Public License for more details.
00015 
00016 // As a special exception, you may use this file as part of a free software
00017 // library without restriction.  Specifically, if other files instantiate
00018 // templates or use macros or inline functions from this file, or you compile
00019 // this file and link it with other files to produce an executable, this
00020 // file does not by itself cause the resulting executable to be covered by
00021 // the Library GNU General Public License.  This exception does not however
00022 // invalidate any other reasons why the executable file might be covered by
00023 // the Library GNU General Public License.
00024 
00027 #ifndef __DATAMAP_INLINE_H__
00028 #define __DATAMAP_INLINE_H__
00029 
00030 #define __DATAMAP_SEPARATOR  "%"
00031 #define __DATAMAP_IDXSPEC    "IDX"
00032 
00033 inline bool datamap::sinsert(const char* __cp, const additional_info_u& __h,
00034                              bool remove)
00035 {
00036   return sinsert(std::string(__cp), __h, remove);
00037 }
00038 
00039 inline bool datamap::sinsert(const std::string& __s, int i,
00040                              const additional_info_u& __h,
00041                              bool remove)
00042 {
00043   update_index(__s, i, true);
00044   return sinsert(encode(__s, i), __h, remove);
00045 }
00046 
00047 inline bool datamap::sinsert(const char* __cp, int i,
00048                              const additional_info_u& __h,
00049                              bool remove)
00050 {
00051   return sinsert(std::string(__cp), i, __h, remove);
00052 }
00053 
00054 inline void datamap::remove(const std::string& __s)
00055 {
00056   _Base::iterator __b = find(__s);
00057 
00058   if(__b != end())
00059     erase(__b);
00060 }
00061 
00062 inline void datamap::remove(const char* __cp)
00063 {
00064   remove(std::string(__cp));
00065 }
00066 
00067 inline void datamap::remove(const std::string& __s, int i)
00068 {
00069   update_index(__s, i, false);
00070   remove(encode(__s, i));
00071 }
00072 
00073 inline void datamap::remove(const char* __cp, int i)
00074 {
00075   remove(std::string(__cp), i);
00076 }
00077 
00078 inline const additional_info_u& datamap::sfind(const std::string& __s) const
00079 {
00080   _Base::const_iterator __b = find(__s);
00081   if(__b == end())
00082     return __empty;
00083   else
00084     return __b->second;
00085 }
00086 
00087 inline const additional_info_u& datamap::sfind(const char* __cp) const
00088 {
00089   return sfind(std::string(__cp));
00090 }
00091 
00092 inline const additional_info_u& datamap::sfind(const std::string& __s,
00093                                                   int i) const
00094 {
00095   if(check_index(__s, i))
00096     return sfind(encode(__s, i));
00097   else
00098     return __empty;
00099 }
00100 
00101 inline const additional_info_u& datamap::sfind(const char* __cp, int i) const
00102 {
00103   return sfind(std::string(__cp), i);
00104 }
00105 
00106 inline bool datamap::defd(const std::string& __s) const
00107 {
00108   return find(__s) != end();
00109 }
00110 
00111 inline bool datamap::defd(const char* __cp) const
00112 {
00113   return defd(std::string(__cp));
00114 }
00115 
00116 inline bool datamap::defd(const std::string& __s, int i) const
00117 {
00118   return check_index(__s, i);
00119 }
00120 
00121 inline bool datamap::defd(const char* __cp, int i) const
00122 {
00123   return defd(std::string(__cp), i);
00124 }
00125 
00126 inline bool datamap::which(const std::string& __s,
00127                                     std::vector<int>& __idx) const
00128 {
00129   _Base::const_iterator __b = find(__s + __DATAMAP_SEPARATOR+__DATAMAP_IDXSPEC);
00130   if(__b != end())
00131   {
00132     __idx = __b->second.n();
00133     return true;
00134   }
00135   else if(!__idx.empty())
00136     __idx.erase(__idx.begin(), __idx.end());
00137   return false;
00138 }
00139 
00140 inline bool datamap::which(const char* __cp, 
00141                                     std::vector<int>& __idx) const
00142 {
00143   return which(std::string(__cp), __idx);
00144 }
00145 
00146 inline bool datamap::retrieve(const std::string& __s, bool& __b) const
00147 {
00148   const additional_info_u& __a(sfind(__s));
00149   if(__a.empty())
00150   {
00151 #if 0
00152     std::cerr << "required control data entry '" << __s
00153          << "' is missing" << std::endl;
00154     throw "Programming error";
00155 #endif
00156     return false;
00157   }
00158   else
00159     __b = __a.nb();
00160   return true;
00161 }
00162 
00163 inline bool datamap::retrieve(const std::string& __s, bool& __b, bool __def) const
00164 {
00165   const additional_info_u& __a(sfind(__s));
00166   if(__a.empty())
00167     __b = __def;
00168   else
00169     __b = __a.nb();
00170   return true;
00171 }
00172 
00173 inline bool datamap::retrieve(const std::string& __s, int& __d) const
00174 {
00175   const additional_info_u& __a(sfind(__s));
00176   if(__a.empty())
00177   {
00178     return false;
00179   }
00180   else
00181     __d = __a.nn();
00182   return true;
00183 }
00184 
00185 inline bool datamap::retrieve(const std::string& __s, int& __d, int __def) const
00186 {
00187   const additional_info_u& __a(sfind(__s));
00188   if(__a.empty())
00189     __d = __def;
00190   else
00191     __d = __a.nn();
00192   return true;
00193 }
00194 
00195 inline bool datamap::retrieve(const std::string& __s, unsigned int& __d) const
00196 {
00197   const additional_info_u& __a(sfind(__s));
00198   if(__a.empty())
00199   {
00200     return false;
00201   }
00202   else
00203     __d = __a.nu();
00204   return true;
00205 }
00206 
00207 inline bool datamap::retrieve(const std::string& __s, unsigned int& __d, unsigned int __def) const
00208 {
00209   const additional_info_u& __a(sfind(__s));
00210   if(__a.empty())
00211     __d = __def;
00212   else
00213     __d = __a.nu();
00214   return true;
00215 }
00216 
00217 inline bool datamap::retrieve(const std::string& __s, double& __d) const
00218 {
00219   const additional_info_u& __a(sfind(__s));
00220   if(__a.empty())
00221   {
00222     return false;
00223   }
00224   else
00225     __d = __a.nd();
00226   return true;
00227 }
00228 
00229 inline bool datamap::retrieve(const std::string& __s, double& __d, double __def) const
00230 {
00231   const additional_info_u& __a(sfind(__s));
00232   if(__a.empty())
00233     __d = __def;
00234   else
00235     __d = __a.nd();
00236   return true;
00237 }
00238 
00239 inline bool datamap::retrieve(const std::string& __s, interval& __b) const
00240 {
00241   const additional_info_u& __a(sfind(__s));
00242   if(__a.empty())
00243   {
00244     return false;
00245   }
00246   else
00247     __b = __a.ni();
00248   return true;
00249 }
00250 
00251 inline bool datamap::retrieve(const std::string& __s, interval& __b, const interval& __def) const
00252 {
00253   const additional_info_u& __a(sfind(__s));
00254   if(__a.empty())
00255     __b = __def;
00256   else
00257     __b = __a.ni();
00258   return true;
00259 }
00260 
00261 inline bool datamap::retrieve(const std::string& __s, std::string& __is) const
00262 {
00263   const additional_info_u& __a(sfind(__s));
00264   if(__a.empty())
00265   {
00266     return false;
00267   }
00268   else
00269     __is = __a.s();
00270   return true;
00271 }
00272 
00273 inline bool datamap::retrieve(const std::string& __s, std::string& __is, const std::string& __def) const
00274 {
00275   const additional_info_u& __a(sfind(__s));
00276   if(__a.empty())
00277     __is = __def;
00278   else
00279     __is = __a.s();
00280   return true;
00281 }
00282 
00283 inline bool datamap::retrieve(const std::string& __s, const std::vector<bool>*& __b) const
00284 {
00285   const additional_info_u& __a(sfind(__s));
00286   if(__a.empty())
00287   {
00288     return false;
00289   }
00290   else
00291     __b = &__a.b();
00292   return true;
00293 }
00294 
00295 inline bool datamap::retrieve(const std::string& __s, const std::vector<bool>*& __b, const std::vector<bool>* __def) const
00296 {
00297   const additional_info_u& __a(sfind(__s));
00298   if(__a.empty())
00299     __b = __def;
00300   else
00301     __b = &__a.b();
00302   return true;
00303 }
00304 
00305 inline bool datamap::retrieve(const std::string& __s, const std::vector<int>*& __b) const
00306 {
00307   const additional_info_u& __a(sfind(__s));
00308   if(__a.empty())
00309   {
00310     return false;
00311   }
00312   else
00313     __b = &__a.n();
00314   return true;
00315 }
00316 
00317 inline bool datamap::retrieve(const std::string& __s, const std::vector<int>*& __b, const std::vector<int>* __def) const
00318 {
00319   const additional_info_u& __a(sfind(__s));
00320   if(__a.empty())
00321     __b = __def;
00322   else
00323     __b = &__a.n();
00324   return true;
00325 }
00326 
00327 inline bool datamap::retrieve(const std::string& __s, const std::vector<unsigned int>*& __b) const
00328 {
00329   const additional_info_u& __a(sfind(__s));
00330   if(__a.empty())
00331   {
00332     return false;
00333   }
00334   else
00335     __b = &__a.u();
00336   return true;
00337 }
00338 
00339 inline bool datamap::retrieve(const std::string& __s, const std::vector<unsigned int>*& __b, const std::vector<unsigned int>* __def) const
00340 {
00341   const additional_info_u& __a(sfind(__s));
00342   if(__a.empty())
00343     __b = __def;
00344   else
00345     __b = &__a.u();
00346   return true;
00347 }
00348 
00349 inline bool datamap::retrieve(const std::string& __s, const std::vector<double>*& __b) const
00350 {
00351   const additional_info_u& __a(sfind(__s));
00352   if(__a.empty())
00353   {
00354     return false;
00355   }
00356   else
00357     __b = &__a.d();
00358   return true;
00359 }
00360 
00361 inline bool datamap::retrieve(const std::string& __s, const std::vector<double>*& __b, const std::vector<double>* __def) const
00362 {
00363   const additional_info_u& __a(sfind(__s));
00364   if(__a.empty())
00365     __b = __def;
00366   else
00367     __b = &__a.d();
00368   return true;
00369 }
00370 
00371 inline bool datamap::retrieve(const std::string& __s, const std::vector<interval>*& __b) const
00372 {
00373   const additional_info_u& __a(sfind(__s));
00374   if(__a.empty())
00375   {
00376     return false;
00377   }
00378   else
00379     __b = &__a.i();
00380   return true;
00381 }
00382 
00383 inline bool datamap::retrieve(const std::string& __s, const std::vector<interval>*& __b, const std::vector<interval>* __def) const
00384 {
00385   const additional_info_u& __a(sfind(__s));
00386   if(__a.empty())
00387     __b = __def;
00388   else
00389     __b = &__a.i();
00390   return true;
00391 }
00392 
00393 inline bool datamap::retrieve(const std::string& __s, const matrix<double>*& __b) const
00394 {
00395   const additional_info_u& __a(sfind(__s));
00396   if(__a.empty())
00397   {
00398     return false;
00399   }
00400   else
00401     __b = &__a.m();
00402   return true;
00403 }
00404 
00405 inline bool datamap::retrieve(const std::string& __s, const matrix<double>*& __b, const matrix<double>* __def) const
00406 {
00407   const additional_info_u& __a(sfind(__s));
00408   if(__a.empty())
00409     __b = __def;
00410   else
00411     __b = &__a.m();
00412   return true;
00413 }
00414 
00415 inline bool datamap::retrieve(const std::string& __s, const matrix<int>*& __b) const
00416 {
00417   const additional_info_u& __a(sfind(__s));
00418   if(__a.empty())
00419   {
00420     return false;
00421   }
00422   else
00423     __b = &__a.nm();
00424   return true;
00425 }
00426 
00427 inline bool datamap::retrieve(const std::string& __s, const matrix<int>*& __b, const matrix<int>* __def) const
00428 {
00429   const additional_info_u& __a(sfind(__s));
00430   if(__a.empty())
00431     __b = __def;
00432   else
00433     __b = &__a.nm();
00434   return true;
00435 }
00436 
00437 inline bool datamap::retrieve(const std::string& __s, const matrix<interval>*& __b) const
00438 {
00439   const additional_info_u& __a(sfind(__s));
00440   if(__a.empty())
00441   {
00442     return false;
00443   }
00444   else
00445     __b = &__a.im();
00446   return true;
00447 }
00448 
00449 inline bool datamap::retrieve(const std::string& __s, const matrix<interval>*& __b, const matrix<interval>* __def) const
00450 {
00451   const additional_info_u& __a(sfind(__s));
00452   if(__a.empty())
00453     __b = __def;
00454   else
00455     __b = &__a.im();
00456   return true;
00457 }
00458 
00459 
00460 inline bool datamap::retrieve(const char* __s, bool& __b) const
00461 {
00462   return(retrieve(std::string(__s), __b));
00463 }
00464 
00465 inline bool datamap::retrieve(const char* __s, bool& __b, bool __def) const
00466 {
00467   return(retrieve(std::string(__s), __b, __def));
00468 }
00469 
00470 inline bool datamap::retrieve(const char* __s, int& __d) const
00471 {
00472   return(retrieve(std::string(__s), __d));
00473 }
00474 
00475 inline bool datamap::retrieve(const char* __s, int& __d, int __def) const
00476 {
00477   return(retrieve(std::string(__s), __d, __def));
00478 }
00479 
00480 inline bool datamap::retrieve(const char* __s, unsigned int& __d) const
00481 {
00482   return(retrieve(std::string(__s), __d));
00483 }
00484 
00485 inline bool datamap::retrieve(const char* __s, unsigned int& __d, unsigned int __def) const
00486 {
00487   return(retrieve(std::string(__s), __d, __def));
00488 }
00489 
00490 inline bool datamap::retrieve(const char* __s, double& __d) const
00491 {
00492   return(retrieve(std::string(__s), __d));
00493 }
00494 
00495 inline bool datamap::retrieve(const char* __s, double& __d, double __def) const
00496 {
00497   return(retrieve(std::string(__s), __d, __def));
00498 }
00499 
00500 inline bool datamap::retrieve(const char* __s, interval& __b) const
00501 {
00502   return(retrieve(std::string(__s), __b));
00503 }
00504 
00505 inline bool datamap::retrieve(const char* __s, interval& __b, const interval& __def) const
00506 {
00507   return(retrieve(std::string(__s), __b, __def));
00508 }
00509 
00510 inline bool datamap::retrieve(const char* __s, std::string& __is) const
00511 {
00512   return(retrieve(std::string(__s), __is));
00513 }
00514 
00515 inline bool datamap::retrieve(const char* __s, std::string& __b, const std::string& __def) const
00516 {
00517   return(retrieve(std::string(__s), __b, __def));
00518 }
00519 
00520 inline bool datamap::retrieve(const char* __s, const std::vector<bool>*& __b) const
00521 {
00522   return(retrieve(std::string(__s), __b));
00523 }
00524 
00525 inline bool datamap::retrieve(const char* __s, const std::vector<bool>*& __b, const std::vector<bool>* __def) const
00526 {
00527   return(retrieve(std::string(__s), __b, __def));
00528 }
00529 
00530 inline bool datamap::retrieve(const char* __s, const std::vector<int>*& __b) const
00531 {
00532   return(retrieve(std::string(__s), __b));
00533 }
00534 
00535 inline bool datamap::retrieve(const char* __s, const std::vector<int>*& __b, const std::vector<int>* __def) const
00536 {
00537   return(retrieve(std::string(__s), __b, __def));
00538 }
00539 
00540 inline bool datamap::retrieve(const char* __s, const std::vector<unsigned int>*& __b) const
00541 {
00542   return(retrieve(std::string(__s), __b));
00543 }
00544 
00545 inline bool datamap::retrieve(const char* __s, const std::vector<unsigned int>*& __b, const std::vector<unsigned int>* __def) const
00546 {
00547   return(retrieve(std::string(__s), __b, __def));
00548 }
00549 
00550 inline bool datamap::retrieve(const char* __s, const std::vector<double>*& __b) const
00551 {
00552   return(retrieve(std::string(__s), __b));
00553 }
00554 
00555 inline bool datamap::retrieve(const char* __s, const std::vector<double>*& __b, const std::vector<double>* __def) const
00556 {
00557   return(retrieve(std::string(__s), __b, __def));
00558 }
00559 
00560 inline bool datamap::retrieve(const char* __s, const std::vector<interval>*& __b) const
00561 {
00562   return(retrieve(std::string(__s), __b));
00563 }
00564 
00565 inline bool datamap::retrieve(const char* __s, const std::vector<interval>*& __b, const std::vector<interval>* __def) const
00566 {
00567   return(retrieve(std::string(__s), __b, __def));
00568 }
00569 
00570 inline bool datamap::retrieve(const char* __s, const matrix<double>*& __b) const
00571 {
00572   return(retrieve(std::string(__s), __b));
00573 }
00574 
00575 inline bool datamap::retrieve(const char* __s, const matrix<double>*& __b,
00576       const matrix<double>* __def) const
00577 {
00578   return(retrieve(std::string(__s), __b, __def));
00579 }
00580 
00581 inline bool datamap::retrieve(const char* __s, const matrix<int>*& __b) const
00582 {
00583   return(retrieve(std::string(__s), __b));
00584 }
00585 
00586 inline bool datamap::retrieve(const char* __s, const matrix<int>*& __b,
00587       const matrix<int>* __def) const
00588 {
00589   return(retrieve(std::string(__s), __b, __def));
00590 }
00591 
00592 inline bool datamap::retrieve(const char* __s, const matrix<interval>*& __b) const
00593 {
00594   return(retrieve(std::string(__s), __b));
00595 }
00596 
00597 inline bool datamap::retrieve(const char* __s, const matrix<interval>*& __b,
00598       const matrix<interval>* __def) const
00599 {
00600   return(retrieve(std::string(__s), __b, __def));
00601 }
00602 
00603 inline bool datamap::retrieve_i(const std::string& __s, int i, bool& __b) const
00604 {
00605   if(check_index(__s, i))
00606     return retrieve(encode(__s, i), __b);
00607   else
00608   {
00609     return false;
00610   }
00611   return true;
00612 }
00613 
00614 inline bool datamap::retrieve_i(const std::string& __s, int i, bool& __b, bool __def) const
00615 {
00616   if(check_index(__s, i))
00617     return retrieve(encode(__s, i), __b);
00618   else
00619     __b = __def;
00620   return true;
00621 }
00622 
00623 inline bool datamap::retrieve_i(const std::string& __s, int i, int& __d) const
00624 {
00625   if(check_index(__s, i))
00626     return retrieve(encode(__s, i), __d);
00627   else
00628   {
00629     return false;
00630   }
00631   return true;
00632 }
00633 
00634 inline bool datamap::retrieve_i(const std::string& __s, int i, int& __d, int __def) const
00635 {
00636   if(check_index(__s, i))
00637     return retrieve(encode(__s, i), __d);
00638   else
00639     __d = __def;
00640   return true;
00641 }
00642 
00643 inline bool datamap::retrieve_i(const std::string& __s, int i, unsigned int& __d) const
00644 {
00645   if(check_index(__s, i))
00646     return retrieve(encode(__s, i), __d);
00647   else
00648   {
00649     return false;
00650   }
00651   return true;
00652 }
00653 
00654 inline bool datamap::retrieve_i(const std::string& __s, int i, unsigned int& __d, unsigned int __def) const
00655 {
00656   if(check_index(__s, i))
00657     return retrieve(encode(__s, i), __d);
00658   else
00659     __d = __def;
00660   return true;
00661 }
00662 
00663 inline bool datamap::retrieve_i(const std::string& __s, int i, double& __d) const
00664 {
00665   if(check_index(__s, i))
00666     return retrieve(encode(__s, i), __d);
00667   else
00668   {
00669     return false;
00670   }
00671   return true;
00672 }
00673 
00674 inline bool datamap::retrieve_i(const std::string& __s, int i, double& __d, double __def) const
00675 {
00676   if(check_index(__s, i))
00677     return retrieve(encode(__s, i), __d);
00678   else
00679     __d = __def;
00680   return true;
00681 }
00682 
00683 inline bool datamap::retrieve_i(const std::string& __s, int i, interval& __b) const
00684 {
00685   if(check_index(__s, i))
00686     return retrieve(encode(__s, i), __b);
00687   else
00688   {
00689     return false;
00690   }
00691   return true;
00692 }
00693 
00694 inline bool datamap::retrieve_i(const std::string& __s, int i, interval& __b, const interval& __def) const
00695 {
00696   if(check_index(__s, i))
00697     return retrieve(encode(__s, i), __b);
00698   else
00699     __b = __def;
00700   return true;
00701 }
00702 
00703 inline bool datamap::retrieve_i(const std::string& __s, int i, std::string& __is) const
00704 {
00705   if(check_index(__s, i))
00706     return retrieve(encode(__s, i), __is);
00707   else
00708   {
00709     return false;
00710   }
00711   return true;
00712 }
00713 
00714 inline bool datamap::retrieve_i(const std::string& __s, int i, std::string& __is, const std::string& __def) const
00715 {
00716   if(check_index(__s, i))
00717     return retrieve(encode(__s, i), __is);
00718   else
00719     __is = __def;
00720   return true;
00721 }
00722 
00723 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<bool>*& __b) const
00724 {
00725   if(check_index(__s, i))
00726     return retrieve(encode(__s, i), __b);
00727   else
00728   {
00729     return false;
00730   }
00731   return true;
00732 }
00733 
00734 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<bool>*& __b, const std::vector<bool>* __def) const
00735 {
00736   if(check_index(__s, i))
00737     return retrieve(encode(__s, i), __b);
00738   else
00739     __b = __def;
00740   return true;
00741 }
00742 
00743 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<int>*& __b) const
00744 {
00745   if(check_index(__s, i))
00746     return retrieve(encode(__s, i), __b);
00747   else
00748   {
00749     return false;
00750   }
00751   return true;
00752 }
00753 
00754 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<int>*& __b, const std::vector<int>* __def) const
00755 {
00756   if(check_index(__s, i))
00757     return retrieve(encode(__s, i), __b);
00758   else
00759     __b = __def;
00760   return true;
00761 }
00762 
00763 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<unsigned int>*& __b) const
00764 {
00765   if(check_index(__s, i))
00766     return retrieve(encode(__s, i), __b);
00767   else
00768   {
00769     return false;
00770   }
00771   return true;
00772 }
00773 
00774 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<unsigned int>*& __b, const std::vector<unsigned int>* __def) const
00775 {
00776   if(check_index(__s, i))
00777     return retrieve(encode(__s, i), __b);
00778   else
00779     __b = __def;
00780   return true;
00781 }
00782 
00783 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<double>*& __b) const
00784 {
00785   if(check_index(__s, i))
00786     return retrieve(encode(__s, i), __b);
00787   else
00788   {
00789     return false;
00790   }
00791   return true;
00792 }
00793 
00794 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<double>*& __b, const std::vector<double>* __def) const
00795 {
00796   if(check_index(__s, i))
00797     return retrieve(encode(__s, i), __b);
00798   else
00799     __b = __def;
00800   return true;
00801 }
00802 
00803 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<interval>*& __b) const
00804 {
00805   if(check_index(__s, i))
00806     return retrieve(encode(__s, i), __b);
00807   else
00808   {
00809     return false;
00810   }
00811   return true;
00812 }
00813 
00814 inline bool datamap::retrieve_i(const std::string& __s, int i, const std::vector<interval>*& __b, const std::vector<interval>* __def) const
00815 {
00816   if(check_index(__s, i))
00817     return retrieve(encode(__s, i), __b);
00818   else
00819     __b = __def;
00820   return true;
00821 }
00822 
00823 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<double>*& __b) const
00824 {
00825   if(check_index(__s, i))
00826     return retrieve(encode(__s, i), __b);
00827   else
00828   {
00829     return false;
00830   }
00831   return true;
00832 }
00833 
00834 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<double>*& __b, const matrix<double>* __def) const
00835 {
00836   if(check_index(__s, i))
00837     return retrieve(encode(__s, i), __b);
00838   else
00839     __b = __def;
00840   return true;
00841 }
00842 
00843 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<int>*& __b) const
00844 {
00845   if(check_index(__s, i))
00846     return retrieve(encode(__s, i), __b);
00847   else
00848   {
00849     return false;
00850   }
00851   return true;
00852 }
00853 
00854 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<int>*& __b, const matrix<int>* __def) const
00855 {
00856   if(check_index(__s, i))
00857     return retrieve(encode(__s, i), __b);
00858   else
00859     __b = __def;
00860   return true;
00861 }
00862 
00863 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<interval>*& __b) const
00864 {
00865   if(check_index(__s, i))
00866     return retrieve(encode(__s, i), __b);
00867   else
00868   {
00869     return false;
00870   }
00871   return true;
00872 }
00873 
00874 inline bool datamap::retrieve_i(const std::string& __s, int i, const matrix<interval>*& __b, const matrix<interval>* __def) const
00875 {
00876   if(check_index(__s, i))
00877     return retrieve(encode(__s, i), __b);
00878   else
00879     __b = __def;
00880   return true;
00881 }
00882 
00883 
00884 inline bool datamap::retrieve_i(const char* __s, int i, bool& __b) const
00885 {
00886   return(retrieve_i(std::string(__s), i, __b));
00887 }
00888 
00889 inline bool datamap::retrieve_i(const char* __s, int i, bool& __b, bool __def) const
00890 {
00891   return(retrieve_i(std::string(__s), i, __b, __def));
00892 }
00893 
00894 inline bool datamap::retrieve_i(const char* __s, int i, int& __d) const
00895 {
00896   return(retrieve_i(std::string(__s), i, __d));
00897 }
00898 
00899 inline bool datamap::retrieve_i(const char* __s, int i, int& __d, int __def) const
00900 {
00901   return(retrieve_i(std::string(__s), i, __d, __def));
00902 }
00903 
00904 inline bool datamap::retrieve_i(const char* __s, int i, unsigned int& __d) const
00905 {
00906   return(retrieve_i(std::string(__s), i, __d));
00907 }
00908 
00909 inline bool datamap::retrieve_i(const char* __s, int i, unsigned int& __d, unsigned int __def) const
00910 {
00911   return(retrieve_i(std::string(__s), i, __d, __def));
00912 }
00913 
00914 inline bool datamap::retrieve_i(const char* __s, int i, double& __d) const
00915 {
00916   return(retrieve_i(std::string(__s), i, __d));
00917 }
00918 
00919 inline bool datamap::retrieve_i(const char* __s, int i, double& __d, double __def) const
00920 {
00921   return(retrieve_i(std::string(__s), i, __d, __def));
00922 }
00923 
00924 inline bool datamap::retrieve_i(const char* __s, int i, interval& __b) const
00925 {
00926   return(retrieve_i(std::string(__s), i, __b));
00927 }
00928 
00929 inline bool datamap::retrieve_i(const char* __s, int i, interval& __b, const interval& __def) const
00930 {
00931   return(retrieve_i(std::string(__s), i, __b, __def));
00932 }
00933 
00934 inline bool datamap::retrieve_i(const char* __s, int i, std::string& __is) const
00935 {
00936   return(retrieve_i(std::string(__s), i, __is));
00937 }
00938 
00939 inline bool datamap::retrieve_i(const char* __s, int i, std::string& __b, const std::string& __def) const
00940 {
00941   return(retrieve_i(std::string(__s), i, __b, __def));
00942 }
00943 
00944 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<bool>*& __b) const
00945 {
00946   return(retrieve_i(std::string(__s), i, __b));
00947 }
00948 
00949 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<bool>*& __b, const std::vector<bool>* __def) const
00950 {
00951   return(retrieve_i(std::string(__s), i, __b, __def));
00952 }
00953 
00954 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<int>*& __b) const
00955 {
00956   return(retrieve_i(std::string(__s), i, __b));
00957 }
00958 
00959 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<int>*& __b, const std::vector<int>* __def) const
00960 {
00961   return(retrieve_i(std::string(__s), i, __b, __def));
00962 }
00963 
00964 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<unsigned int>*& __b) const
00965 {
00966   return(retrieve_i(std::string(__s), i, __b));
00967 }
00968 
00969 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<unsigned int>*& __b, const std::vector<unsigned int>* __def) const
00970 {
00971   return(retrieve_i(std::string(__s), i, __b, __def));
00972 }
00973 
00974 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<double>*& __b) const
00975 {
00976   return(retrieve_i(std::string(__s), i, __b));
00977 }
00978 
00979 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<double>*& __b, const std::vector<double>* __def) const
00980 {
00981   return(retrieve_i(std::string(__s), i, __b, __def));
00982 }
00983 
00984 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<interval>*& __b) const
00985 {
00986   return(retrieve_i(std::string(__s), i, __b));
00987 }
00988 
00989 inline bool datamap::retrieve_i(const char* __s, int i, const std::vector<interval>*& __b, const std::vector<interval>* __def) const
00990 {
00991   return(retrieve_i(std::string(__s), i, __b, __def));
00992 }
00993 
00994 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<double>*& __b) const
00995 {
00996   return(retrieve_i(std::string(__s), i, __b));
00997 }
00998 
00999 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<double>*& __b,
01000       const matrix<double>* __def) const
01001 {
01002   return(retrieve_i(std::string(__s), i, __b, __def));
01003 }
01004 
01005 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<int>*& __b) const
01006 {
01007   return(retrieve_i(std::string(__s), i, __b));
01008 }
01009 
01010 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<int>*& __b,
01011       const matrix<int>* __def) const
01012 {
01013   return(retrieve_i(std::string(__s), i, __b, __def));
01014 }
01015 
01016 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<interval>*& __b) const
01017 {
01018   return(retrieve_i(std::string(__s), i, __b));
01019 }
01020 
01021 inline bool datamap::retrieve_i(const char* __s, int i, const matrix<interval>*& __b,
01022       const matrix<interval>* __def) const
01023 {
01024   return(retrieve_i(std::string(__s), i, __b, __def));
01025 }
01026 
01027 #endif /* __DATAMAP_INLINE_H__ */

Generated on Tue Nov 4 01:57:57 2003 for COCONUT API by doxygen1.2.18