gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool

Forward declaration of FptrFinder. More...

#include <spec_fptrfinder.hpp>

Inheritance diagram for Gambit::FptrFinder< HostSpec, MTag >:
Collaboration diagram for Gambit::FptrFinder< HostSpec, MTag >:

Public Member Functions

 FptrFinder (const SetMaps< HostSpec, MTag > &params)
 
template<class Map >
bool search_map (const std::string &name, const Map *const map, typename Map::const_iterator &it)
 helper functions for searching individual maps More...
 
void check (bool safe)
 Check if it is (supposed to be) safe to dereference a map iterator Throw an error if it isn't. More...
 
template<class ITER >
bool check_indices_1 (const std::string &name, const ITER &it, const int i, const int whichit, const bool debug)
 Methods for setting parameters (named parameter idiom) E.g. More...
 
template<class ITER >
bool check_indices_2 (const std::string &, const ITER &it, const int i, const int j, const int whichit)
 
bool find (const std::string &name, bool=true, SafeBool check_antiparticle=SafeBool(true))
 Search function for 0-index maps. More...
 
bool find (const std::string &name, int i, bool=true, SafeBool check_antiparticle=SafeBool(true))
 Search function for 1-index maps. More...
 
bool find (const std::string &name, int i, int j)
 Search function for 2-index maps. More...
 
int get_error_code ()
 Error reporting. More...
 
std::string get_error_message ()
 
void raise_error (const std::string &origin)
 
void check_index_initd (const std::string &origin, const int index, const std::string &label)
 
bool find_override_0index (const std::string &name)
 Search 0-index override map. More...
 
bool find_override_1index (const std::string &name, const int i)
 Search 1-index override map. More...
 
bool find_override_2index (const std::string &name, const int i, const int j)
 Search 2-index override map. More...
 
bool find_0index (const std::string &name)
 Search 0-index wrapper maps. More...
 
bool find_1index (const std::string &name, const int i)
 Search 1-index wrapper maps. More...
 
bool find_2index (const std::string &name, const int i, const int j)
 Search 2-index wrapper maps. More...
 

Public Attributes

CallFcn< HostSpec, MTag > callfcn
 Caller for whatever function was found HostSpec has to work slightly differently depending on whether FptrFinder is specialised for MapTag::Get or MapTag::Set, so we just declare it here and do the specialisation after the class declaration. More...
 

Private Types

typedef HostSpec::D D
 Get type of the derived spectrum wrapper from HostSpec. More...
 

Private Member Functions

bool ito0_safe ()
 Functions to check whether or not it is safe to dereference the above iterators. More...
 
bool ito1_safe ()
 
bool ito2_safe ()
 
bool it0_safe ()
 
bool it1_safe ()
 
bool it2_safe ()
 
bool it0W_safe ()
 
bool it1W_safe ()
 
bool it2W_safe ()
 
bool it0M_safe ()
 
bool it1M_safe ()
 
bool it2M_safe ()
 
bool it0I_safe ()
 
bool it1I_safe ()
 
bool it2I_safe ()
 

Private Attributes

const std::string label
 Label to help track down errors if they occur. More...
 
std::string lastname
 Last used search string (only set if there was a problem, for error messages) More...
 
HostSpec *const fakethis
 HostSpec class pretending to be an extra set of class functions, so need the "this" pointer. More...
 
const HostSpec *const const_fakethis
 
const bool no_overrides_
 Flag to disable searching of override maps (for retrieving original, unoverriden values) More...
 
const bool override_only_
 Flag to permit searching only override maps. More...
 
const std::map< std::string, double > * omap0_
 Pointers to const maps to use for search Maps from base class (override maps, should only be used in getter case) More...
 
const std::map< std::string, std::map< int, double > > * omap1_
 
const std::map< std::string, std::map< int, std::map< int, double > > > * omap2_
 
const MapTypes< D, MTag >::fmap0 * map0_
 Maps filled by derived (wrapper) classes. More...
 
const MapTypes< D, MTag >::fmap1 * map1_
 
const MapTypes< D, MTag >::fmap2 * map2_
 
const MapTypes< D, MTag >::fmap0W * map0W_
 
const MapTypes< D, MTag >::fmap1W * map1W_
 
const MapTypes< D, MTag >::fmap2W * map2W_
 
const MapTypes< D, MTag >::fmap0_extraM * map0M_
 
const MapTypes< D, MTag >::fmap1_extraM * map1M_
 
const MapTypes< D, MTag >::fmap2_extraM * map2M_
 
const MapTypes< D, MTag >::fmap0_extraI * map0I_
 
const MapTypes< D, MTag >::fmap1_extraI * map1I_
 
const MapTypes< D, MTag >::fmap2_extraI * map2I_
 
std::map< std::string, double >::const_iterator ito0
 Iterators needed for storing locatation of search result ...for override values. More...
 
std::map< std::string, std::map< int, double > >::const_iterator ito1
 
std::map< std::string, std::map< int, std::map< int, double > > >::const_iterator ito2
 
MapTypes< D, MTag >::fmap0::const_iterator it0
 ...for derived class values More...
 
MapTypes< D, MTag >::fmap1::const_iterator it1
 
MapTypes< D, MTag >::fmap2::const_iterator it2
 
MapTypes< D, MTag >::fmap0W::const_iterator it0W
 
MapTypes< D, MTag >::fmap1W::const_iterator it1W
 
MapTypes< D, MTag >::fmap2W::const_iterator it2W
 
MapTypes< D, MTag >::fmap0_extraM::const_iterator it0M
 
MapTypes< D, MTag >::fmap1_extraM::const_iterator it1M
 
MapTypes< D, MTag >::fmap2_extraM::const_iterator it2M
 
MapTypes< D, MTag >::fmap0_extraI::const_iterator it0I
 
MapTypes< D, MTag >::fmap1_extraI::const_iterator it1I
 
MapTypes< D, MTag >::fmap2_extraI::const_iterator it2I
 
int whichiter
 
int index1
 
int index2
 
int error_code
 

Static Private Attributes

static const std::map< std::string, doublenullmap_ito0 = std::map<std::string,double> ()
 empty maps used to initialise the above iterators More...
 
static const std::map< std::string, std::map< int, double > > nullmap_ito1 = std::map<std::string,std::map<int,double>>()
 
static const std::map< std::string, std::map< int, std::map< int, double > > > nullmap_ito2 = std::map<std::string,std::map<int,std::map<int,double>>>()
 
static const MapTypes< D, MTag >::fmap0 nullmap_it0 = typename MapTypes<typename HS::D,MT>::fmap0 ()
 ...for derived class values More...
 
static const MapTypes< D, MTag >::fmap1 nullmap_it1 = typename MapTypes<typename HS::D,MT>::fmap1 ()
 
static const MapTypes< D, MTag >::fmap2 nullmap_it2 = typename MapTypes<typename HS::D,MT>::fmap2 ()
 
static const MapTypes< D, MTag >::fmap0W nullmap_it0W = typename MapTypes<typename HS::D,MT>::fmap0W ()
 
static const MapTypes< D, MTag >::fmap1W nullmap_it1W = typename MapTypes<typename HS::D,MT>::fmap1W ()
 
static const MapTypes< D, MTag >::fmap2W nullmap_it2W = typename MapTypes<typename HS::D,MT>::fmap2W ()
 
static const MapTypes< D, MTag >::fmap0_extraM nullmap_it0M = typename MapTypes<typename HS::D,MT>::fmap0_extraM()
 
static const MapTypes< D, MTag >::fmap1_extraM nullmap_it1M = typename MapTypes<typename HS::D,MT>::fmap1_extraM()
 
static const MapTypes< D, MTag >::fmap2_extraM nullmap_it2M = typename MapTypes<typename HS::D,MT>::fmap2_extraM()
 
static const MapTypes< D, MTag >::fmap0_extraI nullmap_it0I = typename MapTypes<typename HS::D,MT>::fmap0_extraI()
 
static const MapTypes< D, MTag >::fmap1_extraI nullmap_it1I = typename MapTypes<typename HS::D,MT>::fmap1_extraI()
 
static const MapTypes< D, MTag >::fmap2_extraI nullmap_it2I = typename MapTypes<typename HS::D,MT>::fmap2_extraI()
 
static const std::map< int, const std::string > error_msg
 

Friends

class CallFcn< HostSpec, MTag >
 

Detailed Description

template<class HostSpec, class MTag>
class Gambit::FptrFinder< HostSpec, MTag >

Forward declaration of FptrFinder.

Helper class for locating the function pointer corresponding to a requested string, from amongst the various different maps in which it could be located.

Definition at line 37 of file spec_fptrfinder.hpp.

Member Typedef Documentation

◆ D

template<class HostSpec, class MTag>
typedef HostSpec::D Gambit::FptrFinder< HostSpec, MTag >::D
private

Get type of the derived spectrum wrapper from HostSpec.

Definition at line 169 of file spec_fptrfinder.hpp.

Constructor & Destructor Documentation

◆ FptrFinder()

template<class HostSpec, class MTag>
Gambit::FptrFinder< HostSpec, MTag >::FptrFinder ( const SetMaps< HostSpec, MTag > &  params)
inline

Definition at line 277 of file spec_fptrfinder.hpp.

278  : label(params.label_)
279  , lastname("NONE")
280  , fakethis(params.fakethis_)
281  , const_fakethis(params.const_fakethis_)
282  , no_overrides_(params.no_overrides_)
283  , override_only_(params.override_only_)
284  , omap0_(params.omap0_)
285  , omap1_(params.omap1_)
286  , omap2_(params.omap2_)
287  , map0_ (params.map0_)
288  , map1_ (params.map1_)
289  , map2_ (params.map2_)
290  , map0W_(params.map0W_)
291  , map1W_(params.map1W_)
292  , map2W_(params.map2W_)
293  , map0M_(params.map0M_)
294  , map1M_(params.map1M_)
295  , map2M_(params.map2M_)
296  , map0I_(params.map0I_)
297  , map1I_(params.map1I_)
298  , map2I_(params.map2I_)
299  , ito0(nullmap_ito0.end())
300  , ito1(nullmap_ito1.end())
301  , ito2(nullmap_ito2.end())
302  , it0 (nullmap_it0.end())
303  , it1 (nullmap_it1.end())
304  , it2 (nullmap_it2.end())
305  , it0W(nullmap_it0W.end())
306  , it1W(nullmap_it1W.end())
307  , it2W(nullmap_it2W.end())
308  , it0M(nullmap_it0M.end())
309  , it1M(nullmap_it1M.end())
310  , it2M(nullmap_it2M.end())
311  , it0I(nullmap_it0I.end())
312  , it1I(nullmap_it1I.end())
313  , it2I(nullmap_it2I.end())
314  , whichiter(-1)
315  , index1(-1)
316  , index2(-1)
317  , error_code(-1)
318  , callfcn(this)
319  {}
const std::map< std::string, std::map< int, double > > * omap1_
const bool override_only_
Flag to permit searching only override maps.
std::string lastname
Last used search string (only set if there was a problem, for error messages)
const bool no_overrides_
Flag to disable searching of override maps (for retrieving original, unoverriden values) ...
static const MapTypes< D, MTag >::fmap2W nullmap_it2W
const MapTypes< D, MTag >::fmap2_extraM * map2M_
CallFcn< HostSpec, MTag > callfcn
Caller for whatever function was found HostSpec has to work slightly differently depending on whether...
static const std::map< std::string, double > nullmap_ito0
empty maps used to initialise the above iterators
const MapTypes< D, MTag >::fmap1W * map1W_
std::map< std::string, std::map< int, std::map< int, double > > >::const_iterator ito2
MapTypes< D, MTag >::fmap2W::const_iterator it2W
std::map< std::string, double >::const_iterator ito0
Iterators needed for storing locatation of search result ...for override values.
static const MapTypes< D, MTag >::fmap1_extraM nullmap_it1M
MapTypes< D, MTag >::fmap0_extraI::const_iterator it0I
const MapTypes< D, MTag >::fmap0 * map0_
Maps filled by derived (wrapper) classes.
const std::string label
Label to help track down errors if they occur.
static const MapTypes< D, MTag >::fmap0_extraM nullmap_it0M
MapTypes< D, MTag >::fmap1::const_iterator it1
const MapTypes< D, MTag >::fmap2W * map2W_
static const MapTypes< D, MTag >::fmap0 nullmap_it0
...for derived class values
const MapTypes< D, MTag >::fmap1 * map1_
const MapTypes< D, MTag >::fmap1_extraI * map1I_
MapTypes< D, MTag >::fmap2::const_iterator it2
MapTypes< D, MTag >::fmap0::const_iterator it0
...for derived class values
static const MapTypes< D, MTag >::fmap2_extraM nullmap_it2M
MapTypes< D, MTag >::fmap0W::const_iterator it0W
MapTypes< D, MTag >::fmap2_extraI::const_iterator it2I
MapTypes< D, MTag >::fmap1_extraI::const_iterator it1I
HostSpec *const fakethis
HostSpec class pretending to be an extra set of class functions, so need the "this" pointer...
static const std::map< std::string, std::map< int, double > > nullmap_ito1
static const std::map< std::string, std::map< int, std::map< int, double > > > nullmap_ito2
static const MapTypes< D, MTag >::fmap1_extraI nullmap_it1I
MapTypes< D, MTag >::fmap2_extraM::const_iterator it2M
const MapTypes< D, MTag >::fmap2 * map2_
MapTypes< D, MTag >::fmap1_extraM::const_iterator it1M
const MapTypes< D, MTag >::fmap0_extraI * map0I_
static const MapTypes< D, MTag >::fmap0_extraI nullmap_it0I
MapTypes< D, MTag >::fmap0_extraM::const_iterator it0M
MapTypes< D, MTag >::fmap1W::const_iterator it1W
const std::map< std::string, std::map< int, std::map< int, double > > > * omap2_
static const MapTypes< D, MTag >::fmap1 nullmap_it1
static const MapTypes< D, MTag >::fmap2 nullmap_it2
std::map< std::string, std::map< int, double > >::const_iterator ito1
const MapTypes< D, MTag >::fmap0_extraM * map0M_
const MapTypes< D, MTag >::fmap2_extraI * map2I_
static const MapTypes< D, MTag >::fmap1W nullmap_it1W
const MapTypes< D, MTag >::fmap1_extraM * map1M_
static const MapTypes< D, MTag >::fmap2_extraI nullmap_it2I
const HostSpec *const const_fakethis
static const MapTypes< D, MTag >::fmap0W nullmap_it0W
const MapTypes< D, MTag >::fmap0W * map0W_
const std::map< std::string, double > * omap0_
Pointers to const maps to use for search Maps from base class (override maps, should only be used in ...

Member Function Documentation

◆ check()

template<class HostSpec, class MTag>
void Gambit::FptrFinder< HostSpec, MTag >::check ( bool  safe)
inline

Check if it is (supposed to be) safe to dereference a map iterator Throw an error if it isn't.

Definition at line 381 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

382  {
383  if(not safe)
384  {
385  std::ostringstream errmsg;
386  errmsg << "Safety check for map iterator failed! (in FptrFinder). This indicates a bug in the FptrFinder class; please report it.";
387  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
388  }
389  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the caller graph for this function:

◆ check_index_initd()

template<class HostSpec, class MTag>
void Gambit::FptrFinder< HostSpec, MTag >::check_index_initd ( const std::string &  origin,
const int  index,
const std::string &  label 
)
inline

Definition at line 350 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

351  {
352  if(index==-1)
353  {
354  std::ostringstream errmsg;
355  errmsg << "Error retrieving particle spectrum data!" << std::endl;
356  errmsg << "An index ("<<label<<") was not set when retrieving item of type '"<<label<<"' with string reference '"<<lastname<<"'!" <<std::endl;
357  errmsg << "This is a bug in the FptrFinder class, please report it."<<std::endl;
358  utils_error().forced_throw(origin,errmsg.str());
359  }
360  }
std::string lastname
Last used search string (only set if there was a problem, for error messages)
EXPORT_SYMBOLS error & utils_error()
Utility errors.
const std::string label
Label to help track down errors if they occur.
Here is the caller graph for this function:

◆ check_indices_1()

template<class HostSpec, class MTag>
template<class ITER >
bool Gambit::FptrFinder< HostSpec, MTag >::check_indices_1 ( const std::string &  name,
const ITER &  it,
const int  i,
const int  whichit,
const bool  debug 
)
inline

Methods for setting parameters (named parameter idiom) E.g.

call constructor like this to use named "parameters" FptrFinder().map(x).map2(z).mapM(y) Could protect parameters from being reset by putting these setters in a friend class, which can only set the FptrFinder parameters via the FptrFinder constructor, but this is good enough for the use here I think. NOTE: I think this comment refers to moved/removed functionality...

Definition at line 400 of file spec_fptrfinder.hpp.

401  {
402  bool found = false;
403  /* Switch index convention */
404  int offset = const_fakethis->get_index_offset();
405  index1 = i + offset; /* set for later use */
406  /* Check that index is in the permitted set */
407  if( not within_bounds(index1, it->second.iset1) )
408  {
409  /* index1 out of bounds */
410  found = false;
411  error_code = 2;
412  }
413  else {
414  /* everything cool. */
415  found = true;
416  if(debug) std::cout<<" Found ("<<name<<","<<i<<") in 1-index map"<<std::endl;
417  whichiter=whichit;
418  }
419  return found;
420  }
bool within_bounds(const int i, const std::set< int > allowed)
Helper function for checking if indices are valid.
const HostSpec *const const_fakethis

◆ check_indices_2()

template<class HostSpec, class MTag>
template<class ITER >
bool Gambit::FptrFinder< HostSpec, MTag >::check_indices_2 ( const std::string &  ,
const ITER &  it,
const int  i,
const int  j,
const int  whichit 
)
inline

Definition at line 423 of file spec_fptrfinder.hpp.

424  {
425  bool found = false;
426  /* Switch index convention */
427  int offset = const_fakethis->get_index_offset();
428  index1 = i + offset; /* set for later use */
429  index2 = j + offset; /* set for later use */
430  /* Check that index is in the permitted set */
431  if( not within_bounds(index1, it->second.iset1) )
432  {
433  /* index1 out of bounds */
434  found = false;
435  error_code = 2;
436  }
437  else if( not within_bounds(index2, it->second.iset2) )
438  {
439  /* index2 out of bounds */
440  found = false;
441  error_code = 3;
442  }
443  else {
444  /* everything cool. */
445  found = true;
446  whichiter=whichit;
447  }
448  return found;
449  }
bool within_bounds(const int i, const std::set< int > allowed)
Helper function for checking if indices are valid.
const HostSpec *const const_fakethis

◆ find() [1/3]

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find ( const std::string &  name,
bool  = true,
SafeBool  check_antiparticle = SafeBool(true) 
)
inline

Search function for 0-index maps.

Get antiparticle name if it exists Slightly wasteful to do this all the time if not needed, but makes the code simpler and realistically won't make any difference.

Definition at line 596 of file spec_fptrfinder.hpp.

Referenced by Gambit::Spec< SMHiggsSimpleSpec >::get(), Gambit::Spec< SMHiggsSimpleSpec >::has(), and Gambit::Spec< SMHiggsSimpleSpec >::set().

597  {
598  bool found = false;
599  lastname = name;
600  error_code = -2;
601  #ifdef CHECK_WHERE_FOUND
602  std::cout<<" Searching all 0-index maps for "<<name<<std::endl;
603  #endif
604 
608  std::string antiname = "none";
609  if(check_antiparticle and PDB.has_particle(name) and PDB.has_antiparticle(name))
610  {
611  antiname = PDB.get_antiparticle(name);
612  } else {
613  check_antiparticle = SafeBool(false); // No antiparticle PDB entry, so cancel that part of search.
614  }
615 
616  // Search override maps first
617  if(not found and not no_overrides_)
618  {
619  if(not found) found = find_override_0index(name);
620  if(not found and PDB.has_short_name(name) ) {
621  std::pair<str, int> p = PDB.short_name_pair(name);
622  found = find_override_1index(p.first, p.second);
623  }
624  if(check_antiparticle) // Check antiparticles
625  {
626  if(not found) found = find_override_0index(antiname);
627  if(not found and PDB.has_short_name(antiname) ) {
628  std::pair<str, int> p = PDB.short_name_pair(antiname);
629  found = find_override_1index(p.first, p.second);
630  }
631  }
632  if(not found) error_code = 1;
633  }
634 
635  // If no override match, search the wrapper class maps
636  if(not found and not override_only_)
637  {
638  if(not found) found = find_0index(name);
639  if(not found and PDB.has_short_name(name) ) {
640  std::pair<str, int> p = PDB.short_name_pair(name);
641  found = find_1index(p.first, p.second);
642  }
643  if(check_antiparticle) // Check antiparticles
644  {
645  if(not found) found = find_0index(antiname);
646  if(not found and PDB.has_short_name(antiname) ) {
647  std::pair<str, int> p = PDB.short_name_pair(antiname);
648  found = find_1index(p.first, p.second);
649  }
650  }
651  if(not found) error_code = 1;
652  }
653 
654  #ifdef CHECK_WHERE_FOUND
655  std::cout<<" 0-index search result: found="<<found<<std::endl;
656  #endif
657 
658  if(found) error_code = 0; // Should be no problem!
659  return found;
660  }
const bool override_only_
Flag to permit searching only override maps.
std::string lastname
Last used search string (only set if there was a problem, for error messages)
const bool no_overrides_
Flag to disable searching of override maps (for retrieving original, unoverriden values) ...
#define PDB
bool find_0index(const std::string &name)
Search 0-index wrapper maps.
bool find_1index(const std::string &name, const int i)
Search 1-index wrapper maps.
bool find_override_0index(const std::string &name)
Search 0-index override map.
bool find_override_1index(const std::string &name, const int i)
Search 1-index override map.
Here is the caller graph for this function:

◆ find() [2/3]

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find ( const std::string &  name,
int  i,
bool  = true,
SafeBool  check_antiparticle = SafeBool(true) 
)
inline

Search function for 1-index maps.

Get antiparticle name if it exists

Definition at line 663 of file spec_fptrfinder.hpp.

664  {
665  bool found = false;
666  lastname = name;
667  error_code = -2;
668  #ifdef CHECK_WHERE_FOUND
669  std::cout<<" Searching all 1-index maps for ("<<name<<","<<i<<")"<<std::endl;
670  #endif
671 
673  std::string antiname = "none";
674  int ai = 0;
675  if(check_antiparticle and PDB.has_particle(name,i) and PDB.has_antiparticle(name,i))
676  {
677  std::pair<str,int> p = PDB.get_antiparticle(name,i);
678  antiname = p.first;
679  ai = p.second;
680  } else {
681  check_antiparticle = SafeBool(false); // No antiparticle PDB entry, so cancel that part of search.
682  }
683 
684  // Search override maps first
685  if(not found and not no_overrides_)
686  {
687  if(not found) found = find_override_1index(name,i);
688  if(not found and PDB.has_particle(name,i)) found = find_override_0index(PDB.long_name(name,i));
689  if(check_antiparticle) // Check antiparticles
690  {
691  if(not found) found = find_override_1index(antiname,ai);
692  if(not found and PDB.has_particle(antiname,i)) found = find_override_0index(PDB.long_name(antiname,ai));
693  }
694  if(not found) error_code = 1;
695  }
696 
697  if(not found and not override_only_)
698  {
699  if(not found) found = find_1index(name,i);
700  if(not found and PDB.has_particle(name,i)) found = find_0index(PDB.long_name(name,i));
701  if(check_antiparticle) // Check antiparticles
702  {
703  if(not found) found = find_1index(antiname,ai);
704  if(not found and PDB.has_particle(antiname,i)) found = find_0index(PDB.long_name(antiname,ai));
705  }
706  if(not found) error_code = 1;
707  }
708 
709  #ifdef CHECK_WHERE_FOUND
710  std::cout<<" 1-index search result: found="<<found<<std::endl;
711  #endif
712 
713  if(found) error_code = 0; // Should be no problem!
714  return found;
715  }
const bool override_only_
Flag to permit searching only override maps.
std::string lastname
Last used search string (only set if there was a problem, for error messages)
const bool no_overrides_
Flag to disable searching of override maps (for retrieving original, unoverriden values) ...
#define PDB
bool find_0index(const std::string &name)
Search 0-index wrapper maps.
bool find_1index(const std::string &name, const int i)
Search 1-index wrapper maps.
bool find_override_0index(const std::string &name)
Search 0-index override map.
bool find_override_1index(const std::string &name, const int i)
Search 1-index override map.

◆ find() [3/3]

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find ( const std::string &  name,
int  i,
int  j 
)
inline

Search function for 2-index maps.

Definition at line 718 of file spec_fptrfinder.hpp.

719  {
720  bool found = false;
721  lastname = name;
722  error_code = -2;
723 
724  // Antiparticle string is a bit tricky here, because it is not
725  // well-defined whether the name or a name plus index is needed
726  // for the conversion. Better off just banning antiparticle
727  // name conversions for two-index cases.
728 
729  // Search maps for function; if found then store it
730  if( not no_overrides_ )
731  {
732  if(not found) found = find_override_2index(name,i,j);
733  if(not found) error_code = 1;
734  }
735 
736  // If no override, search the wrapper class maps
737  if(not found and not override_only_)
738  {
739  if(not found) found = find_2index(name,i,j);
740  if(not found) error_code = 1;
741  }
742 
743  #ifdef CHECK_WHERE_FOUND
744  std::cout<<" 2-index search result: found="<<found<<std::endl;
745  #endif
746 
747  if(found) error_code = 0; // Should be no problem!
748  return found;
749  }
const bool override_only_
Flag to permit searching only override maps.
std::string lastname
Last used search string (only set if there was a problem, for error messages)
const bool no_overrides_
Flag to disable searching of override maps (for retrieving original, unoverriden values) ...
bool find_2index(const std::string &name, const int i, const int j)
Search 2-index wrapper maps.
bool find_override_2index(const std::string &name, const int i, const int j)
Search 2-index override map.

◆ find_0index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_0index ( const std::string &  name)
inline

Search 0-index wrapper maps.

Definition at line 524 of file spec_fptrfinder.hpp.

525  {
526  bool found = false;
527  #ifdef CHECK_WHERE_FOUND
528  std::cout<<" Searching 0-index standard maps for "<<name<<std::endl;
529  #endif
530  if ( search_map(name,map0_,it0) ){ found=true; whichiter=3;
531  #ifdef CHECK_WHERE_FOUND
532  std::cout<<" Found "<<name<<" in found in 0-index map (type O)"<<std::endl;
533  #endif
534  }
535  else if( search_map(name,map0W_,it0W) ){ found=true; whichiter=12;
536  #ifdef CHECK_WHERE_FOUND
537  std::cout<<" Found "<<name<<" in found in 0-index map (type OW)"<<std::endl;
538  #endif
539  }
540  else if( search_map(name,map0M_,it0M) ){ found=true; whichiter=4;
541  #ifdef CHECK_WHERE_FOUND
542  std::cout<<" Found "<<name<<" in found in 0-index map (type OM)"<<std::endl;
543  #endif
544  }
545  else if( search_map(name,map0I_,it0I) ){ found=true; whichiter=5;
546  #ifdef CHECK_WHERE_FOUND
547  std::cout<<" Found "<<name<<" in found in 0-index map (type OI)"<<std::endl;
548  #endif
549  }
550  return found;
551  }
MapTypes< D, MTag >::fmap0_extraI::const_iterator it0I
const MapTypes< D, MTag >::fmap0 * map0_
Maps filled by derived (wrapper) classes.
MapTypes< D, MTag >::fmap0::const_iterator it0
...for derived class values
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
MapTypes< D, MTag >::fmap0W::const_iterator it0W
const MapTypes< D, MTag >::fmap0_extraI * map0I_
MapTypes< D, MTag >::fmap0_extraM::const_iterator it0M
const MapTypes< D, MTag >::fmap0_extraM * map0M_
const MapTypes< D, MTag >::fmap0W * map0W_

◆ find_1index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_1index ( const std::string &  name,
const int  i 
)
inline

Search 1-index wrapper maps.

Definition at line 554 of file spec_fptrfinder.hpp.

555  {
556  bool found = false;
557  #ifdef CHECK_WHERE_FOUND
558  std::cout<<" Searching standard 1-index maps for ("<<name<<","<<i<<")"<<std::endl;
559  #endif
560 
561  bool debug=false;
562  #ifdef CHECK_WHERE_FOUND
563  debug=true;
564  #endif
565 
566  if( search_map(name,map1_,it1) ) { check(it1_safe()); found=check_indices_1(name,it1 ,i,6,debug); }
567  else if( search_map(name,map1W_,it1W) ){ check(it1W_safe()); found=check_indices_1(name,it1W,i,13,debug); }
568  else if( search_map(name,map1M_,it1M) ){ check(it1M_safe()); found=check_indices_1(name,it1M,i,7,debug); }
569  else if( search_map(name,map1I_,it1I) ){ check(it1I_safe()); found=check_indices_1(name,it1I,i,8,debug); }
570  return found;
571  }
const MapTypes< D, MTag >::fmap1W * map1W_
void check(bool safe)
Check if it is (supposed to be) safe to dereference a map iterator Throw an error if it isn&#39;t...
MapTypes< D, MTag >::fmap1::const_iterator it1
const MapTypes< D, MTag >::fmap1 * map1_
const MapTypes< D, MTag >::fmap1_extraI * map1I_
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
MapTypes< D, MTag >::fmap1_extraI::const_iterator it1I
MapTypes< D, MTag >::fmap1_extraM::const_iterator it1M
bool check_indices_1(const std::string &name, const ITER &it, const int i, const int whichit, const bool debug)
Methods for setting parameters (named parameter idiom) E.g.
MapTypes< D, MTag >::fmap1W::const_iterator it1W
const MapTypes< D, MTag >::fmap1_extraM * map1M_

◆ find_2index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_2index ( const std::string &  name,
const int  i,
const int  j 
)
inline

Search 2-index wrapper maps.

Definition at line 574 of file spec_fptrfinder.hpp.

575  {
576  bool found = false;
577  #ifdef CHECK_WHERE_FOUND
578  std::cout<<" Searching standard 2-index maps for ("<<name<<","<<i<<","<<j<<")"<<std::endl;
579  #endif
580 
581  if( search_map(name,map2_,it2) ) { check(it2_safe()); found=check_indices_2(name,it2, i,j,9); }
582  else if( search_map(name,map2W_,it2W) ){ check(it2W_safe()); found=check_indices_2(name,it2W,i,j,14); }
583  else if( search_map(name,map2M_,it2M) ){ check(it2M_safe()); found=check_indices_2(name,it2M,i,j,10); }
584  else if( search_map(name,map2I_,it2I) ){ check(it2I_safe()); found=check_indices_2(name,it2I,i,j,11); }
585  else {
586  found = false;
587  error_code = 1;
588  }
589 
590  return found;
591  }
const MapTypes< D, MTag >::fmap2_extraM * map2M_
void check(bool safe)
Check if it is (supposed to be) safe to dereference a map iterator Throw an error if it isn&#39;t...
MapTypes< D, MTag >::fmap2W::const_iterator it2W
const MapTypes< D, MTag >::fmap2W * map2W_
MapTypes< D, MTag >::fmap2::const_iterator it2
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
MapTypes< D, MTag >::fmap2_extraI::const_iterator it2I
MapTypes< D, MTag >::fmap2_extraM::const_iterator it2M
const MapTypes< D, MTag >::fmap2 * map2_
const MapTypes< D, MTag >::fmap2_extraI * map2I_
bool check_indices_2(const std::string &, const ITER &it, const int i, const int j, const int whichit)

◆ find_override_0index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_override_0index ( const std::string &  name)
inline

Search 0-index override map.

Functions to search for specific entries with no translation (to factorise the various pieces of the complicated search functions)

Definition at line 455 of file spec_fptrfinder.hpp.

456  {
457  bool found = false;
458  #ifdef CHECK_WHERE_FOUND
459  std::cout<<" Searching 0-index override maps for "<<name<<std::endl;
460  #endif
461  if( omap0_!=NULL and search_map(name,omap0_,ito0) )
462  {
463  found=true;
464  whichiter=0;
465  #ifdef CHECK_WHERE_FOUND
466  std::cout<<" Found "<<name<<" in 0-index override map"<<std::endl;
467  #endif
468  }
469  return found;
470  }
std::map< std::string, double >::const_iterator ito0
Iterators needed for storing locatation of search result ...for override values.
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
const std::map< std::string, double > * omap0_
Pointers to const maps to use for search Maps from base class (override maps, should only be used in ...

◆ find_override_1index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_override_1index ( const std::string &  name,
const int  i 
)
inline

Search 1-index override map.

Definition at line 473 of file spec_fptrfinder.hpp.

474  {
475  bool found = false;
476  #ifdef CHECK_WHERE_FOUND
477  std::cout<<" Searching 1-index override maps for ("<<name<<","<<i<<")"<<std::endl;
478  #endif
479  if( omap1_!=NULL and search_map(name,omap1_,ito1) )
480  {
481  // Check that index (key) exists in inner map
482  std::map<int,double>::const_iterator it = ito1->second.find(i);
483  if( it != ito1->second.end() )
484  {
485  found=true;
486  index1=i;
487  whichiter=1;
488  #ifdef CHECK_WHERE_FOUND
489  std::cout<<" Found ("<<name<<","<<i<<") in 1-index override map"<<std::endl;
490  #endif
491  }
492  }
493  return found;
494  }
const std::map< std::string, std::map< int, double > > * omap1_
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
std::map< std::string, std::map< int, double > >::const_iterator ito1

◆ find_override_2index()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::find_override_2index ( const std::string &  name,
const int  i,
const int  j 
)
inline

Search 2-index override map.

Definition at line 497 of file spec_fptrfinder.hpp.

498  {
499  bool found = false;
500  #ifdef CHECK_WHERE_FOUND
501  std::cout<<" Searching 2-index override maps for ("<<name<<","<<i<<","<<j<<")"<<std::endl;
502  #endif
503  if( omap2_!=NULL and search_map(name,omap2_,ito2) )
504  {
505  // Check that first index (key) exists in inner map
506  std::map<int,std::map<int,double>>::const_iterator jt = ito2->second.find(i);
507  if( jt != ito2->second.end() )
508  {
509  // Check that second index (key) exists in second-inner map
510  std::map<int,double>::const_iterator jt2 = jt->second.find(j);
511  if( jt2 != jt->second.end() )
512  {
513  found=true;
514  index1=i;
515  index2=j;
516  whichiter=2;
517  }
518  }
519  }
520  return found;
521  }
std::map< std::string, std::map< int, std::map< int, double > > >::const_iterator ito2
bool search_map(const std::string &name, const Map *const map, typename Map::const_iterator &it)
helper functions for searching individual maps
const std::map< std::string, std::map< int, std::map< int, double > > > * omap2_

◆ get_error_code()

template<class HostSpec, class MTag>
int Gambit::FptrFinder< HostSpec, MTag >::get_error_code ( )
inline

Error reporting.

Definition at line 322 of file spec_fptrfinder.hpp.

322 { return error_code; }

◆ get_error_message()

template<class HostSpec, class MTag>
std::string Gambit::FptrFinder< HostSpec, MTag >::get_error_message ( )
inline

Definition at line 323 of file spec_fptrfinder.hpp.

324  {
325  std::string msg;
326  switch(error_code)
327  {
328  case -2: msg = "Search began but did not properly set the error code!"; break;
329  case -1: msg = "Search not yet attempted"; break;
330  case 0: msg = "No problem, search succeeded"; break;
331  case 1: msg = "String name lookup failed"; break;
332  case 2: msg = "String name lookup succeeded, index1 out of bounds"; break;
333  case 3: msg = "String name lookup succeeded, index2 out of bounds"; break;
334  default: msg = "Unrecognised error code! This is a bug in FptrFinder!";
335  }
336  return msg;
337  }

◆ it0_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it0_safe ( )
inlineprivate

Definition at line 236 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

236 { return it0 != nullmap_it0.end(); };
static const MapTypes< D, MTag >::fmap0 nullmap_it0
...for derived class values
MapTypes< D, MTag >::fmap0::const_iterator it0
...for derived class values
Here is the caller graph for this function:

◆ it0I_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it0I_safe ( )
inlineprivate

Definition at line 245 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

245 { return it0I != nullmap_it0I.end(); };
MapTypes< D, MTag >::fmap0_extraI::const_iterator it0I
static const MapTypes< D, MTag >::fmap0_extraI nullmap_it0I
Here is the caller graph for this function:

◆ it0M_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it0M_safe ( )
inlineprivate

Definition at line 242 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

242 { return it0M != nullmap_it0M.end(); };
static const MapTypes< D, MTag >::fmap0_extraM nullmap_it0M
MapTypes< D, MTag >::fmap0_extraM::const_iterator it0M
Here is the caller graph for this function:

◆ it0W_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it0W_safe ( )
inlineprivate

Definition at line 239 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

239 { return it0W != nullmap_it0W.end(); };
MapTypes< D, MTag >::fmap0W::const_iterator it0W
static const MapTypes< D, MTag >::fmap0W nullmap_it0W
Here is the caller graph for this function:

◆ it1_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it1_safe ( )
inlineprivate

Definition at line 237 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

237 { return it1 != nullmap_it1.end(); };
MapTypes< D, MTag >::fmap1::const_iterator it1
static const MapTypes< D, MTag >::fmap1 nullmap_it1
Here is the caller graph for this function:

◆ it1I_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it1I_safe ( )
inlineprivate

Definition at line 246 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

246 { return it1I != nullmap_it1I.end(); };
MapTypes< D, MTag >::fmap1_extraI::const_iterator it1I
static const MapTypes< D, MTag >::fmap1_extraI nullmap_it1I
Here is the caller graph for this function:

◆ it1M_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it1M_safe ( )
inlineprivate

Definition at line 243 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

243 { return it1M != nullmap_it1M.end(); };
static const MapTypes< D, MTag >::fmap1_extraM nullmap_it1M
MapTypes< D, MTag >::fmap1_extraM::const_iterator it1M
Here is the caller graph for this function:

◆ it1W_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it1W_safe ( )
inlineprivate

Definition at line 240 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

240 { return it1W != nullmap_it1W.end(); };
MapTypes< D, MTag >::fmap1W::const_iterator it1W
static const MapTypes< D, MTag >::fmap1W nullmap_it1W
Here is the caller graph for this function:

◆ it2_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it2_safe ( )
inlineprivate

Definition at line 238 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

238 { return it2 != nullmap_it2.end(); };
MapTypes< D, MTag >::fmap2::const_iterator it2
static const MapTypes< D, MTag >::fmap2 nullmap_it2
Here is the caller graph for this function:

◆ it2I_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it2I_safe ( )
inlineprivate

Definition at line 247 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

247 { return it2I != nullmap_it2I.end(); };
MapTypes< D, MTag >::fmap2_extraI::const_iterator it2I
static const MapTypes< D, MTag >::fmap2_extraI nullmap_it2I
Here is the caller graph for this function:

◆ it2M_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it2M_safe ( )
inlineprivate

Definition at line 244 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

244 { return it2M != nullmap_it2M.end(); };
static const MapTypes< D, MTag >::fmap2_extraM nullmap_it2M
MapTypes< D, MTag >::fmap2_extraM::const_iterator it2M
Here is the caller graph for this function:

◆ it2W_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::it2W_safe ( )
inlineprivate

Definition at line 241 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

241 { return it2W != nullmap_it2W.end(); };
static const MapTypes< D, MTag >::fmap2W nullmap_it2W
MapTypes< D, MTag >::fmap2W::const_iterator it2W
Here is the caller graph for this function:

◆ ito0_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::ito0_safe ( )
inlineprivate

Functions to check whether or not it is safe to dereference the above iterators.

Definition at line 233 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

233 { return ito0 != nullmap_ito0.end(); };
static const std::map< std::string, double > nullmap_ito0
empty maps used to initialise the above iterators
std::map< std::string, double >::const_iterator ito0
Iterators needed for storing locatation of search result ...for override values.
Here is the caller graph for this function:

◆ ito1_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::ito1_safe ( )
inlineprivate

Definition at line 234 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

234 { return ito1 != nullmap_ito1.end(); };
static const std::map< std::string, std::map< int, double > > nullmap_ito1
std::map< std::string, std::map< int, double > >::const_iterator ito1
Here is the caller graph for this function:

◆ ito2_safe()

template<class HostSpec, class MTag>
bool Gambit::FptrFinder< HostSpec, MTag >::ito2_safe ( )
inlineprivate

Definition at line 235 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

235 { return ito2 != nullmap_ito2.end(); };
std::map< std::string, std::map< int, std::map< int, double > > >::const_iterator ito2
static const std::map< std::string, std::map< int, std::map< int, double > > > nullmap_ito2
Here is the caller graph for this function:

◆ raise_error()

template<class HostSpec, class MTag>
void Gambit::FptrFinder< HostSpec, MTag >::raise_error ( const std::string &  origin)
inline

Definition at line 339 of file spec_fptrfinder.hpp.

Referenced by Gambit::Spec< SMHiggsSimpleSpec >::get(), and Gambit::Spec< SMHiggsSimpleSpec >::set().

340  {
341  std::ostringstream errmsg;
342  errmsg << "Error retrieving particle spectrum data!" << std::endl;
343  errmsg << "No "<<label<<" with string reference '"<<lastname<<"' exists!" <<std::endl;
344  errmsg << "Search failed with error_code "<<error_code<<" from FptrFinder with label "<<label<<": "<<get_error_message();
345  if(index1!=-1) errmsg << " index1: "<<index1<<std::endl;
346  if(index2!=-1) errmsg << " index2: "<<index2<<std::endl;
347  utils_error().forced_throw(origin,errmsg.str());
348  }
std::string lastname
Last used search string (only set if there was a problem, for error messages)
std::string get_error_message()
EXPORT_SYMBOLS error & utils_error()
Utility errors.
const std::string label
Label to help track down errors if they occur.
Here is the caller graph for this function:

◆ search_map()

template<class HostSpec, class MTag>
template<class Map >
bool Gambit::FptrFinder< HostSpec, MTag >::search_map ( const std::string &  name,
const Map *const  map,
typename Map::const_iterator &  it 
)
inline

helper functions for searching individual maps

Definition at line 365 of file spec_fptrfinder.hpp.

366  {
367  bool found = true;
368  if(map==NULL)
369  {
370  std::ostringstream errmsg;
371  errmsg << "Tried to use FptrFinder to search a SubSpectrum function pointer map, but did not correctly supply the map to FptrFinder! This is a bug in the SubSpectrum class; please report it. (Attempted to access map of type "<<typeid(Map).name()<<")";
372  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
373  }
374  it = map->find(name);
375  if( it == map->end() ){ found = false; lastname = name; }
376  return found;
377  }
std::string lastname
Last used search string (only set if there was a problem, for error messages)
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34

Friends And Related Function Documentation

◆ CallFcn< HostSpec, MTag >

template<class HostSpec, class MTag>
friend class CallFcn< HostSpec, MTag >
friend

Definition at line 155 of file spec_fptrfinder.hpp.

Member Data Documentation

◆ callfcn

template<class HostSpec, class MTag>
CallFcn<HostSpec,MTag> Gambit::FptrFinder< HostSpec, MTag >::callfcn

Caller for whatever function was found HostSpec has to work slightly differently depending on whether FptrFinder is specialised for MapTag::Get or MapTag::Set, so we just declare it here and do the specialisation after the class declaration.

HostSpec has to be a struct, since we partial specialisation of functions is not allowed in C++, but it is treated like a member function.

Definition at line 274 of file spec_fptrfinder.hpp.

Referenced by Gambit::Spec< SMHiggsSimpleSpec >::get(), and Gambit::Spec< SMHiggsSimpleSpec >::set().

◆ const_fakethis

template<class HostSpec, class MTag>
const HostSpec* const Gambit::FptrFinder< HostSpec, MTag >::const_fakethis
private

◆ error_code

template<class HostSpec, class MTag>
int Gambit::FptrFinder< HostSpec, MTag >::error_code
private

◆ error_msg

template<class HostSpec, class MTag>
const std::map<int, const std::string> Gambit::FptrFinder< HostSpec, MTag >::error_msg
staticprivate

Definition at line 265 of file spec_fptrfinder.hpp.

◆ fakethis

template<class HostSpec, class MTag>
HostSpec* const Gambit::FptrFinder< HostSpec, MTag >::fakethis
private

HostSpec class pretending to be an extra set of class functions, so need the "this" pointer.

Definition at line 165 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

◆ index1

template<class HostSpec, class MTag>
int Gambit::FptrFinder< HostSpec, MTag >::index1
private

◆ index2

template<class HostSpec, class MTag>
int Gambit::FptrFinder< HostSpec, MTag >::index2
private

◆ it0

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap0::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it0
private

◆ it0I

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap0_extraI::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it0I
private

◆ it0M

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap0_extraM::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it0M
private

◆ it0W

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap0W::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it0W
private

◆ it1

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap1::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it1
private

◆ it1I

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap1_extraI::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it1I
private

◆ it1M

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap1_extraM::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it1M
private

◆ it1W

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap1W::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it1W
private

◆ it2

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap2::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it2
private

◆ it2I

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap2_extraI::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it2I
private

◆ it2M

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap2_extraM::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it2M
private

◆ it2W

template<class HostSpec, class MTag>
MapTypes<D,MTag>::fmap2W::const_iterator Gambit::FptrFinder< HostSpec, MTag >::it2W
private

◆ ito0

template<class HostSpec, class MTag>
std::map<std::string,double>::const_iterator Gambit::FptrFinder< HostSpec, MTag >::ito0
private

Iterators needed for storing locatation of search result ...for override values.

Definition at line 198 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()().

◆ ito1

template<class HostSpec, class MTag>
std::map<std::string,std::map<int,double> >::const_iterator Gambit::FptrFinder< HostSpec, MTag >::ito1
private

◆ ito2

template<class HostSpec, class MTag>
std::map<std::string,std::map<int,std::map<int,double> > >::const_iterator Gambit::FptrFinder< HostSpec, MTag >::ito2
private

◆ label

template<class HostSpec, class MTag>
const std::string Gambit::FptrFinder< HostSpec, MTag >::label
private

Label to help track down errors if they occur.

Definition at line 159 of file spec_fptrfinder.hpp.

Referenced by Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), and Gambit::CallFcn< HostSpec, MapTag::Set >::operator()().

◆ lastname

template<class HostSpec, class MTag>
std::string Gambit::FptrFinder< HostSpec, MTag >::lastname
private

Last used search string (only set if there was a problem, for error messages)

Definition at line 162 of file spec_fptrfinder.hpp.

◆ map0_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap0* Gambit::FptrFinder< HostSpec, MTag >::map0_
private

Maps filled by derived (wrapper) classes.

Definition at line 183 of file spec_fptrfinder.hpp.

◆ map0I_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap0_extraI* Gambit::FptrFinder< HostSpec, MTag >::map0I_
private

Definition at line 192 of file spec_fptrfinder.hpp.

◆ map0M_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap0_extraM* Gambit::FptrFinder< HostSpec, MTag >::map0M_
private

Definition at line 189 of file spec_fptrfinder.hpp.

◆ map0W_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap0W* Gambit::FptrFinder< HostSpec, MTag >::map0W_
private

Definition at line 186 of file spec_fptrfinder.hpp.

◆ map1_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap1* Gambit::FptrFinder< HostSpec, MTag >::map1_
private

Definition at line 184 of file spec_fptrfinder.hpp.

◆ map1I_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap1_extraI* Gambit::FptrFinder< HostSpec, MTag >::map1I_
private

Definition at line 193 of file spec_fptrfinder.hpp.

◆ map1M_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap1_extraM* Gambit::FptrFinder< HostSpec, MTag >::map1M_
private

Definition at line 190 of file spec_fptrfinder.hpp.

◆ map1W_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap1W* Gambit::FptrFinder< HostSpec, MTag >::map1W_
private

Definition at line 187 of file spec_fptrfinder.hpp.

◆ map2_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap2* Gambit::FptrFinder< HostSpec, MTag >::map2_
private

Definition at line 185 of file spec_fptrfinder.hpp.

◆ map2I_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap2_extraI* Gambit::FptrFinder< HostSpec, MTag >::map2I_
private

Definition at line 194 of file spec_fptrfinder.hpp.

◆ map2M_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap2_extraM* Gambit::FptrFinder< HostSpec, MTag >::map2M_
private

Definition at line 191 of file spec_fptrfinder.hpp.

◆ map2W_

template<class HostSpec, class MTag>
const MapTypes<D,MTag>::fmap2W* Gambit::FptrFinder< HostSpec, MTag >::map2W_
private

Definition at line 188 of file spec_fptrfinder.hpp.

◆ no_overrides_

template<class HostSpec, class MTag>
const bool Gambit::FptrFinder< HostSpec, MTag >::no_overrides_
private

Flag to disable searching of override maps (for retrieving original, unoverriden values)

Definition at line 172 of file spec_fptrfinder.hpp.

◆ nullmap_it0

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap0 Gambit::FptrFinder< HS, MT >::nullmap_it0 = typename MapTypes<typename HS::D,MT>::fmap0 ()
staticprivate

...for derived class values

Definition at line 219 of file spec_fptrfinder.hpp.

◆ nullmap_it0I

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap0_extraI Gambit::FptrFinder< HS, MT >::nullmap_it0I = typename MapTypes<typename HS::D,MT>::fmap0_extraI()
staticprivate

Definition at line 228 of file spec_fptrfinder.hpp.

◆ nullmap_it0M

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap0_extraM Gambit::FptrFinder< HS, MT >::nullmap_it0M = typename MapTypes<typename HS::D,MT>::fmap0_extraM()
staticprivate

Definition at line 225 of file spec_fptrfinder.hpp.

◆ nullmap_it0W

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap0W Gambit::FptrFinder< HS, MT >::nullmap_it0W = typename MapTypes<typename HS::D,MT>::fmap0W ()
staticprivate

Definition at line 222 of file spec_fptrfinder.hpp.

◆ nullmap_it1

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap1 Gambit::FptrFinder< HS, MT >::nullmap_it1 = typename MapTypes<typename HS::D,MT>::fmap1 ()
staticprivate

Definition at line 220 of file spec_fptrfinder.hpp.

◆ nullmap_it1I

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap1_extraI Gambit::FptrFinder< HS, MT >::nullmap_it1I = typename MapTypes<typename HS::D,MT>::fmap1_extraI()
staticprivate

Definition at line 229 of file spec_fptrfinder.hpp.

◆ nullmap_it1M

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap1_extraM Gambit::FptrFinder< HS, MT >::nullmap_it1M = typename MapTypes<typename HS::D,MT>::fmap1_extraM()
staticprivate

Definition at line 226 of file spec_fptrfinder.hpp.

◆ nullmap_it1W

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap1W Gambit::FptrFinder< HS, MT >::nullmap_it1W = typename MapTypes<typename HS::D,MT>::fmap1W ()
staticprivate

Definition at line 223 of file spec_fptrfinder.hpp.

◆ nullmap_it2

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap2 Gambit::FptrFinder< HS, MT >::nullmap_it2 = typename MapTypes<typename HS::D,MT>::fmap2 ()
staticprivate

Definition at line 221 of file spec_fptrfinder.hpp.

◆ nullmap_it2I

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap2_extraI Gambit::FptrFinder< HS, MT >::nullmap_it2I = typename MapTypes<typename HS::D,MT>::fmap2_extraI()
staticprivate

Definition at line 230 of file spec_fptrfinder.hpp.

◆ nullmap_it2M

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap2_extraM Gambit::FptrFinder< HS, MT >::nullmap_it2M = typename MapTypes<typename HS::D,MT>::fmap2_extraM()
staticprivate

Definition at line 227 of file spec_fptrfinder.hpp.

◆ nullmap_it2W

template<class HostSpec, class MTag>
const MapTypes< typename HS::D, MT >::fmap2W Gambit::FptrFinder< HS, MT >::nullmap_it2W = typename MapTypes<typename HS::D,MT>::fmap2W ()
staticprivate

Definition at line 224 of file spec_fptrfinder.hpp.

◆ nullmap_ito0

template<class HostSpec, class MTag>
const std::map< std::string, double > Gambit::FptrFinder< HS, MT >::nullmap_ito0 = std::map<std::string,double> ()
staticprivate

empty maps used to initialise the above iterators

Initialise static members of FptrFinder.

Definition at line 216 of file spec_fptrfinder.hpp.

◆ nullmap_ito1

template<class HostSpec, class MTag>
const std::map< std::string, std::map< int, double > > Gambit::FptrFinder< HS, MT >::nullmap_ito1 = std::map<std::string,std::map<int,double>>()
staticprivate

Definition at line 217 of file spec_fptrfinder.hpp.

◆ nullmap_ito2

template<class HostSpec, class MTag>
const std::map< std::string, std::map< int, std::map< int, double > > > Gambit::FptrFinder< HS, MT >::nullmap_ito2 = std::map<std::string,std::map<int,std::map<int,double>>>()
staticprivate

Definition at line 218 of file spec_fptrfinder.hpp.

◆ omap0_

template<class HostSpec, class MTag>
const std::map<std::string,double>* Gambit::FptrFinder< HostSpec, MTag >::omap0_
private

Pointers to const maps to use for search Maps from base class (override maps, should only be used in getter case)

Definition at line 179 of file spec_fptrfinder.hpp.

◆ omap1_

template<class HostSpec, class MTag>
const std::map<std::string,std::map<int,double> >* Gambit::FptrFinder< HostSpec, MTag >::omap1_
private

Definition at line 180 of file spec_fptrfinder.hpp.

◆ omap2_

template<class HostSpec, class MTag>
const std::map<std::string,std::map<int,std::map<int,double> > >* Gambit::FptrFinder< HostSpec, MTag >::omap2_
private

Definition at line 181 of file spec_fptrfinder.hpp.

◆ override_only_

template<class HostSpec, class MTag>
const bool Gambit::FptrFinder< HostSpec, MTag >::override_only_
private

Flag to permit searching only override maps.

Definition at line 175 of file spec_fptrfinder.hpp.

◆ whichiter

template<class HostSpec, class MTag>
int Gambit::FptrFinder< HostSpec, MTag >::whichiter
private

The documentation for this class was generated from the following file: