Cafu Engine
GroupT Class Reference

This class represents groups. More...

#include "Group.hpp"

Public Member Functions

 GroupT (const MapDocumentT &MapDoc, const wxString &Name_)
 The constructor. More...
 
 GroupT (const MapDocumentT &MapDoc, TextParserT &TP)
 The constructor for loading a group from a cmap file. More...
 
void Save_cmap (std::ostream &OutFile, unsigned long GroupNr) const
 
ArrayT< MapElementT * > GetMembers () const
 Returns all map elements in this group. More...
 
bool HasMembers () const
 Returns whether this group has members (like GetMembers().Size() > 0, but more efficiently). More...
 

Public Attributes

wxString Name
 
wxColour Color
 
bool IsVisible
 Are the members of this group visible in the (2D and 3D) views? More...
 
bool CanSelect
 Can the members of this group be selected in the (2D and 3D) views? When false, the members are considered "locked" in order to prevent their editing. More...
 
bool SelectAsGroup
 Are the members of this group selected "as a group" (normal group behaviour) or can they be selected individually? More...
 

Detailed Description

This class represents groups.

Constructor & Destructor Documentation

GroupT::GroupT ( const MapDocumentT MapDoc,
const wxString &  Name_ 
)

The constructor.

Groups can become abandoned and thus empty whenever.

  • map elements are regrouped/reassigned into another group
  • map elements are deleted, either explicitly (delete selection) or implicitly (CommandDeleteT occurs as a subcommand). Implicit deletes occur with these commands:
    • Carve (delete brushes that are completely carved away).
    • Clip (delete brushes that are completely clipped away).
    • AssignPrimToEntity (parent entity becomes empty).

Therefore, we implement the purging of groups as an explicit command following the Delete, Carve, Clip and MakeHollow commands whereever they are instantiated and submitted. We use explicit commands for deleting the groups (instead of putting everything into a macro command) so that the user has the option to undo the purge (separately from the deletion) if he wishes.

GroupT::GroupT ( const MapDocumentT MapDoc,
TextParserT TP 
)

The constructor for loading a group from a cmap file.

Member Function Documentation

ArrayT< MapElementT * > GroupT::GetMembers ( ) const

Returns all map elements in this group.

bool GroupT::HasMembers ( ) const

Returns whether this group has members (like GetMembers().Size() > 0, but more efficiently).

Member Data Documentation

bool GroupT::CanSelect

Can the members of this group be selected in the (2D and 3D) views? When false, the members are considered "locked" in order to prevent their editing.

bool GroupT::IsVisible

Are the members of this group visible in the (2D and 3D) views?

bool GroupT::SelectAsGroup

Are the members of this group selected "as a group" (normal group behaviour) or can they be selected individually?


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