Elements  6.2
A C++ base framework for the Euclid Software.
ClassExample.h
Go to the documentation of this file.
1 
27 #ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
28 #define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
29 
30 #include <memory> // for std::unique_ptr
31 #include <string> // for std::string
32 #include <vector> // for std::vector
33 
34 #include <cstdint> // for std::int64_t
35 
36 #include "ElementsKernel/Export.h"
37 
38 namespace Elements {
39 namespace Examples {
40 
60 
61 public:
73  static ClassExample factoryMethod(const std::int64_t source_id, const double ra);
74 
75  /*
76  * Getter to access the static private string
77  */
78  static const std::string& getStaticString() {
79  return s_static_string;
80  }
81 
85  virtual ~ClassExample() = default;
86 
112  double fundamentalTypeMethod(const double input_variable) const;
113 
130  double divideNumbers(const double first, const double second) const;
131 
146  void passingUniquePointer(std::unique_ptr<std::vector<double>> vector_unique_ptr) const;
147 
161  void passingObjectInGeneral(const std::vector<double>& input_object) const;
162 
167  return m_source_id;
168  }
169 
174  double getRa() const {
175  return m_ra;
176  }
177 
178 private:
191  ClassExample(const std::int64_t source_id, const double ra) : m_source_id(source_id), m_ra(ra) {}
192 
195 
197  std::int64_t m_source_id{0};
198 
200  double m_ra{0.0};
201 };
202 
203 } // namespace Examples
204 } // namespace Elements
205 
206 #endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
207 
Export.h
defines the macros to be used for explicit export of the symbols
std::string
STL class.
Elements::Examples::ClassExample::getRa
double getRa() const
Definition: ClassExample.h:174
Elements::Examples::ClassExample::getSourceId
std::int64_t getSourceId() const
Definition: ClassExample.h:166
std::vector
STL class.
Elements::Examples::ClassExample::s_static_string
static const std::string s_static_string
An example of a static string.
Definition: ClassExample.h:194
Elements::Examples::ClassExample::ClassExample
ClassExample(const std::int64_t source_id, const double ra)
Constructor.
Definition: ClassExample.h:191
Elements::Kernel::Units::second
constexpr double second
Definition: SystemOfUnits.h:107
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
std::int64_t
Elements::Examples::ClassExample::getStaticString
static const std::string & getStaticString()
Definition: ClassExample.h:78
std::unique_ptr
STL class.
Elements::Examples::ClassExample
An class example.
Definition: ClassExample.h:59
Elements
Definition: callBackExample.h:35