Elements  6.0.1
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ClassExample2.h
Go to the documentation of this file.
1 
27 #ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE2_H_
28 #define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE2_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 
50 
51 public:
63  static ClassExample2 factoryMethod(const std::int64_t source_id, const double ra);
64 
65  /*
66  * Getter to access the static private string
67  */
68  static const std::string& getStaticString() {
69  return s_static_string;
70  }
71 
75  virtual ~ClassExample2() = default;
76 
102  double fundamentalTypeMethod(const double input_variable) const;
103 
120  double divideNumbers(const double first, const double second) const;
121 
136  void passingUniquePointer(std::unique_ptr<std::vector<double>> vector_unique_ptr) const;
137 
151  void passingObjectInGeneral(const std::vector<double>& input_object) const;
152 
157  return m_source_id;
158  }
159 
164  double getRa() const {
165  return m_ra;
166  }
167 
168 private:
181  ClassExample2(const std::int64_t source_id, const double ra) : m_source_id(source_id), m_ra(ra) {}
182 
185 
187  std::int64_t m_source_id{0};
188 
190  double m_ra{0.0};
191 };
192 
193 } // namespace Examples
194 } // namespace Elements
195 
196 #endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE2_H_
197 
ClassExample2(const std::int64_t source_id, const double ra)
Constructor.
STL class.
static const std::string & getStaticString()
Definition: ClassExample2.h:68
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
static std::string s_static_string
An example of a static string.
STL class.
STL class.
std::int64_t getSourceId() const
constexpr double second