VR-Link API Documentation for DIS
hRemovEntInt.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 
00007 #ifndef hRemovEntInt_H_
00008 #define hRemovEntInt_H_
00009 
00010 #if DtHLA
00011 
00012 #include "hIntWEncDec.h"
00013 #include "hostStructs.h"
00014 #include <matrix/vlMath.h>
00015 
00016 
00017 
00021 
00022 class DT_DLL_VL DtRemoveEntityInteraction;
00023 class DT_DLL_VL DtExerciseConn;
00024 
00025 
00027 typedef void (*DtRemoveEntityInteractionCb)(DtRemoveEntityInteraction* inter, 
00028    void* usr);
00029 
00034 
00035 
00036 class DT_DLL_VL DtRemoveEntityInteraction : public DtInteractionWithEncDec
00037 {
00038 public:
00039 
00041    DtRemoveEntityInteraction();
00042 
00044    virtual ~DtRemoveEntityInteraction();
00045 
00047    DtRemoveEntityInteraction(const DtRemoveEntityInteraction& orig);
00048 
00050    DtRemoveEntityInteraction& operator=(const DtRemoveEntityInteraction& orig);
00051 
00053    virtual void printData() const;
00054 
00056    virtual void printDataToStream(std::ostream& stream) const;
00057 
00059    virtual void setSenderId(const DtEntityIdentifier& id);
00060    virtual const DtEntityIdentifier& senderId() const;
00061 
00063    virtual void setReceiverId(const DtEntityIdentifier& id);
00064    virtual const DtEntityIdentifier& receiverId() const;
00065 
00067    virtual void setRequestId(int id);
00068    virtual int requestId() const;
00069 
00071    virtual const char* name() const;
00072 
00073 public:
00074 
00077    static DtInteraction* create();
00078 
00081    static void addCallback(DtExerciseConn* conn,
00082       DtRemoveEntityInteractionCb cb, void* usr,
00083       DtDDMRegionSP region = DtDDMRegionSP());
00084    static void removeCallback(DtExerciseConn* conn,
00085       DtRemoveEntityInteractionCb cb, void* usr,
00086       DtDDMRegionSP region = DtDDMRegionSP());
00087 
00088 protected:
00089 
00090    DtEntityIdentifier myOrigEnt;
00091    DtEntityIdentifier myReceiveEnt;
00092    int myRequestId;
00093 };
00094 
00095 inline void DtRemoveEntityInteraction::setSenderId(const DtEntityIdentifier& id)
00096 {
00097    myOrigEnt = id;
00098 }
00099 
00100 inline const DtEntityIdentifier& DtRemoveEntityInteraction::senderId() const
00101 {
00102    return myOrigEnt;
00103 }
00104 
00105 inline void DtRemoveEntityInteraction::setReceiverId(
00106    const DtEntityIdentifier& id)
00107 {
00108    myReceiveEnt = id;
00109 }
00110 
00111 inline const DtEntityIdentifier& DtRemoveEntityInteraction::receiverId() const
00112 {
00113    return myReceiveEnt;
00114 }
00115 
00116 inline void DtRemoveEntityInteraction::setRequestId(int id)
00117 {
00118    myRequestId = id;
00119 }
00120 
00121 inline int DtRemoveEntityInteraction::requestId() const
00122 {
00123    return myRequestId;
00124 }
00125 
00126 inline const char* DtRemoveEntityInteraction::name() const
00127 {
00128    return "DtRemoveEntityInteraction";
00129 }
00130 
00131 #endif
00132 #endif
00133 
00134 

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)