-
Notifications
You must be signed in to change notification settings - Fork 112
/
MMDevice.cpp
51 lines (46 loc) · 2.42 KB
/
MMDevice.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// AUTHOR: Mark Tsuchida, May 2014
//
// COPYRIGHT: University of California, San Francisco, 2014
//
// LICENSE: This file is distributed under the BSD license.
// License text is included with the source distribution.
//
// This file is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES.
#include "MMDevice.h"
namespace MM {
// Definitions for static const data members.
//
// Note: Do not try to move these initializers to the header. The C++ standard
// allows initializing a static const enum data member inline (inside the class
// definition, where the member is _declared_), but still requires a
// _definition_ (in which case, the definition should not have an initializer).
// However, Microsoft VC++ has a nonstandard extension that allows you to leave
// out the definition altogether, if an initializer is supplied at the
// declaration. Because of that nonstandard behavior, VC++ issues a warning
// (LNK4006) if the initializer is supplied with the declaration _and_ a
// definition is (correctly) provided. So, to compile correctly with a
// standards-conformant compiler _and_ avoid warnings from VC++, we need to
// leave the initializers out of the declarations, and supply them here with
// the definitions. See:
// http://connect.microsoft.com/VisualStudio/feedback/details/802091/lnk4006-reported-for-static-const-members-that-is-initialized-in-the-class-definition
const DeviceType Generic::Type = GenericDevice;
const DeviceType Camera::Type = CameraDevice;
const DeviceType Shutter::Type = ShutterDevice;
const DeviceType Stage::Type = StageDevice;
const DeviceType XYStage::Type = XYStageDevice;
const DeviceType State::Type = StateDevice;
const DeviceType Serial::Type = SerialDevice;
const DeviceType AutoFocus::Type = AutoFocusDevice;
const DeviceType ImageProcessor::Type = ImageProcessorDevice;
const DeviceType SignalIO::Type = SignalIODevice;
const DeviceType Magnifier::Type = MagnifierDevice;
const DeviceType SLM::Type = SLMDevice;
const DeviceType Galvo::Type = GalvoDevice;
const DeviceType Hub::Type = HubDevice;
} // namespace MM