VR-Link API Documentation for HLA Evolved
 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 Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)