Cafu Engine
CommandNewGroupT Class Reference

This class implements a command for adding a new group to the map document. More...

#include "Group_New.hpp"

Inheritance diagram for CommandNewGroupT:

Public Member Functions

 CommandNewGroupT (MapDocumentT &MapDoc, const wxString &Name)
 The constructor. More...
 
 ~CommandNewGroupT ()
 The destructor. More...
 
GroupTGetGroup ()
 Returns the new group. More...
 
bool Do ()
 This method executes the command. More...
 
void Undo ()
 This method un-does the command. More...
 
wxString GetName () const
 Returns the name (a description) of the command. More...
 
- Public Member Functions inherited from CommandT
 CommandT (bool ShowInHistory=true, bool SuggestsSave=true)
 The constructor. More...
 
virtual ~CommandT ()
 The virtual destructor. More...
 
bool ShowInHistory () const
 Whether the command should be shown in the undo/redo history. More...
 
bool SuggestsSave () const
 Whether the command suggests to save the document when its closed and hasn't been saved between the command execution and the closing (selection changes for example don't suggest to save the document since no important changes have been made). More...
 
bool IsDone () const
 Whether the command has been executed. More...
 
unsigned long GetID () const
 Returns the commands unique ID. More...
 

Additional Inherited Members

- Protected Attributes inherited from CommandT
bool m_Done
 Whether the command has been executed. More...
 
const bool m_ShowInHistory
 Whether the command should have an entry in the undo/redo history. More...
 
const bool m_SuggestsSave
 Whether the command suggests saving of the document on close. More...
 
const unsigned long m_ID
 The commands unique ID. More...
 

Detailed Description

This class implements a command for adding a new group to the map document.

The newly added group initially has no members: it's up to the caller to put map elements into the new group. Having no members means that the new group initially doesn't affect (the visibility of) any map elements, but also that it is possibly subject to auto-pruning if no members are added to it soon. The counterpart to this class is CommandDeleteGroupT.

Constructor & Destructor Documentation

CommandNewGroupT::CommandNewGroupT ( MapDocumentT MapDoc,
const wxString &  Name 
)

The constructor.

Parameters
MapDocThe map document to add the new group to.
NameThe name for the new group.
CommandNewGroupT::~CommandNewGroupT ( )

The destructor.

Member Function Documentation

bool CommandNewGroupT::Do ( )
virtual

This method executes the command.

Returns
true if the command succeeded, false if it failed.

Implements CommandT.

GroupT* CommandNewGroupT::GetGroup ( )
inline

Returns the new group.

wxString CommandNewGroupT::GetName ( ) const
virtual

Returns the name (a description) of the command.

Implements CommandT.

void CommandNewGroupT::Undo ( )
virtual

This method un-does the command.

Implements CommandT.


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