mock_context.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
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 met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 #ifndef MOCK_CONTEXT_H
30 #define MOCK_CONTEXT_H
31 
32 #include <rviz/display_context.h>
33 
34 namespace rviz
35 {
37 {
38 public:
39  MockContext();
40 
41  virtual Ogre::SceneManager* getSceneManager() const
42  {
43  return 0;
44  }
46  {
47  return 0;
48  }
50  {
51  return 0;
52  }
53  virtual FrameManager* getFrameManager() const
54  {
55  return 0;
56  }
57  virtual QString getFixedFrame() const
58  {
59  return "";
60  }
61  virtual uint64_t getFrameCount() const
62  {
63  return 0;
64  }
66  {
67  return display_factory_;
68  }
70  {
71  return 0;
72  }
74  {
75  return 0;
76  }
77  virtual void handleChar(QKeyEvent* event, RenderPanel* panel)
78  {
79  }
80  virtual void handleMouseEvent(const ViewportMouseEvent& event)
81  {
82  }
83  virtual ToolManager* getToolManager() const
84  {
85  return 0;
86  }
87  virtual ViewManager* getViewManager() const
88  {
89  return 0;
90  }
92  {
93  return 0;
94  }
95  virtual uint32_t getDefaultVisibilityBit() const
96  {
97  return 0;
98  }
100  {
101  return 0;
102  }
103  virtual void setStatus(const QString& message)
104  {
105  }
106 
107  virtual void queueRender()
108  {
109  }
110 
111 private:
113 };
114 
115 } // end namespace rviz
116 
117 #endif // MOCK_CONTEXT_H
rviz::FrameManager
Helper class for transforming data into Ogre's world frame (the fixed frame).
Definition: frame_manager.h:64
rviz::ToolManager
Definition: tool_manager.h:48
rviz::MockContext::getFrameCount
virtual uint64_t getFrameCount() const
Return the current value of the frame count.
Definition: mock_context.h:61
rviz::ViewportMouseEvent
Definition: viewport_mouse_event.h:45
rviz::MockContext::getToolManager
virtual ToolManager * getToolManager() const
Return the ToolManager.
Definition: mock_context.h:83
rviz::BitAllocator
Allocation manager for bit positions within a 32-bit word.
Definition: bit_allocator.h:37
rviz::MockContext::queueRender
virtual void queueRender()
Queues a render. Multiple calls before a render happens will only cause a single render.
Definition: mock_context.h:107
rviz::MockContext
Definition: mock_context.h:36
rviz::MockContext::getWindowManager
virtual WindowManagerInterface * getWindowManager() const
Return the window manager, if any.
Definition: mock_context.h:45
rviz::MockContext::visibilityBits
virtual BitAllocator * visibilityBits()
Definition: mock_context.h:99
rviz::MockContext::getDefaultVisibilityBit
virtual uint32_t getDefaultVisibilityBit() const
Definition: mock_context.h:95
rviz::MockContext::display_factory_
DisplayFactory * display_factory_
Definition: mock_context.h:112
rviz
Definition: add_display_dialog.cpp:54
rviz::MockContext::getDisplayFactory
virtual DisplayFactory * getDisplayFactory() const
Return a factory for creating Display subclasses based on a class id string.
Definition: mock_context.h:65
rviz::MockContext::setStatus
virtual void setStatus(const QString &message)
Definition: mock_context.h:103
rviz::MockContext::getSelectionManager
virtual SelectionManager * getSelectionManager() const
Return a pointer to the SelectionManager.
Definition: mock_context.h:49
rviz::DisplayContext
Pure-virtual base class for objects which give Display subclasses context in which to work.
Definition: display_context.h:81
rviz::MockContext::MockContext
MockContext()
Definition: mock_context.cpp:36
rviz::ViewManager
Definition: view_manager.h:53
rviz::MockContext::getViewManager
virtual ViewManager * getViewManager() const
Return the ViewManager.
Definition: mock_context.h:87
rviz::MockContext::getFixedFrame
virtual QString getFixedFrame() const
Return the fixed frame name.
Definition: mock_context.h:57
rviz::MockContext::handleChar
virtual void handleChar(QKeyEvent *event, RenderPanel *panel)
Handle a single key event for a given RenderPanel.
Definition: mock_context.h:77
rviz::DisplayFactory
Definition: display_factory.h:42
rviz::MockContext::getUpdateQueue
virtual ros::CallbackQueueInterface * getUpdateQueue()
Return the CallbackQueue using the main GUI thread.
Definition: mock_context.h:69
rviz::MockContext::getFrameManager
virtual FrameManager * getFrameManager() const
Return the FrameManager instance.
Definition: mock_context.h:53
rviz::MockContext::getThreadedQueue
virtual ros::CallbackQueueInterface * getThreadedQueue()
Return a CallbackQueue using a different thread than the main GUI one.
Definition: mock_context.h:73
rviz::SelectionManager
Definition: selection_manager.h:81
rviz::MockContext::getRootDisplayGroup
virtual DisplayGroup * getRootDisplayGroup() const
Definition: mock_context.h:91
display_context.h
rviz::WindowManagerInterface
Definition: window_manager_interface.h:40
rviz::RenderPanel
Definition: render_panel.h:74
rviz::MockContext::getSceneManager
virtual Ogre::SceneManager * getSceneManager() const
Returns the Ogre::SceneManager used for the main RenderPanel.
Definition: mock_context.h:41
rviz::MockContext::handleMouseEvent
virtual void handleMouseEvent(const ViewportMouseEvent &event)
Handle a mouse event.
Definition: mock_context.h:80
rviz::DisplayGroup
A Display object which stores other Displays as children.
Definition: display_group.h:47
ros::CallbackQueueInterface


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:09