1 /**************************************************************************\
2 * Copyright (c) Kongsberg Oil & Gas Technologies AS
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * Neither the name of the copyright holder nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 \**************************************************************************/
32
33 #include <Inventor/navigation/SoScXMLMotionTarget.h>
34 #include "coindefs.h"
35
36 /*!
37 \class SoScXMLMotionTarget SoScXMLMotionTarget.h Inventor/navigation/SoScXMLMotionTarget.h
38 \brief to be used in parallel with other non-moving targets when parallel states are implemented.
39
40 \ingroup navigation
41 */
42
43 #include <cassert>
44
45 #include <Inventor/navigation/SoScXMLNavigation.h>
46
47
48 SCXML_OBJECT_SOURCE(SoScXMLMotionTarget);
49
50 void
initClass(void)51 SoScXMLMotionTarget::initClass(void)
52 {
53 SCXML_OBJECT_INIT_CLASS(SoScXMLMotionTarget, SoScXMLNavigationTarget, "SoScXMLNavigationTarget");
54 }
55
56 void
cleanClass(void)57 SoScXMLMotionTarget::cleanClass(void)
58 {
59 SoScXMLMotionTarget::classTypeId = SoType::badType();
60 }
61
62 SoScXMLMotionTarget * SoScXMLMotionTarget::theSingleton = NULL;
63
64 SoScXMLMotionTarget *
constructSingleton(void)65 SoScXMLMotionTarget::constructSingleton(void)
66 {
67 assert(SoScXMLMotionTarget::theSingleton == NULL);
68 SoScXMLMotionTarget::theSingleton =
69 static_cast<SoScXMLMotionTarget *>(SoScXMLMotionTarget::classTypeId.createInstance());
70 return SoScXMLMotionTarget::theSingleton;
71 }
72
73 void
destructSingleton(void)74 SoScXMLMotionTarget::destructSingleton(void)
75 {
76 assert(SoScXMLMotionTarget::theSingleton != NULL);
77 delete SoScXMLMotionTarget::theSingleton;
78 SoScXMLMotionTarget::theSingleton = NULL;
79 }
80
81 SoScXMLMotionTarget *
singleton(void)82 SoScXMLMotionTarget::singleton(void)
83 {
84 assert(SoScXMLMotionTarget::theSingleton != NULL);
85 return SoScXMLMotionTarget::theSingleton;
86 }
87
SoScXMLMotionTarget(void)88 SoScXMLMotionTarget::SoScXMLMotionTarget(void)
89 {
90 this->setEventTargetType(SOSCXML_NAVIGATION_TARGETTYPE);
91 this->setEventTargetName("Motion");
92 }
93
~SoScXMLMotionTarget(void)94 SoScXMLMotionTarget::~SoScXMLMotionTarget(void)
95 {
96 }
97
98 SbBool
processOneEvent(const ScXMLEvent * COIN_UNUSED_ARG (event))99 SoScXMLMotionTarget::processOneEvent(const ScXMLEvent * COIN_UNUSED_ARG(event))
100 {
101 return FALSE;
102 }
103