GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | List of all members
GLC_SelectionSet Class Reference

GLC_SelectionSet : GLC_StructOccurence and primitive selection set. More...

#include <glc_selectionset.h>

Public Member Functions

Constructor / Destructor
 GLC_SelectionSet (GLC_WorldHandle *pWorld)
 Construct the selection set associated to the given GLC_WorldHandle.
 
virtual ~GLC_SelectionSet ()
 
Get Functions
bool isEmpty () const
 Return true if this selection set is empty.
 
int size () const
 Return the number of occurence in this selection set.
 
int count () const
 Return the number of occurence in this selection set.
 
QList< GLC_StructOccurence * > occurencesList () const
 Return the list of selected occurences.
 
bool contains (const GLC_StructOccurence *pOccurence) const
 Return true if this selection set contains the given occurence.
 
bool contains (GLC_uint occurenceId) const
 Return true if this selection set contains the given occurence id.
 
Set Functions
bool insert (GLC_StructOccurence *pOccurence)
 Insert the given Occurence into the selection set and return true on success.
 
bool insert (GLC_uint occurenceId)
 Insert the given Occurence id into the selection set and return true on success.
 
bool remove (GLC_StructOccurence *pOccurence)
 Remove the given occurence from the selection set and return true on success.
 
bool remove (GLC_uint occurenceId)
 Remove the given occurence from the selection set and return true on success.
 
void clear ()
 Clear this selection set.
 

Private Attributes

GLC_WorldHandlem_pWorldHandle
 The worldHandle attached to this selection set.
 
QHash< GLC_uint,
GLC_StructOccurence * > 
m_OccurenceHash
 Hash table of selected occurence.
 

Detailed Description

GLC_SelectionSet : GLC_StructOccurence and primitive selection set.

Definition at line 42 of file glc_selectionset.h.

Constructor & Destructor Documentation

GLC_SelectionSet::GLC_SelectionSet ( GLC_WorldHandle pWorld)

Construct the selection set associated to the given GLC_WorldHandle.

Definition at line 27 of file glc_selectionset.cpp.

References GLC_WorldHandle::collection(), m_pWorldHandle, and GLC_3DViewCollection::selectionSize().

GLC_SelectionSet::~GLC_SelectionSet ( )
virtual

Definition at line 35 of file glc_selectionset.cpp.

Member Function Documentation

void GLC_SelectionSet::clear ( void  )

Clear this selection set.

Definition at line 97 of file glc_selectionset.cpp.

References m_OccurenceHash.

Referenced by GLC_WorldHandle::selectAllWith3DViewInstance(), and GLC_WorldHandle::unselectAll().

bool GLC_SelectionSet::contains ( const GLC_StructOccurence pOccurence) const
inline

Return true if this selection set contains the given occurence.

Definition at line 76 of file glc_selectionset.h.

References contains(), and GLC_StructOccurence::id().

Referenced by contains(), and GLC_StructOccurence::create3DViewInstance().

bool GLC_SelectionSet::contains ( GLC_uint  occurenceId) const
inline

Return true if this selection set contains the given occurence id.

Definition at line 80 of file glc_selectionset.h.

int GLC_SelectionSet::count ( ) const

Return the number of occurence in this selection set.

Definition at line 50 of file glc_selectionset.cpp.

References m_OccurenceHash.

bool GLC_SelectionSet::insert ( GLC_StructOccurence pOccurence)

Insert the given Occurence into the selection set and return true on success.

The given occurence must belongs to this selection set's world

Definition at line 64 of file glc_selectionset.cpp.

References GLC_StructOccurence::id().

Referenced by GLC_WorldHandle::select(), and GLC_WorldHandle::selectAllWith3DViewInstance().

bool GLC_SelectionSet::insert ( GLC_uint  occurenceId)

Insert the given Occurence id into the selection set and return true on success.

The given occurence id must belongs to this selection set's world

Definition at line 69 of file glc_selectionset.cpp.

References GLC_WorldHandle::containsOccurence(), GLC_WorldHandle::getOccurence(), m_OccurenceHash, and m_pWorldHandle.

bool GLC_SelectionSet::isEmpty ( void  ) const

Return true if this selection set is empty.

Definition at line 44 of file glc_selectionset.cpp.

References m_OccurenceHash.

QList< GLC_StructOccurence * > GLC_SelectionSet::occurencesList ( ) const

Return the list of selected occurences.

Definition at line 55 of file glc_selectionset.cpp.

References m_OccurenceHash.

Referenced by GLC_World::minimumSelectedOccurenceList().

bool GLC_SelectionSet::remove ( GLC_StructOccurence pOccurence)

Remove the given occurence from the selection set and return true on success.

The given occurence must belongs to this selection set's world

Definition at line 81 of file glc_selectionset.cpp.

References GLC_StructOccurence::id().

Referenced by GLC_WorldHandle::removeOccurence(), and GLC_WorldHandle::unselect().

bool GLC_SelectionSet::remove ( GLC_uint  occurenceId)

Remove the given occurence from the selection set and return true on success.

The given occurence id must belongs to this selection set's world

Definition at line 86 of file glc_selectionset.cpp.

References GLC_WorldHandle::containsOccurence(), m_OccurenceHash, and m_pWorldHandle.

int GLC_SelectionSet::size ( void  ) const
inline

Return the number of occurence in this selection set.

Definition at line 66 of file glc_selectionset.h.

Member Data Documentation

QHash<GLC_uint, GLC_StructOccurence*> GLC_SelectionSet::m_OccurenceHash
private

Hash table of selected occurence.

Definition at line 118 of file glc_selectionset.h.

Referenced by clear(), count(), insert(), isEmpty(), occurencesList(), and remove().

GLC_WorldHandle* GLC_SelectionSet::m_pWorldHandle
private

The worldHandle attached to this selection set.

Definition at line 115 of file glc_selectionset.h.

Referenced by GLC_SelectionSet(), insert(), and remove().


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

©2005-2013 Laurent Ribon