Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
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
37
38namespace Elements {
39namespace Examples {
40
60
61public:
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
178private:
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
defines the macros to be used for explicit export of the symbols
static const std::string s_static_string
An example of a static string.
Definition: ClassExample.h:194
ClassExample(const std::int64_t source_id, const double ra)
Constructor.
Definition: ClassExample.h:191
virtual ~ClassExample()=default
Destructor.
static const std::string & getStaticString()
Definition: ClassExample.h:78
std::int64_t getSourceId() const
Definition: ClassExample.h:166
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74