Elements
6.2
A C++ base framework for the Euclid Software.
ElementsExamples
ElementsExamples
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
49
class
ELEMENTS_API
ClassExample2
{
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
156
std::int64_t
getSourceId
()
const
{
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
184
static
std::string
s_static_string
;
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
Export.h
defines the macros to be used for explicit export of the symbols
std::string
STL class.
Elements::Examples::ClassExample2::s_static_string
static std::string s_static_string
An example of a static string.
Definition:
ClassExample2.h:184
std::vector
STL class.
Elements::Kernel::Units::second
constexpr double second
Definition:
SystemOfUnits.h:107
Elements::Examples::ClassExample2::getRa
double getRa() const
Definition:
ClassExample2.h:164
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition:
Export.h:74
Elements::Examples::ClassExample2::ClassExample2
ClassExample2(const std::int64_t source_id, const double ra)
Constructor.
Definition:
ClassExample2.h:181
std::int64_t
Elements::Examples::ClassExample2
Definition:
ClassExample2.h:49
Elements::Examples::ClassExample2::getSourceId
std::int64_t getSourceId() const
Definition:
ClassExample2.h:156
std::unique_ptr
STL class.
Elements::Examples::ClassExample2::getStaticString
static const std::string & getStaticString()
Definition:
ClassExample2.h:68
Elements
Definition:
callBackExample.h:35
Generated by
1.8.17