UserCmd Class Reference

Class which represents a user command, which can be "undone" and "redone". More...

#include <UserCmdManager.hh>

Public Member Functions

 UserCmd (const unsigned int _id, physics::WorldPtr _world, const std::string &_description, const msgs::UserCmd::Type &_type)
 Constructor. More...
 
virtual ~UserCmd ()
 Destructor. More...
 
std::string Description () const
 Return this command's description. More...
 
unsigned int Id () const
 Return this command's unique ID. More...
 
virtual void Redo ()
 Redo this command. More...
 
msgs::UserCmd::Type Type () const
 Return this command's type. More...
 
virtual void Undo ()
 Undo this command. More...
 

Protected Attributes

UserCmdPrivate * dataPtr
 

Detailed Description

Class which represents a user command, which can be "undone" and "redone".

Constructor & Destructor Documentation

UserCmd ( const unsigned int  _id,
physics::WorldPtr  _world,
const std::string &  _description,
const msgs::UserCmd::Type &  _type 
)

Constructor.

Parameters
[in]_idUnique ID for this command
[in]_worldPointer to the world
[in]_descriptionDescription for the command, such as "Rotate box", "Delete sphere", etc.
[in]_typeType of command, such as MOVING, DELETING, etc.
virtual ~UserCmd ( )
virtual

Destructor.

Member Function Documentation

std::string Description ( ) const

Return this command's description.

Returns
Description
unsigned int Id ( ) const

Return this command's unique ID.

Returns
Unique ID
virtual void Redo ( )
virtual

Redo this command.

msgs::UserCmd::Type Type ( ) const

Return this command's type.

Returns
Command type
virtual void Undo ( )
virtual

Undo this command.

Member Data Documentation

UserCmdPrivate* dataPtr
protected

The documentation for this class was generated from the following file: