CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Libs
Core
ctkPimpl.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Library: CTK
4
5
Copyright (c) Kitware Inc.
6
7
Licensed under the Apache License, Version 2.0 (the "License");
8
you may not use this file except in compliance with the License.
9
You may obtain a copy of the License at
10
11
http://www.apache.org/licenses/LICENSE-2.0.txt
12
13
Unless required by applicable law or agreed to in writing, software
14
distributed under the License is distributed on an "AS IS" BASIS,
15
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
See the License for the specific language governing permissions and
17
limitations under the License.
18
19
=========================================================================*/
20
130
#ifndef __ctkPimpl_h
131
#define __ctkPimpl_h
132
133
// Qt includes
134
#include <QtGlobal>
135
147
#define CTK_CONSTRUCTOR_NO_ARG_CPP(PUB) \
148
PUB::PUB(): d_ptr(new PUB##Private) \
149
{ \
150
}
151
158
#define CTK_CONSTRUCTOR_1_ARG_CPP(PUB, _ARG1) \
159
PUB::PUB(_ARG1 _parent) \
160
: Superclass( _parent ) \
161
, d_ptr(new PUB##Private) \
162
{ \
163
}
164
173
#define CTK_SET_CPP(PUB, _TYPE, _NAME, _VARNAME) \
174
void PUB::_NAME(_TYPE var) \
175
{ \
176
Q_D(PUB); \
177
d->_VARNAME = var; \
178
}
179
188
#define CTK_GET_CPP(PUB, _TYPE, _NAME, _VARNAME) \
189
_TYPE PUB::_NAME()const \
190
{ \
191
Q_D(const PUB); \
192
return d->_VARNAME; \
193
}
194
197
#endif
Generated on Mon Aug 9 2021 00:00:00 for CTK by
1.9.1