Elements
5.10
A C++ base framework for the Euclid Software.
ElementsExamples
ElementsExamples
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
49
class
ELEMENTS_API
ClassExample
{
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
157
std::int64_t
getSourceId
()
const
{
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
188
static
std::string
s_static_string
;
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
Elements::Examples::ClassExample::~ClassExample
virtual ~ClassExample()=default
Destructor.
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:165
Elements::Examples::ClassExample::getSourceId
std::int64_t getSourceId() const
Definition:
ClassExample.h:157
std::vector
STL class.
Elements::Examples::ClassExample::ClassExample
ClassExample(const std::int64_t source_id, const double ra)
Constructor.
Definition:
ClassExample.h:183
Elements::Units::second
constexpr double second
Definition:
SystemOfUnits.h:107
Elements::Examples::ClassExample::s_static_string
static std::string s_static_string
An example of a static string.
Definition:
ClassExample.h:188
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:69
std::unique_ptr
STL class.
Elements::Examples::ClassExample
An class example.
Definition:
ClassExample.h:49
Elements
Definition:
ClassExample.h:38
Generated by
1.8.18