Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
predcont.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2023 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef PREDCONT_H_
5 #define PREDCONT_H_
6 
7 /* predcont.h */
8 
9 #include "energy.h"
10 
12 class t_PredCont : public Singleton<t_PredCont>
13 {
14  friend class Singleton<t_PredCont>;
15 protected:
16  t_PredCont();
17 private:
18  vector<EnergyEntry> p_val;
19  // the offset of the nFnu entries in the line stack.
20  long p_offset;
21 public:
22  long find(double energy, const char* unit = "Ryd") const;
23  long add(double energy, const char* unit = "Ryd");
24  EnergyEntry& operator[] ( size_t i )
25  {
26  return p_val[i];
27  }
28  size_t size() const
29  {
30  return p_val.size();
31  }
32  void set_offset(long offset)
33  {
34  p_offset = offset;
35  }
36  long offset() const
37  {
38  return p_offset;
39  }
40 };
41 
42 #endif /* PREDCONT_H_ */
Definition: cddefines.h:213
Definition: predcont.h:12
long p_offset
Definition: predcont.h:20
Definition: energy.h:105
void set_offset(long offset)
Definition: predcont.h:32
long find(double energy, const char *unit="Ryd") const
Definition: predcont.cpp:112
vector< EnergyEntry > p_val
Definition: predcont.h:18
double energy(const genericState &gs)
Definition: generic_state.cpp:51
t_PredCont()
Definition: predcont.cpp:7
size_t size() const
Definition: predcont.h:28
long add(double energy, const char *unit="Ryd")
Definition: predcont.cpp:122
long offset() const
Definition: predcont.h:36
EnergyEntry & operator[](size_t i)
Definition: predcont.h:24