UserCmdManagerPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_USER_CMD_MANAGER_PRIVATE_HH_
18 #define _GAZEBO_USER_CMD_MANAGER_PRIVATE_HH_
19 
20 #include <string>
21 #include <vector>
22 #include <sdf/sdf.hh>
23 
24 #include "gazebo/transport/Node.hh"
27 
28 namespace gazebo
29 {
30  namespace physics
31  {
32  class WorldState;
33 
37  {
39  public: WorldPtr world;
40 
43 
47 
49  public: unsigned int id;
50 
52  public: std::string description;
53 
55  public: msgs::UserCmd::Type type;
56  };
57 
58  class UserCmd;
59 
63  {
65  public: WorldPtr world;
66 
68  public: unsigned int idCounter;
69 
72 
75 
78 
81 
84 
87 
90 
92  public: std::vector<UserCmdPtr> undoCmds;
93 
95  public: std::vector<UserCmdPtr> redoCmds;
96  };
97  }
98 }
99 #endif
100 
transport::PublisherPtr worldControlPub
Publisher of world control messages.
Definition: UserCmdManagerPrivate.hh:89
WorldPtr world
Pointer to the world.
Definition: UserCmdManagerPrivate.hh:39
unsigned int idCounter
Counter to generate unique ids for commands in a sequence.
Definition: UserCmdManagerPrivate.hh:68
transport::PublisherPtr lightModifyPub
Publisher of light modify messages.
Definition: UserCmdManagerPrivate.hh:86
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
WorldState endState
Whole world state for the most recent time the user has triggered undo for this command.
Definition: UserCmdManagerPrivate.hh:46
transport::SubscriberPtr userCmdSub
Subscriber to user command messages.
Definition: UserCmdManagerPrivate.hh:74
std::vector< UserCmdPtr > redoCmds
List of commands which can be redone.
Definition: UserCmdManagerPrivate.hh:95
transport::PublisherPtr userCmdStatsPub
Publisher of undo redo statistics messages.
Definition: UserCmdManagerPrivate.hh:80
default namespace for gazebo
transport::PublisherPtr modelModifyPub
Publisher of model modify messages.
Definition: UserCmdManagerPrivate.hh:83
Definition: UserCmdManagerPrivate.hh:62
unsigned int id
Unique ID identifying this command in the server.
Definition: UserCmdManagerPrivate.hh:49
transport::SubscriberPtr undoRedoSub
Subscriber to undo redo messages.
Definition: UserCmdManagerPrivate.hh:77
Class which represents a user command, which can be "undone" and "redone".
Definition: UserCmdManager.hh:35
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:84
WorldPtr world
Pointer to the world.
Definition: UserCmdManagerPrivate.hh:65
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
std::string description
Description for the command.
Definition: UserCmdManagerPrivate.hh:52
Definition: UserCmdManagerPrivate.hh:36
transport::NodePtr node
Transportation node.
Definition: UserCmdManagerPrivate.hh:71
msgs::UserCmd::Type type
Type of command, such as MOVING or DELETING.
Definition: UserCmdManagerPrivate.hh:55
std::vector< UserCmdPtr > undoCmds
List of commands which can be undone.
Definition: UserCmdManagerPrivate.hh:92
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Store state information of a physics::World object.
Definition: WorldState.hh:47
WorldState startState
Whole world state the moment the user command was executed.
Definition: UserCmdManagerPrivate.hh:42