Elements  5.10
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 <string> // for std::string
31 #include <vector> // for std::vector
32 #include <memory> // for std::unique_ptr
33 
34 #include <cstdint> // for std::int64_t
35 
36 #include "ElementsKernel/Export.h"
37 
38 namespace Elements {
39 namespace Examples {
40 
50 
51 public:
52 
64  static ClassExample factoryMethod(const std::int64_t source_id, const double ra);
65 
66  /*
67  * Getter to access the static private string
68  */
69  static const std::string& getStaticString() {
70  return s_static_string;
71  }
72 
76  virtual ~ClassExample() = default;
77 
103  double fundamentalTypeMethod(const double input_variable) const;
104 
121  double divideNumbers(const double first, const double second) const;
122 
137  void passingUniquePointer(std::unique_ptr<std::vector<double>> vector_unique_ptr) const;
138 
152  void passingObjectInGeneral(const std::vector<double>& input_object) const;
153 
158  return m_source_id;
159  }
160 
165  double getRa() const {
166  return m_ra;
167  }
168 
169 private:
170 
183  ClassExample(const std::int64_t source_id, const double ra) :
184  m_source_id(source_id), m_ra(ra) {
185  }
186 
189 
191  std::int64_t m_source_id { 0 };
192 
194  double m_ra { 0.0 };
195 
196 };
197 
198 } // namespace Examples
199 } // namespace Elements
200 
201 #endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
202 
constexpr double second
std::int64_t getSourceId() const
Definition: ClassExample.h:157
STL class.
defines the macros to be used for explicit export of the symbols
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
STL class.
static const std::string & getStaticString()
Definition: ClassExample.h:69
STL class.
ClassExample(const std::int64_t source_id, const double ra)
Constructor.
Definition: ClassExample.h:183
static std::string s_static_string
An example of a static string.
Definition: ClassExample.h:188