Public Types | Public Member Functions | Protected Attributes

cyber::editor::commands::Command Class Reference

#include <Command.h>

Inheritance diagram for cyber::editor::commands::Command:
cyber::editor::commands::creation::CreateObjectDesc cyber::editor::commands::deletion::DeleteObjectDesc cyber::editor::commands::MacroCommand cyber::editor::commands::creation::CreateBodyObjectDesc cyber::editor::commands::creation::CreateConceptDesc cyber::editor::commands::creation::CreateLightDesc cyber::editor::commands::creation::CreatePolyBodyObjectDesc cyber::editor::commands::creation::CreateSphereBodyObjectDesc cyber::editor::commands::creation::CreateMaterialDesc cyber::editor::commands::creation::CreateAmbientLightDesc cyber::editor::commands::creation::CreateAttenuatedLightDesc cyber::editor::commands::creation::CreateFixedBlockDesc cyber::editor::commands::creation::CreatePointLightDesc cyber::editor::commands::creation::CreateSpotLightDesc

List of all members.

Public Types

enum  State {
  NONE = 0, EXECUTED = 1, UNDONE = 2, REDONE = 3,
  DISMISSED = 4
}

Public Member Functions

 Command (unsigned cmd_number, const cl7::string_type &cmd_name, world::WorldDesc *world_desc)
virtual ~Command (void)
const cl7::string_typeget_cmd_name () const
unsigned get_cmd_number () const
world::WorldDescget_world_desc () const
State get_state () const
bool is_in_effect () const
bool execute ()
bool undo ()
bool redo ()
bool dismiss ()

Protected Attributes

const unsigned _cmd_number
const cl7::string_type _cmd_name
world::WorldDesc *const _world_desc
State _state

Detailed Description

The base class for any editor command.


Member Enumeration Documentation

Enumerator:
NONE 
EXECUTED 
UNDONE 
REDONE 
DISMISSED 

Constructor & Destructor Documentation

cyber::editor::commands::Command::Command ( unsigned  cmd_number,
const cl7::string_type cmd_name,
world::WorldDesc world_desc 
)

Explicit constructor.

cyber::editor::commands::Command::~Command ( void   )  [virtual]

Destructor.


Member Function Documentation

bool cyber::editor::commands::Command::dismiss (  ) 

Dismisses this command.

bool cyber::editor::commands::Command::execute (  ) 

Executes this command.

const cl7::string_type& cyber::editor::commands::Command::get_cmd_name (  )  const [inline]

Returns the name of this command.

unsigned cyber::editor::commands::Command::get_cmd_number (  )  const [inline]

Returns the consecutive number of this command.

State cyber::editor::commands::Command::get_state (  )  const [inline]

Returns the flag specifying whether this command has been executed, undone, redone or dismissed.

world::WorldDesc* cyber::editor::commands::Command::get_world_desc (  )  const [inline]

Returns the world description any editing command is based on.

bool cyber::editor::commands::Command::is_in_effect (  )  const [inline]

Returns true, if this command has been executed or redone, false otherwise.

bool cyber::editor::commands::Command::redo (  ) 

"Redoes" this command.

bool cyber::editor::commands::Command::undo (  ) 

"Undoes" this command.


Member Data Documentation

The name of this command.

The consecutive number of this command.

The flag specifying whether this command has been executed, undone, redone or dismissed.

The world description any editing command is based on.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines