VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
The ReflectedTest class

ReflectedTest performs similar tasks for incoming objects.

In addition to the testStateRep() and tsr() functions, the class provides type-specific versions of the list management functions next(), prev(), wrapNext(), and wrapPrev(), and of the post update callback registration functions.

This class is derived from DtReflectedObject in refTest.h and refTest.cxx. The implementations of these functions are trivial, in most cases calling down to base class versions, and performing a cast between a specific and a general type.


/*********************************************************************
** Copyright (c) 1992-2010 VT MAK
** All rights reserved.
*********************************************************************/
#pragma once
#if DtHLA
#include "testSR.h"
class ReflectedTest;
typedef void (*TestCallbackFunction)(ReflectedTest* obj, void* userData);
class ReflectedTest : public DtReflectedObject
{
public:
ReflectedTest(DtHlaObject* obj, DtExerciseConn* conn);
virtual ~ReflectedTest();
virtual TestStateRepository* testStateRep() const;
virtual TestStateRepository* tsr() const;
virtual ReflectedTest* next() const;
virtual ReflectedTest* prev() const;
virtual ReflectedTest* wrapNext() const;
virtual ReflectedTest* wrapPrev() const;
virtual void addPostUpdateCallback(
TestCallbackFunction cb, void* userData);
virtual void removePostUpdateCallback(
TestCallbackFunction cb, void* userData);
};
#endif

/*********************************************************************
** Copyright (c) 1992-2010 VT MAK
** All rights reserved.
*********************************************************************/
#if DtHLA
#include "refTest.h"
#include "testDec.h"
ReflectedTest::ReflectedTest(DtHlaObject* obj, DtExerciseConn* conn) :
DtReflectedObject(conn, new TestStateRepository())
{
setHlaObject(obj, new TestDecoder(conn, &obj->classDesc()));
}
ReflectedTest::~ReflectedTest()
{
}
TestStateRepository* ReflectedTest::testStateRep() const
{
return (TestStateRepository*) myStateRep;
}
TestStateRepository* ReflectedTest::tsr() const
{
return (TestStateRepository*) myStateRep;
}
ReflectedTest* ReflectedTest::next() const
{
return (ReflectedTest*) nextObj();
}
ReflectedTest* ReflectedTest::prev() const
{
return (ReflectedTest*) prevObj();
}
ReflectedTest* ReflectedTest::wrapNext() const
{
return (ReflectedTest*) wrapNextObj();
}
ReflectedTest* ReflectedTest::wrapPrev() const
{
return (ReflectedTest*) wrapPrevObj();
}
void ReflectedTest::addPostUpdateCallback(
TestCallbackFunction cb, void* userData)
{
baseAddPostUpdateCallback(
}
void ReflectedTest::removePostUpdateCallback(
TestCallbackFunction cb, void* userData)
{
baseRemovePostUpdateCallback(
}
#endif

Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)