VR-Link API Documentation for DIS
ddmFedAmb13.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2009 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 #pragma  once
00006 
00007 #if DtHLA
00008 #if !DtHLA_1516
00009 
00010 #include <vl/vrlFedAmb13.h>
00011 
00012 class DtDdmFederateAmbassador : public DtVrlFederateAmbassador
00013 {
00014 public:
00015    struct DtRegionInfo
00016    {
00017       unsigned long lowerXBound;
00018       unsigned long lowerYBound;
00019       unsigned long upperXBound;
00020       unsigned long upperYBound;
00021       bool infoSet;
00022    };
00023 
00024    DtDdmFederateAmbassador();
00025 
00026    virtual ~DtDdmFederateAmbassador() throw();
00027 
00028    // Override adds the handle and an empty "region info" to the map
00029    virtual void discoverObjectInstance(
00030       RTI::ObjectHandle theObject,
00031       RTI::ObjectClassHandle theObjectClass,
00032       const char* theObjectName )
00033       throw( RTI::CouldNotDiscover,
00034       RTI::ObjectClassNotKnown,
00035       RTI::FederateInternalError );
00036 
00037    // Override gets the region information and sets it in the map
00038    virtual void reflectAttributeValues(
00039       RTI::ObjectHandle theObject,
00040       const RTI::AttributeHandleValuePairSet& theAttributes,
00041       const char* theTag )
00042       throw( RTI::ObjectNotKnown,
00043       RTI::AttributeNotKnown,
00044       RTI::FederateOwnsAttributes,
00045       RTI::FederateInternalError);
00046 
00047    // Override removes the handle from the map
00048    virtual void removeObjectInstance(
00049       RTI::ObjectHandle theObject,
00050       const char* theTag )
00051       throw( RTI::ObjectNotKnown,
00052       RTI::FederateInternalError );
00053 
00054    virtual void receiveInteraction(
00055       RTI::InteractionClassHandle theInteraction,
00056       const RTI::ParameterHandleValuePairSet& theParameters,
00057       const char* theTag )
00058       throw( RTI::InteractionClassNotKnown,
00059       RTI::InteractionParameterNotKnown,
00060       RTI::FederateInternalError );
00061 
00062    static DtVrlFederateAmbassador* create();
00063 
00064    virtual void setXHandle(RTI::DimensionHandle handle);
00065    virtual void setYHandle(RTI::DimensionHandle handle);
00066 
00067    virtual DtRegionInfo regionInfoForObject(RTI::ObjectHandle handle) const;
00068    virtual DtRegionInfo lastInteractionRegion() const;
00069 
00070    virtual void clearLastInteractionRegion();
00071 
00072 protected:
00073    std::map<RTI::ObjectHandle, DtRegionInfo> myHandleToRegionMap;
00074    DtRegionInfo                              myLastInteractionRegion;
00075 
00076    RTI::DimensionHandle myXHandle;
00077    RTI::DimensionHandle myYHandle;
00078 
00079    DtRegionInfo myEmptyRegionInfo;
00080 };
00081 
00082 #endif // DtHLA
00083 #endif // !DtHLA_1516
00084 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)