TestDecoder is defined in testDec.h and testDec.cxx.
Macros help out in the declaration and definition of decoding functions, which are implemented as static member functions of TestDecoder. The TestDecoder constructor self-registers its decoding functions.
#if DtHLA
#pragma once
#define DtDECLARE_TEST_ATTR_DECODER(attrName) \
DtDECLARE_ATTR_DECODER(TestStateRepository, attrName)
#define DtDEFINE_SIMPLE_TEST_ATTR_DECODER( \
attrName, netType, inspector) \
DtDEFINE_SIMPLE_TEST_ATTR_DECODER_WITH_CAST( \
attrName, netType, inspector, (netType))
#define DtDEFINE_SIMPLE_TEST_ATTR_DECODER_WITH_CAST( \
attrName, netType, mutator, castExpr) \
DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
TestDecoder, TestStateRepository, \
attrName, netType, mutator, castExpr)
class TestDecoder : public DtHlaStateDecoder
{
public:
TestDecoder(
DtObjClassDesc* classDesc);
virtual ~TestDecoder();
protected:
DtDECLARE_TEST_ATTR_DECODER(
Number);
DtDECLARE_TEST_ATTR_DECODER(Vector);
};
#endif
#if DtHLA
#include "testDec.h"
TestDecoder::TestDecoder(
DtObjClassDesc* classDesc) :
DtHlaStateDecoder(exConn, classDesc)
{
DtADD_ATTR_DECODER(Vector);
}
TestDecoder::~TestDecoder()
{
}
DtDEFINE_SIMPLE_TEST_ATTR_DECODER(Vector,
DtNet64Vector, setVector);
#endif