Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Alexandre Leroux
- Thu, 07 Sep 2017 09:33:14
Show More
0
core/include/Variable/Variable.h
core/include/Variable/Variable.h
+5
0
@@
-28,6
+28,11
public:
28
28
explicit Variable ( const QString & name , const SqpRange & dateTime ,
29
29
const QVariantHash & metadata = {});
30
30
31
/// Copy ctor
32
explicit Variable ( const Variable & other );
33
34
std :: shared_ptr < Variable > clone () const ;
35
31
36
QString name () const noexcept ;
32
37
void setName ( const QString & name ) noexcept ;
33
38
SqpRange range () const noexcept ;
0
core/src/Variable/Variable.cpp
core/src/Variable/Variable.cpp
+19
0
@@
-20,6
+20,15
struct Variable::VariablePrivate {
20
20
{
21
21
}
22
22
23
VariablePrivate ( const VariablePrivate & other )
24
: m_Name { other . m_Name },
25
m_Range { other . m_Range },
26
m_Metadata { other . m_Metadata },
27
m_DataSeries { other . m_DataSeries != nullptr ? other . m_DataSeries -> clone () : nullptr },
28
m_RealRange { other . m_RealRange }
29
{
30
}
31
23
32
void lockRead () { m_Lock . lockForRead (); }
24
33
void lockWrite () { m_Lock . lockForWrite (); }
25
34
void unlock () { m_Lock . unlock (); }
@@
-67,6
+76,16
Variable::Variable(const QString &name, const SqpRange &dateTime, const QVariant
67
76
{
68
77
}
69
78
79
Variable :: Variable ( const Variable & other )
80
: impl { spimpl :: make_unique_impl < VariablePrivate > ( * other . impl )}
81
{
82
}
83
84
std :: shared_ptr < Variable > Variable :: clone () const
85
{
86
return std :: make_shared < Variable > ( * this );
87
}
88
70
89
QString Variable :: name () const noexcept
71
90
{
72
91
impl -> lockRead ();
0
core/src/Variable/VariableController.cpp
core/src/Variable/VariableController.cpp
+4
0
@@
-191,6
+191,10
void VariableController::setTimeController(TimeController *timeController) noexc
191
191
std :: shared_ptr < Variable >
192
192
VariableController :: cloneVariable ( std :: shared_ptr < Variable > variable ) noexcept
193
193
{
194
// Clones variable
195
auto duplicate = variable -> clone ();
196
197
return duplicate ;
194
198
}
195
199
196
200
void VariableController :: deleteVariable ( std :: shared_ptr < Variable > variable ) noexcept
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages