// DO NOT MODIFY THIS FILE, IT HAS BEEN GENERATED.
// File generated by Quazal DDL Compiler, Version 4.1 [SP2] (Build 1224.83)
// Copyright (C) 1998-2004, Quazal Technologies Inc.

#include "TTLPCH.h"
#include <NetZ.h>
#include "NetZTTL/DOCombatantDDL.h"
#include "NetZTTL/DOCombatant.h"
BEGIN_NAMESPACE_QUAZAL;

_DOC_ImplementSomeGeneralMethods(DOCombatant)
_PR_userdo_derived_impl(DOCombatant,DOActor);
_PR_globaldo_derived_impl(DOCombatant,DOActor);

_DOC_DOCombatant::_DOC_DOCombatant(qUnsignedInt32 uiClassID):
	DOClassTemplate<DOCLASS(DOCombatant), _DOC_DOActor>(uiClassID) {
}

bool _DOC_DOCombatant::IsAKindOf(DOClassID idDOCID) {
	if(DOCLASSID(DOCombatant) == idDOCID) return true;
	return _DOC_DOActor::IsAKindOf(idDOCID);
}
void _DOC_DOCombatant::DataSetsOperation(qUnsignedInt32 uiOp) {
	_DOC_DOActor::DataSetsOperation(uiOp);
	_DOC_RegisterProtocol(7,_PR_basic_update_protocol_protodecl( _DSDECL_DSGroundFollower ));
	typedef DeadReckoningFilter<_DSDECL_DSGroundFollower,_PR_DRGroundFollower_model(DSGroundFollower)> Filter_DSGroundFollower_DRGroundFollower;
	_DOC_RegisterFilter(7,Filter_DSGroundFollower_DRGroundFollower);
	_DOC_RegisterProtocol(8,_PR_basic_update_protocol_protodecl( _DSDECL_DSCombatantMode ));
	_DOC_RegisterFilter(8,_PR_upon_request_filter_filterdecl( _DSDECL_DSCombatantMode ));
	_DOC_RegisterProtocol(9,_PR_basic_update_protocol_protodecl( _DSDECL_DSParticipant ));
	_DOC_RegisterFilter(9,_PR_upon_request_filter_filterdecl( _DSDECL_DSParticipant ));
	_DOC_RegisterProtocol(10,_PR_basic_update_protocol_protodecl( _DSDECL_DSPathFollower ));
	typedef DeadReckoningFilter<_DSDECL_DSPathFollower,_PR_DRPathFollower_model(DSPathFollower)> Filter_DSPathFollower_DRPathFollower;
	_DOC_RegisterFilter(10,Filter_DSPathFollower_DRPathFollower);
	_DOC_RegisterProtocol(11,_PR_extrapolation_filter_protodecl( _DSDECL_DSCombatantState ));
	_DSDECL_DSGroundFollower::RegisterCounters(uiOp);
	_DSDECL_DSCombatantMode::RegisterCounters(uiOp);
	_DSDECL_DSParticipant::RegisterCounters(uiOp);
	_DSDECL_DSPathFollower::RegisterCounters(uiOp);
	_DSDECL_DSCombatantState::RegisterCounters(uiOp);
};
qBool _DOC_DOCombatant::FormatVariableValue(const DuplicatedObject *pDO, Variable *pDataset, Variable *pVariable, NS_QUAZAL String *pstrResult) const {
	_DOC_FormatMatchingVariableValue(DOCombatant,d_coordinates);
	_DOC_FormatMatchingVariableValue(DOCombatant,d_mode);
	_DOC_FormatMatchingVariableValue(DOCombatant,d_participant);
	_DOC_FormatMatchingVariableValue(DOCombatant,d_path);
	_DOC_FormatMatchingVariableValue(DOCombatant,d_state);
	return _DOC_DOActor::FormatVariableValue(pDO, pDataset, pVariable, pstrResult);
}

bool _DOC_DOCombatant::DispatchAction(DuplicatedObject* pDO, MethodID idMethod, Message* pMsg) {
	return _DOC_DOActor::DispatchAction(pDO, idMethod, pMsg);
}

bool _DOC_DOCombatant::DispatchRMCCall(CallMethodOperation* pContext) {
	return _DOC_DOActor::DispatchRMCCall(pContext);
}

bool _DOC_DOCombatant::DispatchRMCResult(RMCContext* pContext) {
	return _DOC_DOActor::DispatchRMCResult(pContext);
}


void _DOC_DOCombatant::FillDupSpacesInfo(DupSpace::Role eRole, DupSpace::ID* pArray, qUnsignedInt* puiIndex) {
	_DOC_DOActor::FillDupSpacesInfo(eRole, pArray, puiIndex);
}


_DO_DOCombatant::_DO_DOCombatant()  {_DO_InitDO(DOCombatant);}

_DO_ImplementSomeGeneralMethods(DOCombatant);



void _DO_DOCombatant::RegisterDatasets() {
	_DO_RegisterDataset(d_coordinates);
	_DO_RegisterDataset(d_mode);
	_DO_RegisterDataset(d_participant);
	_DO_RegisterDataset(d_path);
	_DO_RegisterDataset(d_state);
}

void _DO_DOCombatant::SpecificAddDSToDiscoveryMessage(Message* pMsg, Station* pStation) {
	_DO_DSAddToDiscovery(d_coordinates,pStation,7);
	_DO_DSAddToDiscovery(d_mode,pStation,8);
	_DO_DSAddToDiscovery(d_participant,pStation,9);
	_DO_DSAddToDiscovery(d_path,pStation,10);
	_DO_DSAddToDiscovery(d_state,pStation,11);
	DOActor::SpecificAddDSToDiscoveryMessage(pMsg, pStation);
}

void _DO_DOCombatant::SpecificExtractDSFromDiscoveryMessage(Message* pMsg) {
	_DO_DSExtractFromDiscovery(d_coordinates,7);
	_DO_DSExtractFromDiscovery(d_mode,8);
	_DO_DSExtractFromDiscovery(d_participant,9);
	_DO_DSExtractFromDiscovery(d_path,10);
	_DO_DSExtractFromDiscovery(d_state,11);
	DOActor::SpecificExtractDSFromDiscoveryMessage(pMsg);
}

void _DO_DOCombatant::CallOperationOnDatasets(DOOperation* pOperation, Operation::Event eEvent) {
	_DO_CallOperationOnDataset(d_coordinates,7);
	_DO_CallOperationOnDataset(d_mode,8);
	_DO_CallOperationOnDataset(d_participant,9);
	_DO_CallOperationOnDataset(d_path,10);
	_DO_CallOperationOnDataset(d_state,11);
	DOActor::CallOperationOnDatasets(pOperation,eEvent);
}

bool _DO_DOCombatant::SpecificUpdate(DataSet *pDataset, const Time& tUpdateTime) {
	_DO_DatasetUpdate(d_coordinates,7);
	_DO_DatasetUpdate(d_mode,8);
	_DO_DatasetUpdate(d_participant,9);
	_DO_DatasetUpdate(d_path,10);
	_DO_DatasetUpdate(d_state,11);
	return DOActor::SpecificUpdate(pDataset, tUpdateTime);
}

bool _DO_DOCombatant::SpecificRefresh(DataSet *pDataset, const Time& tRefreshTime) {
	_DO_DataSetRefresh(d_coordinates);
	_DO_DataSetRefresh(d_mode);
	_DO_DataSetRefresh(d_participant);
	_DO_DataSetRefresh(d_path);
	_DO_DataSetRefresh(d_state);
	return DOActor::SpecificRefresh(pDataset, tRefreshTime);
}

bool _DO_DOCombatant::SpecificExtractADataset(Message* pMsg, qByte byDatasetIndex) { 

	switch (byDatasetIndex) {
		_DO_DSExtract(d_coordinates,7);
		_DO_DSExtract(d_mode,8);
		_DO_DSExtract(d_participant,9);
		_DO_DSExtract(d_path,10);
		_DO_DSExtract(d_state,11);
	}
	return DOActor::SpecificExtractADataset(pMsg, byDatasetIndex);
}

END_NAMESPACE_QUAZAL;
