MAK RTIspy API Documentation for HLA 1.3
simpleTimeInteraction13.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: simpleTimeInteraction13.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *******************************************************************************/
00008 #ifndef _INTERACTIONDEFINITION_
00009 #define _INTERACTIONDEFINITION_
00010 
00011 // A simple container class for an interaction event
00012 #include <map>
00013 #include <string>
00014 #include "RTI.hh"
00015 
00016 
00017 
00018 // An interactionEvent object encapsulates the contents of a 
00019 // receiveInteraction callback.  Note, that not all contents of the 
00020 // callback are stored, only those required for our specific application.
00021 
00022 // That information can then be stored and later retrieved to be processed.
00023 class interactionEvent
00024 {
00025  public:
00026 
00027    enum interaction_type{ Unknown, FireType, DetonationType };
00028 
00029   interactionEvent(RTI::InteractionClassHandle theHandle,
00030         const RTI::ParameterHandleValuePairSet& pvhps,
00031         const RTI::FedTime& fedTime,
00032         const char* tag,        
00033                   interaction_type theInteractionType = Unknown                  
00034                   );
00035 
00036   // Constructor for an interaction with no reported FedTime.
00037   interactionEvent(RTI::InteractionClassHandle theHandle,
00038         const RTI::ParameterHandleValuePairSet& pvhps,        
00039         const char* tag,
00040                   interaction_type theInteractionType = Unknown
00041                   );
00042   
00043   ~interactionEvent();
00044   
00045   RTI::InteractionClassHandle getHandle();
00046 //  const std::map<unsigned long, std::string>& getPhvps();
00047   bool isFireInteraction();
00048   bool isDetonateInteraction();
00049   const std::string& getFedTime();
00050   const std::string& getTag();
00051   RTI::EventRetractionHandle getRetractionHandle();
00052   int getTypeOfInteraction();
00053 
00054 private:
00055   RTI::InteractionClassHandle myHandle;
00056   std::map<unsigned long, std::string> myPhvps;
00057   std::string myFedTime;
00058   std::string myTag;  
00059   int  myInteractionType;
00060   
00061 };
00062 
00063 
00064 class requestUnit
00065 {
00066  public: 
00067   requestUnit( RTI::ObjectHandle, 
00068                const RTI::AttributeHandleSet& attrHandSet );
00069 
00070   ~requestUnit();
00071   
00072   const RTI::AttributeHandleSet& getAttrHandSet();
00073   const RTI::ObjectHandle getHandle();
00074   
00075 private:
00076   const RTI::AttributeHandleSet& myAttrHandleSet;
00077   RTI::ObjectHandle myHandle;
00078 };
00079 
00080 
00081 
00082 #endif

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)