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

We derive TestPublisher from DtObjectPublisher in testPub.h and testPub.cxx.

As you can see, this class just configures its base class properly in its constructor, and provides type safety in accessing its state repository.


/*********************************************************************
** Copyright (c) 1992-2010 VT MAK
** All rights reserved.
*********************************************************************/
#pragma once
#if DtHLA
#include "testSR.h"
{
public:
TestPublisher(DtExerciseConn* conn, const char* objName = NULL);
virtual ~TestPublisher();
};
#endif

/*********************************************************************
** Copyright (c) 1992-2010 VT MAK
** All rights reserved.
*********************************************************************/
#if DtHLA
#include "testPub.h"
#include "testEnc.h"
#include "testDec.h"
#include <vl/fom.h>
DtExerciseConn* conn, const char* objName) :
{
// setHlaObject is defined in the base DtObjectPublisher. Pass the FOM
// class name, and an encoder and decoder. These objects will be deleted
// by the base class on destruction.
const char* className = "Test";
DtObjClassDesc* desc = conn->fom()->objClassByName(className);
setHlaObject(className, new TestEncoder(conn, desc),
new TestDecoder(conn, desc), objName);
}
{
}
{
}
{
}
#endif

Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)