MAK RTIspy API Documentation for HLA 1.3
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtNetworkMapCentralNode Class Reference

Includes -------------------------—. More...

+ Collaboration diagram for DtNetworkMapCentralNode:

Public Member Functions

 DtNetworkMapCentralNode ()
 Constructor.
virtual ~DtNetworkMapCentralNode ()
 Destructor.
DtNetworkMapNodeaddNode (int fedId, const MAKRti::DtString &federationName, const MAKRti::DtString &processName, const MAKRti::DtString &fedType, const MAKRti::DtString &fedName, float rad)
 Adds a basic node.
DtNetworkMapNodeaddForwarderNode (int id, const MAKRti::DtString &name, float rad)
 Adds a forwarder node.
void update (float delta)
 Updates all the nodes.
void shutdown ()
 Does proper shutting down.
bool searchNodes (int fedId, const MAKRti::DtString &federationName, int &resultIndex)
 search nodes
void updateFederatePositions ()
 Calculates where the federates should be placed.
void updateForwarderPositions ()
 Updates the forwarder positions.
void setCentralNode (const MAKRti::DtString &name, const MAKRti::DtString &displayName, int id, float radius, bool isLightweight)
 Set the central node.
DtNetworkMapNodegetNode (unsigned int index)
 index into the nodes
DtNetworkMapNodegetNodeByFederateHandle (unsigned int fedHandle, const MAKRti::DtString &federationName)
 gets a node by its federate handle
DtNetworkMapNodegetNodeByFederateName (const MAKRti::DtString &fedName, const MAKRti::DtString &federationName)
 gets a node by its federate name
DtNetworkMapNodegetForwarderNode (unsigned int index)
 index into the nodes
DtNetworkMapNodegetForwarderNodeByName (const MAKRti::DtString &forwarderName)
 get a forwarder by name
int removeNode (unsigned int fedHandle, const MAKRti::DtString &federationName)
 Removes a node by its federate handle.
void clearList ()
 clear the nodes
void clearTouchedNodes ()
 Clears nodes that have been touched.
void searchForDeadNodes ()
 Searches for dead nodes.
bool drawLines ()
 Do we draw the lines?
bool drawText ()
 Do we draw the id text?
unsigned int getSize ()
 return the size
unsigned int getFwdSize ()
const std::vector
< DtNetworkMapNode * > 
getNodes ()
 get the nodes
MAKRti::DtString getCentralNodeName ()
 Gets the central node name string.
bool isLightweight ()
 Gets whether we are viewing a lightweight connection.
bool hasRtiExec ()
 Gets whether we have an rtiexec.
void setHasExec (bool hasAnExec)
 Sets whether we have an exec or not.

Protected Member Functions

DtNetworkMapNodeinsertCentralNode (int id, const MAKRti::DtString &displayName, float rad, bool isLightweight)
 Inserts the central node.
DtNetworkMapNodeinsertCentralForwarderNode (int id, const MAKRti::DtString &name, float rad)
 Inserts the forwarder node for the central node.
void setIsLightweight (bool isLw)
 Sets whether we are viewing a lightweight connection.
void setCentralNodeName (const MAKRti::DtString &string)
 Set the central node name.
_vec2 calcFederateDestination (int max_federates, int federate_no)
 Calculates the destination.

Protected Attributes

bool myHasExec
bool myIsLightweight
bool myShouldDrawLines
bool myShouldDrawText
bool myHasDoneShutdown
float myRadius
MAKRti::DtString myName
std::vector< DtNetworkMapNode * > myNodes
std::vector< DtNetworkMapNode * > myForwarderNodes

Private Member Functions

void updatePositions (std::vector< DtNetworkMapNode * > &myNodes, bool areForwarders=false)
 private function that does the updating of a vector of nodes that are passed in

Detailed Description

Includes -------------------------—.

Constructor & Destructor Documentation

DtNetworkMapCentralNode::DtNetworkMapCentralNode ( )

Constructor.

References myName, and myNodes.

DtNetworkMapCentralNode::~DtNetworkMapCentralNode ( )
virtual

Destructor.

References myNodes, and shutdown().

Member Function Documentation

DtNetworkMapNode * DtNetworkMapCentralNode::addForwarderNode ( int  id,
const MAKRti::DtString &  name,
float  rad 
)

Adds a forwarder node.

References myForwarderNodes.

Referenced by DtNetworkMapWidget::addPeerForwarderNode().

DtNetworkMapNode * DtNetworkMapCentralNode::addNode ( int  fedId,
const MAKRti::DtString &  federationName,
const MAKRti::DtString &  processName,
const MAKRti::DtString &  fedType,
const MAKRti::DtString &  fedName,
float  rad 
)

Adds a basic node.

References myNodes, and searchNodes().

Referenced by DtNetworkMapWidget::addExecNode(), and DtNetworkMapWidget::addFederateNode().

_vec2 DtNetworkMapCentralNode::calcFederateDestination ( int  max_federates,
int  federate_no 
)
protected

Calculates the destination.

Calculate the destination.

References _vec2::x, and _vec2::y.

Referenced by updatePositions().

void DtNetworkMapCentralNode::clearList ( )

clear the nodes

References myForwarderNodes, myHasExec, myIsLightweight, myName, and myNodes.

Referenced by DtNetworkMapWidget::clearList(), and shutdown().

void DtNetworkMapCentralNode::clearTouchedNodes ( )

Clears nodes that have been touched.

References myNodes.

bool DtNetworkMapCentralNode::drawLines ( )
inline
bool DtNetworkMapCentralNode::drawText ( )
inline

Do we draw the id text?

References myShouldDrawText.

Referenced by DtNetworkMapWidget::drawText().

MAKRti::DtString DtNetworkMapCentralNode::getCentralNodeName ( )
inline
DtNetworkMapNode * DtNetworkMapCentralNode::getForwarderNode ( unsigned int  index)
DtNetworkMapNode * DtNetworkMapCentralNode::getForwarderNodeByName ( const MAKRti::DtString &  forwarderName)

get a forwarder by name

References myForwarderNodes, myName, and NULL.

Referenced by DtNetworkMapWidget::forceForwarderSelection().

unsigned int DtNetworkMapCentralNode::getFwdSize ( )
inline
DtNetworkMapNode * DtNetworkMapCentralNode::getNode ( unsigned int  index)
DtNetworkMapNode * DtNetworkMapCentralNode::getNodeByFederateHandle ( unsigned int  fedHandle,
const MAKRti::DtString &  federationName 
)
DtNetworkMapNode * DtNetworkMapCentralNode::getNodeByFederateName ( const MAKRti::DtString &  fedName,
const MAKRti::DtString &  federationName 
)

gets a node by its federate name

References federationName(), myNodes, and NULL.

const std::vector<DtNetworkMapNode*> DtNetworkMapCentralNode::getNodes ( )
inline

get the nodes

References myNodes.

unsigned int DtNetworkMapCentralNode::getSize ( )
inline
bool DtNetworkMapCentralNode::hasRtiExec ( )
inline

Gets whether we have an rtiexec.

References myHasExec.

DtNetworkMapNode * DtNetworkMapCentralNode::insertCentralForwarderNode ( int  id,
const MAKRti::DtString &  name,
float  rad 
)
protected

Inserts the forwarder node for the central node.

References myForwarderNodes.

Referenced by insertCentralNode().

DtNetworkMapNode * DtNetworkMapCentralNode::insertCentralNode ( int  id,
const MAKRti::DtString &  displayName,
float  rad,
bool  isLightweight 
)
protected
bool DtNetworkMapCentralNode::isLightweight ( )
inline

Gets whether we are viewing a lightweight connection.

References myIsLightweight.

Referenced by DtNetworkMapWidget::drawLines().

int DtNetworkMapCentralNode::removeNode ( unsigned int  fedHandle,
const MAKRti::DtString &  federationName 
)

Removes a node by its federate handle.

Returns the index of the node that was removed.

References federationName(), and myNodes.

Referenced by DtNetworkMapWidget::removeExecNode(), DtNetworkMapWidget::removeFederateNode(), and searchForDeadNodes().

void DtNetworkMapCentralNode::searchForDeadNodes ( )

Searches for dead nodes.

References false, myNodes, removeNode(), and true.

bool DtNetworkMapCentralNode::searchNodes ( int  fedId,
const MAKRti::DtString &  federationName,
int &  resultIndex 
)

search nodes

References federationName(), and myNodes.

Referenced by addNode().

void DtNetworkMapCentralNode::setCentralNode ( const MAKRti::DtString &  name,
const MAKRti::DtString &  displayName,
int  id,
float  radius,
bool  isLightweight 
)
void DtNetworkMapCentralNode::setCentralNodeName ( const MAKRti::DtString &  string)
inlineprotected

Set the central node name.

References myName.

Referenced by setCentralNode().

void DtNetworkMapCentralNode::setHasExec ( bool  hasAnExec)
inline

Sets whether we have an exec or not.

References myHasExec.

void DtNetworkMapCentralNode::setIsLightweight ( bool  isLw)
inlineprotected

Sets whether we are viewing a lightweight connection.

References myIsLightweight.

Referenced by setCentralNode().

void DtNetworkMapCentralNode::shutdown ( )

Does proper shutting down.

References clearList(), and myHasDoneShutdown.

Referenced by ~DtNetworkMapCentralNode(), and DtNetworkMapWidget::~DtNetworkMapWidget().

void DtNetworkMapCentralNode::update ( float  delta)

Updates all the nodes.

References myForwarderNodes, and myNodes.

Referenced by DtNetworkMapWidget::tick().

void DtNetworkMapCentralNode::updateFederatePositions ( )

Calculates where the federates should be placed.

does the federate positions

References myNodes, and updatePositions().

Referenced by DtNetworkMapWidget::refreshPositions().

void DtNetworkMapCentralNode::updateForwarderPositions ( )

Updates the forwarder positions.

References myForwarderNodes, and updatePositions().

Referenced by DtNetworkMapWidget::refreshPositions().

void DtNetworkMapCentralNode::updatePositions ( std::vector< DtNetworkMapNode * > &  myNodes,
bool  areForwarders = false 
)
private

private function that does the updating of a vector of nodes that are passed in

References calcFederateDestination(), myIsLightweight, myRadius, myShouldDrawLines, myShouldDrawText, _vec2::x, and _vec2::y.

Referenced by updateFederatePositions(), and updateForwarderPositions().

Member Data Documentation

std::vector<DtNetworkMapNode *> DtNetworkMapCentralNode::myForwarderNodes
protected
bool DtNetworkMapCentralNode::myHasDoneShutdown
protected

Referenced by shutdown().

bool DtNetworkMapCentralNode::myHasExec
protected

Referenced by clearList(), hasRtiExec(), and setHasExec().

bool DtNetworkMapCentralNode::myIsLightweight
protected
MAKRti::DtString DtNetworkMapCentralNode::myName
protected
std::vector<DtNetworkMapNode *> DtNetworkMapCentralNode::myNodes
protected
float DtNetworkMapCentralNode::myRadius
protected

Referenced by updatePositions().

bool DtNetworkMapCentralNode::myShouldDrawLines
protected

Referenced by drawLines(), and updatePositions().

bool DtNetworkMapCentralNode::myShouldDrawText
protected

Referenced by drawText(), and updatePositions().


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

Document ID: Generated on Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)