VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
makVrf::DtSelectionGroupManager Class Reference

The DtSelectionGroupManager class is the interface to be used when creating selection group. More...

Inheritance diagram for makVrf::DtSelectionGroupManager:
Inheritance graph
[legend]

Public Types

typedef std::set< DtUUIDGroupItems
typedef std::map< std::string,
GroupItems
SelectionGroups

Public Member Functions

 DtSelectionGroupManager (makVrv::DtDe &de)
 CTOR.
virtual ~DtSelectionGroupManager ()
 DTOR.
virtual void createSelectionGroup (const std::string &, bool signal=true)
 Create a new selection group. If named selection group alread exists will do nothing.
virtual void createSelectionGroupFromCurrentSelection (const std::string &groupName, bool select=false)
 Creates a selection group from the current selection as found in the DtVrfSelectionHandler selected names.
virtual void clearSelectionGroup (const std::string &)
 Clears a selection group of all items.
virtual void removeSelectionGroup (const std::string &)
 Deletes the selection groupd.
virtual bool hasSelectionGroup (const std::string &) const
 Returns true if there is a named selection group.
virtual void renameSelectionGroup (const std::string &from, const std::string &to)
 Renames a selection group.
virtual void addItemToSelectionGroup (const std::string &, const DtUUID &, bool signal=true)
 Adds a new item to a selection group.
virtual bool atLeastOneItemNotInSelectionGroup (const std::string &, const GroupItems &names) const
 Returns true if at least one of the supplied items is not in the selection group.
virtual bool atLeastOneItemNotInSelectionGroup (const std::string &, const std::vector< DtUUID > &names) const
virtual bool anyItemsInSelectionGroup (const std::string &, const GroupItems &names) const
 Returns true if any of the items are in the specified group.
virtual bool anyItemsInSelectionGroup (const std::string &, const std::vector< DtUUID > &names) const
virtual void addItemsToSelectionGroup (const std::string &, const GroupItems &names, bool signal=true)
 Adds new items to a selection group.
virtual void addItemsToSelectionGroup (const std::string &, const std::vector< DtUUID > &names, bool signal=true)
virtual bool itemInAnySelectionGroup (const DtUUID &) const
 Returns true if the named item is in any selection group.
virtual void removeItemFromSelectionGroup (const std::string &, const DtUUID &)
 Removes an item vrom a selection group.
virtual void removeItemsFromSelectionGroup (const std::string &, const GroupItems &names)
 Removes items vrom a selection group.
virtual void removeItemsFromSelectionGroup (const std::string &, const std::vector< DtUUID > &names)
virtual const SelectionGroupsselectionGroups () const
 Returns the current list of selection groups.
virtual bool load (const std::string &)
 Loads and replaces the current selection group set.
virtual bool save (const std::string &)
 Saves out the current selection group set.
virtual void removeAll ()
 Removes all selection groups.
virtual GroupItems itemsInSelectionGroup (const std::string &) const
 Returns all the items in a particular selection group.
virtual bool itemIsInSelectionGroup (const std::string &group, const DtUUID &) const
 Returns true if the names item is in the supplied selection group.
virtual void selectItemsInSelectionGroup (const std::string &)
 Selects all the items in the specified selection group that are in the simulation.
virtual const std::string & selectedSelectionGroup () const
 Returns the currently selected selection group.
virtual void processCreateSelectionGroup (DtSimMessage *)
 Call back in response receiving creating selection group message.
virtual bool canRenameSelectionGroup (const std::string &) const
 Returns true if the selection group can be renamed.
virtual void allScenarioObjectsDiscovered ()
 When upgrading, called when all scenario objects are discovered.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtSelectionGroupManagerinstance (makVrv::DtDe &de)
static void registerInstance (makVrv::DtDe &de, DtSelectionGroupManager *)

Public Attributes

boost::signal< void(std::string)> signal_selectionGroupAdded
boost::signal< void(std::string,
std::string)> 
signal_selectionGroupRenamed
 Signal sent when a selection group is renamed.
boost::signal< void(std::string)> signal_selectionGroupRemoved
 Signal sent when a selection group is removed.
boost::signal< void(std::string)> signal_selectionGroupCleared
 Signal sent when a selection group is cleared of all its items.
boost::signal< void(std::string,
GroupItems)> 
signal_itemsAddedToSelectionGroup
 Signal sent when items are added to a selection group.
boost::signal< void(std::string,
GroupItems)> 
signal_itemsRemovedFromSelectionGroup
 Signal sent when items are removed from a selection group.
boost::signal< void(DtUUID)> signal_itemRemovedFromGroups
 Signal sent when the item is removed from all selection groups.
boost::signal< void()> signal_loading
 Signal sent before the selection group manager is loaded.
boost::signal< void()> signal_loaded
 Signal sent after the selection group manager is loaded.
boost::signal< void()> signal_selectionGroupsCleared
 Signal sent when the selection group manager is cleared.
boost::signal< void(std::string,
std::string)> 
signal_itemRenamed
 Signal emitted when an item is renamed in a selection group.
boost::signal< void(std::string)> signal_selectionGroupSelected
 Signal emitted when current selection group has changed.

Protected Member Functions

virtual void slot_stateRemoved (const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *)
 Called when an item is removed, remove from selection group(s) they are in.
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 When the class Archive corresponds to an output archive, the & operator is defined similar to <<.

Protected Attributes

makVrv::DtDemyDe
SelectionGroups mySelectionGroupsUUID
makVrv::DtSignalConnectionManager myConnectionManager
std::string mySelectedSelectionGroup
bool myWaitingForDiscovery

Friends

class boost::serialization::access

Detailed Description

The DtSelectionGroupManager class is the interface to be used when creating selection group.

Selection groups are collection of named objects that can be used to select a group of objects at a single time

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtSelectionGroupManager::DtSelectionGroupManager ( makVrv::DtDe de)

CTOR.

virtual makVrf::DtSelectionGroupManager::~DtSelectionGroupManager ( )
virtual

DTOR.

Member Function Documentation

static DtSelectionGroupManager& makVrf::DtSelectionGroupManager::instance ( makVrv::DtDe de)
static
static void makVrf::DtSelectionGroupManager::registerInstance ( makVrv::DtDe de,
DtSelectionGroupManager  
)
static
virtual void makVrf::DtSelectionGroupManager::createSelectionGroup ( const std::string &  ,
bool  signal = true 
)
virtual

Create a new selection group. If named selection group alread exists will do nothing.

virtual void makVrf::DtSelectionGroupManager::createSelectionGroupFromCurrentSelection ( const std::string &  groupName,
bool  select = false 
)
virtual

Creates a selection group from the current selection as found in the DtVrfSelectionHandler selected names.

If selection group already exists replaces current contents of selection group If last parameter is true also will select that group

virtual void makVrf::DtSelectionGroupManager::clearSelectionGroup ( const std::string &  )
virtual

Clears a selection group of all items.

virtual void makVrf::DtSelectionGroupManager::removeSelectionGroup ( const std::string &  )
virtual

Deletes the selection groupd.

virtual bool makVrf::DtSelectionGroupManager::hasSelectionGroup ( const std::string &  ) const
virtual

Returns true if there is a named selection group.

virtual void makVrf::DtSelectionGroupManager::renameSelectionGroup ( const std::string &  from,
const std::string &  to 
)
virtual

Renames a selection group.

If the selection group to rename to already exists selection group is not renamed

virtual void makVrf::DtSelectionGroupManager::addItemToSelectionGroup ( const std::string &  ,
const DtUUID ,
bool  signal = true 
)
virtual

Adds a new item to a selection group.

virtual bool makVrf::DtSelectionGroupManager::atLeastOneItemNotInSelectionGroup ( const std::string &  ,
const GroupItems names 
) const
virtual

Returns true if at least one of the supplied items is not in the selection group.

virtual bool makVrf::DtSelectionGroupManager::atLeastOneItemNotInSelectionGroup ( const std::string &  ,
const std::vector< DtUUID > &  names 
) const
virtual
virtual bool makVrf::DtSelectionGroupManager::anyItemsInSelectionGroup ( const std::string &  ,
const GroupItems names 
) const
virtual

Returns true if any of the items are in the specified group.

virtual bool makVrf::DtSelectionGroupManager::anyItemsInSelectionGroup ( const std::string &  ,
const std::vector< DtUUID > &  names 
) const
virtual
virtual void makVrf::DtSelectionGroupManager::addItemsToSelectionGroup ( const std::string &  ,
const GroupItems names,
bool  signal = true 
)
virtual

Adds new items to a selection group.

virtual void makVrf::DtSelectionGroupManager::addItemsToSelectionGroup ( const std::string &  ,
const std::vector< DtUUID > &  names,
bool  signal = true 
)
virtual
virtual bool makVrf::DtSelectionGroupManager::itemInAnySelectionGroup ( const DtUUID ) const
virtual

Returns true if the named item is in any selection group.

virtual void makVrf::DtSelectionGroupManager::removeItemFromSelectionGroup ( const std::string &  ,
const DtUUID  
)
virtual

Removes an item vrom a selection group.

virtual void makVrf::DtSelectionGroupManager::removeItemsFromSelectionGroup ( const std::string &  ,
const GroupItems names 
)
virtual

Removes items vrom a selection group.

virtual void makVrf::DtSelectionGroupManager::removeItemsFromSelectionGroup ( const std::string &  ,
const std::vector< DtUUID > &  names 
)
virtual
virtual const SelectionGroups& makVrf::DtSelectionGroupManager::selectionGroups ( ) const
virtual

Returns the current list of selection groups.

virtual bool makVrf::DtSelectionGroupManager::load ( const std::string &  )
virtual

Loads and replaces the current selection group set.

virtual bool makVrf::DtSelectionGroupManager::save ( const std::string &  )
virtual

Saves out the current selection group set.

virtual void makVrf::DtSelectionGroupManager::removeAll ( )
virtual

Removes all selection groups.

virtual GroupItems makVrf::DtSelectionGroupManager::itemsInSelectionGroup ( const std::string &  ) const
virtual

Returns all the items in a particular selection group.

virtual bool makVrf::DtSelectionGroupManager::itemIsInSelectionGroup ( const std::string &  group,
const DtUUID  
) const
virtual

Returns true if the names item is in the supplied selection group.

virtual void makVrf::DtSelectionGroupManager::selectItemsInSelectionGroup ( const std::string &  )
virtual

Selects all the items in the specified selection group that are in the simulation.

Emits a signal that this selection group is currently active

virtual const std::string& makVrf::DtSelectionGroupManager::selectedSelectionGroup ( ) const
virtual

Returns the currently selected selection group.

virtual void makVrf::DtSelectionGroupManager::processCreateSelectionGroup ( DtSimMessage )
virtual

Call back in response receiving creating selection group message.

virtual bool makVrf::DtSelectionGroupManager::canRenameSelectionGroup ( const std::string &  ) const
virtual

Returns true if the selection group can be renamed.

By default the "Selection Group <N>" groups cannot be renamed

virtual void makVrf::DtSelectionGroupManager::allScenarioObjectsDiscovered ( )
virtual

When upgrading, called when all scenario objects are discovered.

virtual void makVrf::DtSelectionGroupManager::slot_stateRemoved ( const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  )
protectedvirtual

Called when an item is removed, remove from selection group(s) they are in.

If selection group is empty will remove selection group

template<class Archive >
void makVrf::DtSelectionGroupManager::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprotected

When the class Archive corresponds to an output archive, the & operator is defined similar to <<.

Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.

References DtUUID::nullUUID(), and DtUUID::setStringUUID().

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Member Data Documentation

boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupAdded

Signals for selection group manager

Signal sent when a new selection group is added

boost::signal<void (std::string, std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupRenamed

Signal sent when a selection group is renamed.

boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupRemoved

Signal sent when a selection group is removed.

boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupCleared

Signal sent when a selection group is cleared of all its items.

boost::signal<void (std::string, GroupItems)> makVrf::DtSelectionGroupManager::signal_itemsAddedToSelectionGroup

Signal sent when items are added to a selection group.

boost::signal<void (std::string, GroupItems)> makVrf::DtSelectionGroupManager::signal_itemsRemovedFromSelectionGroup

Signal sent when items are removed from a selection group.

boost::signal<void (DtUUID)> makVrf::DtSelectionGroupManager::signal_itemRemovedFromGroups

Signal sent when the item is removed from all selection groups.

boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_loading

Signal sent before the selection group manager is loaded.

boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_loaded

Signal sent after the selection group manager is loaded.

boost::signal<void ()> makVrf::DtSelectionGroupManager::signal_selectionGroupsCleared

Signal sent when the selection group manager is cleared.

boost::signal<void (std::string, std::string)> makVrf::DtSelectionGroupManager::signal_itemRenamed

Signal emitted when an item is renamed in a selection group.

boost::signal<void (std::string)> makVrf::DtSelectionGroupManager::signal_selectionGroupSelected

Signal emitted when current selection group has changed.

makVrv::DtDe& makVrf::DtSelectionGroupManager::myDe
protected
SelectionGroups makVrf::DtSelectionGroupManager::mySelectionGroupsUUID
protected
makVrv::DtSignalConnectionManager makVrf::DtSelectionGroupManager::myConnectionManager
protected
std::string makVrf::DtSelectionGroupManager::mySelectedSelectionGroup
protected
bool makVrf::DtSelectionGroupManager::myWaitingForDiscovery
protected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)