VR-Forces 4.0.4 Class Documentation
include/vrvVrlQt/DtObjectsCountTreeLogic.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile:  $ $Revision:  $ $State:  $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvVrlQt/vrvVrlQt.h>
00015 #include <vrvVrlQt/DtObjectsCountTreeInterface.h>
00016 #include <vrvUtil/DtSignalConnectionManager.h>
00017 #include <vrvCore/DtEntityState.h>
00018 #include <vrvCore/DtElementAttributes.h>
00019 #include <vector>
00020 
00021 namespace makVrv
00022 {
00026    class DT_DLL_VRVVRLQT DtObjectsCountTreeLogic
00027    {
00028    public:
00030 
00031       typedef std::pair<std::string, DtObjectsCountTreeInterface::TacticalGraphicType> TacticalTypePair;
00032       typedef std::vector<TacticalTypePair> TacticalTypePairList;
00033       typedef std::vector<int> EntityIDList;
00035 
00036    public:
00038       DtObjectsCountTreeLogic(DtDe& de, DtObjectsCountTreeInterface* iface);
00039 
00041       ~DtObjectsCountTreeLogic();
00042 
00043       void refreshWidget();
00044 
00045    protected:
00046       void slot_countEntitiesAdded(const DtElementData::ElementList& elementList);
00047       void slot_countEntitiesRemoved(const DtElementData::UniqueIdList& elementIdList);
00048       void slot_countDestroyedAndTacticals(const DtElementData::EntryAttributesList& attributeList);
00049       void slot_tacticalGraphicRenamed( const DtUniqueID& tacticalId, const std::string& overlay);
00050       void slot_tacticalGraphicRemoved( const DtUniqueID& tacticalId);
00051 
00052       void countOneEntity(const DtElementEntry* entry, const bool subtract = false);
00053       void countOneDestroyed(const DtElementEntry* entry, const DtElementAttributeDamageState* damageState);
00054       void countOneTactical(const DtElementAttributeDisplayName* dispName, 
00055          const DtElementAttributeKindAndCategory* kindCat);
00056 
00057       void rememberEntityID(int entityID);
00058       void forgetEntityID(int entityID);
00059       bool knownEntityID(int entityID);
00060 
00061       void rememberDestroyedID(int destroyedID);
00062       void forgetDestroyedID(int destroyedID);
00063       bool knownDestroyedID(int destroyedID);
00064 
00065       void rememberTacticalData(std::string dispName, DtObjectsCountTreeInterface::TacticalGraphicType tacticalType);
00066       void forgetTacticalData(std::string dispName);
00067       bool knownTacticalData(std::string dispName);
00068       DtObjectsCountTreeInterface::TacticalGraphicType findTacticalDataType(std::string dispName);
00069 
00070       DtObjectsCountTreeInterface::TacticalGraphicType tacticalType(std::pair<int,int> kindCat);
00071 
00072    protected:
00073       DtDe& myDe;
00074       DtObjectsCountTreeInterface* myWidget;
00075       DtSignalConnectionManager myManager;
00076       EntityIDList entityIDs;
00077       EntityIDList destroyedIDs;
00078       TacticalTypePairList tacticalData;
00079    };
00080 }
00081 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)