gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::Scanner::Plugins::pluginData Struct Reference

Structure that holds all the data provided by plugins about themselves. More...

#include <plugin_defs.hpp>

Collaboration diagram for Gambit::Scanner::Plugins::pluginData:

Public Member Functions

 pluginData (const std::string &name, const std::string &type, const std::string &version_in)
 
std::string print ()
 
 ~pluginData ()
 

Public Attributes

std::string name
 
std::string type
 
std::string version
 
std::string tag
 
YAML::Node node
 
printer_interfaceprinter
 
prior_interfaceprior
 
std::vector< void * > inputData
 
std::vector< void(*)(pluginData &)> inits
 
std::map< std::string, factoryBase * > outputFuncs
 
std::map< type_index, void * > plugin_mains
 
void(* deconstructor )()
 
bool loaded
 

Detailed Description

Structure that holds all the data provided by plugins about themselves.

Definition at line 160 of file plugin_defs.hpp.

Constructor & Destructor Documentation

◆ pluginData()

Gambit::Scanner::Plugins::pluginData::pluginData ( const std::string &  name,
const std::string &  type,
const std::string &  version_in 
)
inline

Definition at line 176 of file plugin_defs.hpp.

177  : name(name), type(type), version(version_in), deconstructor(NULL), loaded(false)
178  {
179  std::string::size_type posLast = version.find("_");
180  std::string major_version = version.substr(0, posLast);
181  std::string::size_type posMid = version.find("_", posLast + 1);
182  std::string minor_version = version.substr(posLast + 1, posMid - posLast - 1);
183  posLast = version.find("_", posMid + 1);
184  std::string patch_version = version.substr(posMid + 1, posLast - posMid - 1);
185  std::string release_version = version.substr(posLast + 1);
186  version = major_version + "." + minor_version + "." + patch_version;
187  if (release_version != "")
188  version += "-" + release_version;
189  }

◆ ~pluginData()

Gambit::Scanner::Plugins::pluginData::~pluginData ( )
inline

Definition at line 201 of file plugin_defs.hpp.

202  {
203  if (deconstructor != NULL && loaded == true)
204  deconstructor();
205 
206  for (auto it = outputFuncs.begin(), end = outputFuncs.end(); it != end; it++)
207  {
208  delete it->second;
209  }
210 
211  loaded = false;
212  }
std::map< std::string, factoryBase * > outputFuncs

Member Function Documentation

◆ print()

std::string Gambit::Scanner::Plugins::pluginData::print ( )
inline

Definition at line 191 of file plugin_defs.hpp.

192  {
193  std::stringstream ss;
194  ss << "plugin name: " << name << std::endl;
195  ss << "plugin type: " << type << std::endl;
196  ss << "plugin version: " << version << std::endl;
197 
198  return ss.str();
199  }

Member Data Documentation

◆ deconstructor

void(* Gambit::Scanner::Plugins::pluginData::deconstructor) ()

Definition at line 173 of file plugin_defs.hpp.

◆ inits

std::vector<void (*)(pluginData &)> Gambit::Scanner::Plugins::pluginData::inits

Definition at line 170 of file plugin_defs.hpp.

◆ inputData

std::vector<void *> Gambit::Scanner::Plugins::pluginData::inputData

Definition at line 169 of file plugin_defs.hpp.

◆ loaded

bool Gambit::Scanner::Plugins::pluginData::loaded

Definition at line 174 of file plugin_defs.hpp.

◆ name

std::string Gambit::Scanner::Plugins::pluginData::name

Definition at line 162 of file plugin_defs.hpp.

◆ node

YAML::Node Gambit::Scanner::Plugins::pluginData::node

Definition at line 166 of file plugin_defs.hpp.

◆ outputFuncs

std::map<std::string, factoryBase *> Gambit::Scanner::Plugins::pluginData::outputFuncs

Definition at line 171 of file plugin_defs.hpp.

◆ plugin_mains

std::map<type_index, void *> Gambit::Scanner::Plugins::pluginData::plugin_mains

Definition at line 172 of file plugin_defs.hpp.

◆ printer

printer_interface* Gambit::Scanner::Plugins::pluginData::printer

Definition at line 167 of file plugin_defs.hpp.

◆ prior

prior_interface* Gambit::Scanner::Plugins::pluginData::prior

Definition at line 168 of file plugin_defs.hpp.

◆ tag

std::string Gambit::Scanner::Plugins::pluginData::tag

Definition at line 165 of file plugin_defs.hpp.

◆ type

std::string Gambit::Scanner::Plugins::pluginData::type

Definition at line 163 of file plugin_defs.hpp.

◆ version

std::string Gambit::Scanner::Plugins::pluginData::version

Definition at line 164 of file plugin_defs.hpp.


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