icedb  version 0.5.1
Snow particle scattering database API
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
icedb::refract::provider_s Struct Reference

#include <refract.hpp>

Inheritance diagram for icedb::refract::provider_s:
Inheritance graph
[legend]
Collaboration diagram for icedb::refract::provider_s:
Collaboration graph
[legend]

Public Types

enum  spt { spt::NONE, spt::FREQ, spt::FREQTEMP, spt::OTHER }
 

Public Member Functions

virtual ~provider_s ()
 
provider_mp addReq (const std::string &name, const std::string &units, double low, double high)
 
provider_mp registerFunc (int priority=0)
 

Static Public Member Functions

static provider_mp generate (const std::string &name, const std::string &subst, const std::string &source, const std::string &notes, provider_s::spt sv, void *ptr)
 

Public Attributes

std::string name
 
std::string substance
 
std::string source
 
std::string notes
 
std::map< std::string, requirement_preqs
 
enum icedb::refract::provider_s::spt speciality_function_type
 
void * specialty_pointer
 

Private Member Functions

 provider_s ()
 

Detailed Description

Definition at line 30 of file refract.hpp.

Member Enumeration Documentation

◆ spt

Enumerator
NONE 
FREQ 
FREQTEMP 
OTHER 

Definition at line 43 of file refract.hpp.

43  {
44  NONE,
45  FREQ,
46  FREQTEMP,
47  OTHER
enum icedb::refract::provider_s::spt speciality_function_type

Constructor & Destructor Documentation

◆ provider_s()

icedb::refract::provider_s::provider_s ( )
private

Definition at line 132 of file refract.cpp.

132 {}

◆ ~provider_s()

icedb::refract::provider_s::~provider_s ( )
virtual

Definition at line 133 of file refract.cpp.

133 {}

Member Function Documentation

◆ addReq()

provider_mp icedb::refract::provider_s::addReq ( const std::string &  name,
const std::string &  units,
double  low,
double  high 
)

Definition at line 110 of file refract.cpp.

References icedb::refract::requirement_s::generate().

111  {
112  auto res = this->shared_from_this();
113  auto newreq = requirement_s::generate(name, units, low, high);
114  reqs[name] = newreq;
115  return res;
116  }
static requirement_p generate(const std::string &name, const std::string &units, double low, double high)
Definition: refract.cpp:134
std::map< std::string, requirement_p > reqs
Definition: refract.hpp:39
Here is the call graph for this function:

◆ generate()

provider_mp icedb::refract::provider_s::generate ( const std::string &  name,
const std::string &  subst,
const std::string &  source,
const std::string &  notes,
provider_s::spt  sv,
void *  ptr 
)
static

Definition at line 97 of file refract.cpp.

Referenced by icedb::refract::implementations::_init().

100  {
101  provider_mp res(new provider_s);
102  res->name = name;
103  res->substance = subst;
104  res->source = source;
105  res->notes = notes;
106  res->speciality_function_type = sv;
107  res->specialty_pointer = ptr;
108  return res;
109  }
std::shared_ptr< provider_s > provider_mp
Definition: refract.hpp:27
Here is the caller graph for this function:

◆ registerFunc()

provider_mp icedb::refract::provider_s::registerFunc ( int  priority = 0)

Definition at line 117 of file refract.cpp.

References icedb::refract::implementations::allProvidersSet, icedb::refract::implementations::providersByName, icedb::refract::implementations::providersSet, and icedb::refract::implementations::substs.

117  {
118  provider_mp res = this->shared_from_this();
119  all_providers_mp block;
122  else {
125  }
126  block->insert(std::pair<int,provider_mp>(priority,res));
127  implementations::allProvidersSet->insert(std::pair<int, provider_mp>(priority, res));
128  implementations::providersByName[res->name] = res;
129  implementations::substs.emplace(res->substance);
130  return res;
131  }
std::map< std::string, provider_mp > providersByName
Definition: refract.cpp:19
std::shared_ptr< provider_s > provider_mp
Definition: refract.hpp:27
std::multimap< int, provider_p > provider_collection_type
Definition: refract.hpp:55
std::map< std::string, all_providers_mp > providersSet
Definition: refract.cpp:18
std::shared_ptr< provider_collection_type > all_providers_mp
Definition: refract.hpp:57
all_providers_mp allProvidersSet
Definition: refract.cpp:17
std::set< std::string > substs
Definition: refract.cpp:20

Member Data Documentation

◆ name

std::string icedb::refract::provider_s::name

Definition at line 35 of file refract.hpp.

◆ notes

std::string icedb::refract::provider_s::notes

Definition at line 38 of file refract.hpp.

◆ reqs

std::map<std::string, requirement_p> icedb::refract::provider_s::reqs

Definition at line 39 of file refract.hpp.

◆ source

std::string icedb::refract::provider_s::source

Definition at line 37 of file refract.hpp.

◆ speciality_function_type

enum icedb::refract::provider_s::spt icedb::refract::provider_s::speciality_function_type

◆ specialty_pointer

void* icedb::refract::provider_s::specialty_pointer

Definition at line 49 of file refract.hpp.

◆ substance

std::string icedb::refract::provider_s::substance

Definition at line 36 of file refract.hpp.


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