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  }
58  {
59  return 0;
60  }
61  virtual QString getFixedFrame() const
62  {
63  return "";
64  }
65  virtual uint64_t getFrameCount() const
66  {
67  return 0;
68  }
70  {
71  return display_factory_;
72  }
74  {
75  return 0;
76  }
78  {
79  return 0;
80  }
81  virtual void handleChar(QKeyEvent* event, RenderPanel* panel)
82  {
83  }
84  virtual void handleMouseEvent(const ViewportMouseEvent& event)
85  {
86  }
87  virtual ToolManager* getToolManager() const
88  {
89  return 0;
90  }
91  virtual ViewManager* getViewManager() const
92  {
93  return 0;
94  }
96  {
97  return 0;
98  }
99  virtual uint32_t getDefaultVisibilityBit() const
100  {
101  return 0;
102  }
104  {
105  return 0;
106  }
107  virtual void setStatus(const QString& message)
108  {
109  }
110 
111  virtual void queueRender()
112  {
113  }
114 
115 private:
117 };
118 
119 } // end namespace rviz
120 
121 #endif // MOCK_CONTEXT_H
virtual SelectionManager * getSelectionManager() const
Return a pointer to the SelectionManager.
Definition: mock_context.h:49
virtual Ogre::SceneManager * getSceneManager() const
Returns the Ogre::SceneManager used for the main RenderPanel.
Definition: mock_context.h:41
virtual ViewManager * getViewManager() const
Return the ViewManager.
Definition: mock_context.h:91
virtual uint64_t getFrameCount() const
Return the current value of the frame count.
Definition: mock_context.h:65
DisplayFactory * display_factory_
Definition: mock_context.h:116
virtual ToolManager * getToolManager() const
Return the ToolManager.
Definition: mock_context.h:87
virtual DisplayGroup * getRootDisplayGroup() const
Definition: mock_context.h:95
Pure-virtual base class for objects which give Display subclasses context in which to work...
Helper class for transforming data into Ogre&#39;s world frame (the fixed frame).
Definition: frame_manager.h:70
A Display object which stores other Displays as children.
Definition: display_group.h:47
virtual QString getFixedFrame() const
Return the fixed frame name.
Definition: mock_context.h:61
virtual ros::CallbackQueueInterface * getUpdateQueue()
Return the CallbackQueue using the main GUI thread.
Definition: mock_context.h:73
Allocation manager for bit positions within a 32-bit word.
Definition: bit_allocator.h:37
virtual uint32_t getDefaultVisibilityBit() const
Definition: mock_context.h:99
virtual void handleChar(QKeyEvent *event, RenderPanel *panel)
Handle a single key event for a given RenderPanel.
Definition: mock_context.h:81
virtual BitAllocator * visibilityBits()
Definition: mock_context.h:103
virtual void setStatus(const QString &message)
Definition: mock_context.h:107
virtual WindowManagerInterface * getWindowManager() const
Return the window manager, if any.
Definition: mock_context.h:45
virtual void queueRender()
Queues a render. Multiple calls before a render happens will only cause a single render.
Definition: mock_context.h:111
virtual DisplayFactory * getDisplayFactory() const
Return a factory for creating Display subclasses based on a class id string.
Definition: mock_context.h:69
virtual void handleMouseEvent(const ViewportMouseEvent &event)
Handle a mouse event.
Definition: mock_context.h:84
virtual tf::TransformListener * getTFClient() const
Convenience function: returns getFrameManager()->getTFClient().
Definition: mock_context.h:57
virtual ros::CallbackQueueInterface * getThreadedQueue()
Return a CallbackQueue using a different thread than the main GUI one.
Definition: mock_context.h:77
virtual FrameManager * getFrameManager() const
Return the FrameManager instance.
Definition: mock_context.h:53


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Tue Aug 9 2022 02:06:08