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

This class will be used to receive influence interactions and create or manage objects that will represent visual representations of those messages. More...

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

Classes

struct  AttackIdentifier
struct  AttackLineInformation
 Structure defining a single attack line from source to target. More...
struct  UnderAttackInformation

Public Types

typedef std::map< int,
DtAttackLine * > 
AttackLines
typedef std::map< std::string,
DtInfluenceInteractionInterface
AttackTypes
typedef std::set
< makVrv::DtElementID
Supplying
typedef std::map
< makVrv::DtElementID,
Supplying
Suppliers
typedef std::map
< makVrv::DtElementID,
AttackLineInformation
AttackTarget
typedef std::map
< makVrv::DtElementID,
AttackTarget
Attacks
typedef std::map
< AttackIdentifier, double > 
AttackExpirations

Public Member Functions

 DtInfluenceManager (makVrv::DtDe &)
virtual ~DtInfluenceManager ()
virtual void registerInstance (makVrv::DtDe &, DtInfluenceManager *)
 Registers new instance of this class.
virtual void setDisplayAttackLines (bool)
 Sets whether or not to display attack lines. Initially set from entity settings.
virtual bool displayAttackLines () const
virtual void setDisplayAttackAnimation (bool)
 Sets whether or not to display attack animation. Initially set from entity settings.
virtual bool displayAttackAnimation () const
virtual void setDisplaySupplyLines (bool)
 Sets whether or not to supply lines. Initially set from entity settings.
virtual bool displaySupplyLines () const
virtual int animationColor (int baseColor) const
 Returns the color to display (a, b, g, r) based on the base color (a, b, g, r).
virtual bool isAttacking (makVrv::DtElementID) const
 Returns true if this entity is attacking.
virtual bool underAttack (makVrv::DtElementID) const
 Returns true if this item is under attack.
virtual void setSupplyLineColor (int r, int g, int b, int a)
 Sets/gets the color of the supply line.
virtual void getSupplyLineColor (int &r, int &g, int &b, int &a)
virtual void setAnimationLength (double)
 Sets the length of an animation frame to change color from color to white to back.
virtual std::set< intsectorsAttacked (makVrv::DtElementID) const
 For the given entity, return a list of the sectors attacked.
virtual void setWedgeSize (double)
 Sets size of wedge (in degrees)
virtual double wedgeSize () const
virtual Attacks attackLinesFor (makVrv::DtElementID) const
 Gets the attacks generated by the attacker.
virtual Attacks attackLinesTo (makVrv::DtElementID) const
 Returns the attacks to the target.
virtual void clear ()
 Call to clear out pending state.
virtual void setMinimumInfluenceDuration (double)
 Sets the minimal amount of time to display an attack line. Default is 3 seconds.
virtual double minimumInfluenceDuration () const
virtual Supplying suppliersTo (makVrv::DtElementID) const
 Returns the list of suppliers to this entity.
virtual Supplying supplies (makVrv::DtElementID) const
 Returns the list of suppliers for this entity.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtInfluenceManagerinstance (makVrv::DtDe &de)

Public Attributes

boost::signal< void(makVrv::DtElementID,
makVrv::DtElementID,
std::string)> 
signal_attackAdded
boost::signal< void(makVrv::DtElementID,
makVrv::DtElementID,
std::string)> 
signal_attackRemoved
boost::signal< void(makVrv::DtElementID,
makVrv::DtElementID)> 
signal_supplyAdded
boost::signal< void(makVrv::DtElementID,
makVrv::DtElementID)> 
signal_supplyRemoved

Protected Types

typedef std::map
< makVrv::DtElementID,
UnderAttackInformation
UnderAttack
typedef std::map
< makVrv::DtElementID,
makVrv::DtSceneObject * > 
SceneObjects
typedef std::map
< makVrv::DtElementID,
DtSupplyLine * > 
SupplyLine
typedef std::map
< makVrv::DtElementID,
SupplyLine
SupplyLines
typedef std::map
< makVrv::DtElementID, double > 
SupplierExpiration
typedef std::map
< makVrv::DtElementID,
SupplierExpiration
SupplyExpirations
typedef std::map< std::string,
DtInfluenceInteractionInterface * > 
PendingInfluenceInteractions

Protected Member Functions

virtual void processInfluenceMessageCallback (DtNetworkMessageInterface *i)
 Called when influence interface message is received.
virtual void createAttackLine (DtInfluenceInteractionInterface *)
 Removes an existing attack line for the given influence.
virtual void removeAttackLine (DtInfluenceInteractionInterface *)
virtual void createSupplyLine (DtInfluenceInteractionInterface *)
virtual void removeSupplyLine (DtInfluenceInteractionInterface *)
virtual void removeSupplyLine (makVrv::DtElementID supplier, makVrv::DtElementID target)
virtual void removeSupplyLines (makVrv::DtElementID)
virtual void onStateAdded (const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *)
virtual void removeAttackLine (makVrv::DtElementID attacker, makVrv::DtElementID target, const std::string &attackType)
virtual void slot_extendedEntityOptionsChanged ()
virtual void slot_simObjectEntryAboutToBeRemoved (makVrv::DtSimObjectEntry &e)
virtual void setupSceneObject (makVrv::DtElementID)
virtual void slot_sceneObjectToBeDeleted (const makVrv::DtUniqueID &id)
virtual void slot_removeExpiredAttacks ()
virtual void slot_removeExpiredSupplies ()
virtual void processRangeRingsUpdated (DtNetworkMessageInterface *i)
virtual void addPendingInfluence (DtInfluenceInteractionInterface *, const std::string &marking)

Protected Attributes

makVrv::DtDemyDe
bool myDisplayAttackLines
bool myDisplayAttackAnimation
Attacks myAttacks
AttackExpirations myAttackExpirations
makVrv::DtSignalConnectionManager myConnectionManager
UnderAttack myUnderAttack
double myAnimationStart
double myAnimationLength
DtVrfStateViewCollectionManagermyCollectionManager
DtVrfSimBackendManagermyBackendManager
SceneObjects mySceneObjects
double myWedgeSize
double myMinimumInfluenceDuration
SupplyLines mySupplyLines
Suppliers mySuppliers
Suppliers mySupplied
SupplyExpirations mySupplyExpirations
float mySupplyLineColor [4]
bool myDisplaySupplyLines
PendingInfluenceInteractions myPendingInfluenceInteractions

Detailed Description

This class will be used to receive influence interactions and create or manage objects that will represent visual representations of those messages.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtInfluenceManager::DtInfluenceManager ( makVrv::DtDe )
virtual makVrf::DtInfluenceManager::~DtInfluenceManager ( )
virtual

Member Function Documentation

static DtInfluenceManager& makVrf::DtInfluenceManager::instance ( makVrv::DtDe de)
static
Returns
Application wide instance of this class.
virtual void makVrf::DtInfluenceManager::registerInstance ( makVrv::DtDe ,
DtInfluenceManager  
)
virtual

Registers new instance of this class.

virtual void makVrf::DtInfluenceManager::setDisplayAttackLines ( bool  )
virtual

Sets whether or not to display attack lines. Initially set from entity settings.

virtual bool makVrf::DtInfluenceManager::displayAttackLines ( ) const
virtual
virtual void makVrf::DtInfluenceManager::setDisplayAttackAnimation ( bool  )
virtual

Sets whether or not to display attack animation. Initially set from entity settings.

virtual bool makVrf::DtInfluenceManager::displayAttackAnimation ( ) const
virtual
virtual void makVrf::DtInfluenceManager::setDisplaySupplyLines ( bool  )
virtual

Sets whether or not to supply lines. Initially set from entity settings.

virtual bool makVrf::DtInfluenceManager::displaySupplyLines ( ) const
virtual
virtual int makVrf::DtInfluenceManager::animationColor ( int  baseColor) const
virtual

Returns the color to display (a, b, g, r) based on the base color (a, b, g, r).

The a value will not be modified

virtual bool makVrf::DtInfluenceManager::isAttacking ( makVrv::DtElementID  ) const
virtual

Returns true if this entity is attacking.

virtual bool makVrf::DtInfluenceManager::underAttack ( makVrv::DtElementID  ) const
virtual

Returns true if this item is under attack.

virtual void makVrf::DtInfluenceManager::setSupplyLineColor ( int  r,
int  g,
int  b,
int  a 
)
virtual

Sets/gets the color of the supply line.

virtual void makVrf::DtInfluenceManager::getSupplyLineColor ( int r,
int g,
int b,
int a 
)
virtual
virtual void makVrf::DtInfluenceManager::setAnimationLength ( double  )
virtual

Sets the length of an animation frame to change color from color to white to back.

If currently animating then reset the time stamp and restart animation

virtual std::set<int> makVrf::DtInfluenceManager::sectorsAttacked ( makVrv::DtElementID  ) const
virtual

For the given entity, return a list of the sectors attacked.

This list is ring based on the Physical-Footprint of the entity and the offset of an influence attack by name into that structure

virtual void makVrf::DtInfluenceManager::setWedgeSize ( double  )
virtual

Sets size of wedge (in degrees)

virtual double makVrf::DtInfluenceManager::wedgeSize ( ) const
virtual
virtual Attacks makVrf::DtInfluenceManager::attackLinesFor ( makVrv::DtElementID  ) const
virtual

Gets the attacks generated by the attacker.

virtual Attacks makVrf::DtInfluenceManager::attackLinesTo ( makVrv::DtElementID  ) const
virtual

Returns the attacks to the target.

virtual void makVrf::DtInfluenceManager::clear ( )
virtual

Call to clear out pending state.

virtual void makVrf::DtInfluenceManager::setMinimumInfluenceDuration ( double  )
virtual

Sets the minimal amount of time to display an attack line. Default is 3 seconds.

virtual double makVrf::DtInfluenceManager::minimumInfluenceDuration ( ) const
virtual
virtual Supplying makVrf::DtInfluenceManager::suppliersTo ( makVrv::DtElementID  ) const
virtual

Returns the list of suppliers to this entity.

virtual Supplying makVrf::DtInfluenceManager::supplies ( makVrv::DtElementID  ) const
virtual

Returns the list of suppliers for this entity.

virtual void makVrf::DtInfluenceManager::processInfluenceMessageCallback ( DtNetworkMessageInterface i)
protectedvirtual

Called when influence interface message is received.

virtual void makVrf::DtInfluenceManager::createAttackLine ( DtInfluenceInteractionInterface )
protectedvirtual

Removes an existing attack line for the given influence.

If there are no other attack types present for the influence source/target combination the attack line will be removed

virtual void makVrf::DtInfluenceManager::removeAttackLine ( DtInfluenceInteractionInterface )
protectedvirtual
virtual void makVrf::DtInfluenceManager::createSupplyLine ( DtInfluenceInteractionInterface )
protectedvirtual
virtual void makVrf::DtInfluenceManager::removeSupplyLine ( DtInfluenceInteractionInterface )
protectedvirtual
virtual void makVrf::DtInfluenceManager::removeSupplyLine ( makVrv::DtElementID  supplier,
makVrv::DtElementID  target 
)
protectedvirtual
virtual void makVrf::DtInfluenceManager::removeSupplyLines ( makVrv::DtElementID  )
protectedvirtual
virtual void makVrf::DtInfluenceManager::onStateAdded ( const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  )
protectedvirtual
virtual void makVrf::DtInfluenceManager::removeAttackLine ( makVrv::DtElementID  attacker,
makVrv::DtElementID  target,
const std::string &  attackType 
)
protectedvirtual
virtual void makVrf::DtInfluenceManager::slot_extendedEntityOptionsChanged ( )
protectedvirtual
virtual void makVrf::DtInfluenceManager::slot_simObjectEntryAboutToBeRemoved ( makVrv::DtSimObjectEntry e)
protectedvirtual
virtual void makVrf::DtInfluenceManager::setupSceneObject ( makVrv::DtElementID  )
protectedvirtual
virtual void makVrf::DtInfluenceManager::slot_sceneObjectToBeDeleted ( const makVrv::DtUniqueID id)
protectedvirtual
virtual void makVrf::DtInfluenceManager::slot_removeExpiredAttacks ( )
protectedvirtual
virtual void makVrf::DtInfluenceManager::slot_removeExpiredSupplies ( )
protectedvirtual
virtual void makVrf::DtInfluenceManager::processRangeRingsUpdated ( DtNetworkMessageInterface i)
protectedvirtual
virtual void makVrf::DtInfluenceManager::addPendingInfluence ( DtInfluenceInteractionInterface ,
const std::string &  marking 
)
protectedvirtual

Member Data Documentation

boost::signal<void (makVrv::DtElementID, makVrv::DtElementID, std::string)> makVrf::DtInfluenceManager::signal_attackAdded
boost::signal<void (makVrv::DtElementID, makVrv::DtElementID, std::string)> makVrf::DtInfluenceManager::signal_attackRemoved
boost::signal<void (makVrv::DtElementID, makVrv::DtElementID)> makVrf::DtInfluenceManager::signal_supplyAdded
boost::signal<void (makVrv::DtElementID, makVrv::DtElementID)> makVrf::DtInfluenceManager::signal_supplyRemoved
makVrv::DtDe& makVrf::DtInfluenceManager::myDe
protected
bool makVrf::DtInfluenceManager::myDisplayAttackLines
protected
bool makVrf::DtInfluenceManager::myDisplayAttackAnimation
protected
Attacks makVrf::DtInfluenceManager::myAttacks
protected
AttackExpirations makVrf::DtInfluenceManager::myAttackExpirations
protected
makVrv::DtSignalConnectionManager makVrf::DtInfluenceManager::myConnectionManager
protected
UnderAttack makVrf::DtInfluenceManager::myUnderAttack
protected
double makVrf::DtInfluenceManager::myAnimationStart
protected
double makVrf::DtInfluenceManager::myAnimationLength
protected
DtVrfStateViewCollectionManager& makVrf::DtInfluenceManager::myCollectionManager
protected
DtVrfSimBackendManager& makVrf::DtInfluenceManager::myBackendManager
protected
SceneObjects makVrf::DtInfluenceManager::mySceneObjects
protected
double makVrf::DtInfluenceManager::myWedgeSize
protected
double makVrf::DtInfluenceManager::myMinimumInfluenceDuration
protected
SupplyLines makVrf::DtInfluenceManager::mySupplyLines
protected
Suppliers makVrf::DtInfluenceManager::mySuppliers
protected
Suppliers makVrf::DtInfluenceManager::mySupplied
protected
SupplyExpirations makVrf::DtInfluenceManager::mySupplyExpirations
protected
float makVrf::DtInfluenceManager::mySupplyLineColor[4]
protected
bool makVrf::DtInfluenceManager::myDisplaySupplyLines
protected
PendingInfluenceInteractions makVrf::DtInfluenceManager::myPendingInfluenceInteractions
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)