VR-Link API Documentation for HLA 1516
testInter.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef TestInteraction_H_
00007 #define TestInteraction_H_
00008 
00009 #if DtHLA
00010 
00011 #include <vl/hIntWEncDec.h>
00012 #include <vl/hExerciseConn.h>
00013 
00014 #include <matrix/vlVector.h>
00015 
00016 class TestInteraction;
00017 
00022 typedef void (*TestInteractionCb)(TestInteraction* inter, void* usr);
00023 
00029 class TestInteraction : public DtInteractionWithEncDec
00030 {
00031 public:
00032 
00036    TestInteraction();
00037 
00041    virtual ~TestInteraction();
00042 
00046    TestInteraction(const TestInteraction& orig);
00047 
00051    TestInteraction& operator=(const TestInteraction& orig);
00052 
00056    virtual const char* name() const;
00057 
00061    virtual void printData() const;
00062 
00063    // **************************************************************
00064    // Inspector and mutator functions for the interaction class' data.
00065    // These will look different for each DtInteraction subclass.
00066    // None are required by VR-Link, but the class will not be
00067    // particularly useful without a way to get data in and out in a
00068    // typesafe manner.
00069    // **************************************************************
00070 
00072    virtual void setNumber(int num);
00073    virtual int number() const;
00074 
00076    virtual void setVector(const DtVector& vec);
00077    virtual const DtVector& vector() const;
00078 
00079 public:
00080 
00086    static DtInteraction* create();
00087 
00094    static void addCallback(DtExerciseConn* conn,
00095       TestInteractionCb cb, void* usr);
00096    static void removeCallback(DtExerciseConn* conn,
00097       TestInteractionCb cb, void* usr);
00098 
00099 protected:
00100 
00108    virtual char* interactionClassToUse(DtExerciseConn* exConn) const;
00109 
00117    virtual DtInteractionDecoder* createDecoder(DtExerciseConn* exConn) const;
00118 
00119 
00127    virtual DtInteractionEncoder* createEncoder(DtExerciseConn* exConn) const;
00128 
00129 protected:
00130    
00131    int myNum;
00132    DtVector myVec;
00133 };
00134 
00135 #endif
00136 #endif

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)