VR-Link API Documentation for HLA 1516
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 <vl/hObjPub.h>
#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 Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)