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 {
36 
38 {
39 public:
40  MockContext();
41 
42  virtual Ogre::SceneManager* getSceneManager() const { return 0; }
43  virtual WindowManagerInterface* getWindowManager() const { return 0; }
44  virtual SelectionManager* getSelectionManager() const { return 0; }
45  virtual FrameManager* getFrameManager() const { return 0; }
46  virtual tf::TransformListener* getTFClient() const { return 0; }
47  virtual QString getFixedFrame() const { return ""; }
48  virtual uint64_t getFrameCount() const { return 0; }
49  virtual DisplayFactory* getDisplayFactory() const { return display_factory_; }
52  virtual void handleChar( QKeyEvent* event, RenderPanel* panel ) {}
53  virtual void handleMouseEvent( const ViewportMouseEvent& event ) {}
54  virtual ToolManager* getToolManager() const { return 0; }
55  virtual ViewManager* getViewManager() const { return 0; }
56  virtual DisplayGroup* getRootDisplayGroup() const { return 0; }
57  virtual uint32_t getDefaultVisibilityBit() const { return 0; }
58  virtual BitAllocator* visibilityBits() { return 0; }
59  virtual void setStatus( const QString & message ) {}
60 
61  virtual void queueRender() {}
62 
63 private:
65 };
66 
67 } // end namespace rviz
68 
69 #endif // MOCK_CONTEXT_H
virtual ToolManager * getToolManager() const
Return the ToolManager.
Definition: mock_context.h:54
virtual uint32_t getDefaultVisibilityBit() const
Definition: mock_context.h:57
virtual DisplayFactory * getDisplayFactory() const
Return a factory for creating Display subclasses based on a class id string.
Definition: mock_context.h:49
virtual ViewManager * getViewManager() const
Return the ViewManager.
Definition: mock_context.h:55
DisplayFactory * display_factory_
Definition: mock_context.h:64
virtual QString getFixedFrame() const
Return the fixed frame name.
Definition: mock_context.h:47
virtual tf::TransformListener * getTFClient() const
Convenience function: returns getFrameManager()->getTFClient().
Definition: mock_context.h:46
virtual FrameManager * getFrameManager() const
Return the FrameManager instance.
Definition: mock_context.h:45
virtual Ogre::SceneManager * getSceneManager() const
Returns the Ogre::SceneManager used for the main RenderPanel.
Definition: mock_context.h:42
virtual SelectionManager * getSelectionManager() const
Return a pointer to the SelectionManager.
Definition: mock_context.h:44
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:63
A Display object which stores other Displays as children.
Definition: display_group.h:47
virtual uint64_t getFrameCount() const
Return the current value of the frame count.
Definition: mock_context.h:48
virtual WindowManagerInterface * getWindowManager() const
Return the window manager, if any.
Definition: mock_context.h:43
virtual DisplayGroup * getRootDisplayGroup() const
Definition: mock_context.h:56
virtual ros::CallbackQueueInterface * getUpdateQueue()
Return the CallbackQueue using the main GUI thread.
Definition: mock_context.h:50
Allocation manager for bit positions within a 32-bit word.
Definition: bit_allocator.h:38
virtual void handleChar(QKeyEvent *event, RenderPanel *panel)
Handle a single key event for a given RenderPanel.
Definition: mock_context.h:52
virtual BitAllocator * visibilityBits()
Definition: mock_context.h:58
virtual void setStatus(const QString &message)
Definition: mock_context.h:59
virtual void queueRender()
Queues a render. Multiple calls before a render happens will only cause a single render.
Definition: mock_context.h:61
virtual void handleMouseEvent(const ViewportMouseEvent &event)
Handle a mouse event.
Definition: mock_context.h:53
virtual ros::CallbackQueueInterface * getThreadedQueue()
Return a CallbackQueue using a different thread than the main GUI one.
Definition: mock_context.h:51


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:51