// 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/DOPlayerAgentDDL.h"
#include "NetZTTL/DOPlayerAgent.h"
BEGIN_NAMESPACE_QUAZAL;

_DOC_ImplementSomeGeneralMethods(DOPlayerAgent)
_PR_userdo_derived_impl(DOPlayerAgent,DOTalker);
_PR_globaldo_derived_impl(DOPlayerAgent,DOTalker);

_DOC_DOPlayerAgent::_DOC_DOPlayerAgent(qUnsignedInt32 uiClassID):
	DOClassTemplate<DOCLASS(DOPlayerAgent), _DOC_DOTalker>(uiClassID) {
}

bool _DOC_DOPlayerAgent::IsAKindOf(DOClassID idDOCID) {
	if(DOCLASSID(DOPlayerAgent) == idDOCID) return true;
	return _DOC_DOTalker::IsAKindOf(idDOCID);
}
void _DOC_DOPlayerAgent::DataSetsOperation(qUnsignedInt32 uiOp) {
	_DOC_DOTalker::DataSetsOperation(uiOp);
	_DOC_RegisterProtocol(2,_PR_basic_update_protocol_protodecl( _DSDECL_DSAgent ));
	_DOC_RegisterFilter(2,_PR_upon_request_filter_filterdecl( _DSDECL_DSAgent ));
	_DOC_RegisterProtocol(3,_PR_basic_update_protocol_protodecl( _DSDECL_DSAppearance ));
	_DOC_RegisterFilter(3,_PR_upon_request_filter_filterdecl( _DSDECL_DSAppearance ));
	_DOC_RegisterProtocol(4,_PR_basic_update_protocol_protodecl( _DSDECL_DSLevel ));
	_DOC_RegisterFilter(4,_PR_upon_request_filter_filterdecl( _DSDECL_DSLevel ));
	_DOC_RegisterProtocol(5,_PR_basic_update_protocol_protodecl( _DSDECL_DSParticipant ));
	_DOC_RegisterFilter(5,_PR_upon_request_filter_filterdecl( _DSDECL_DSParticipant ));
	_DOC_RegisterProtocol(6,_PR_basic_update_protocol_protodecl( _DSDECL_DSProfile ));
	_DOC_RegisterFilter(6,_PR_constant_filterdecl( _DSDECL_DSProfile ));
	_DOC_RegisterProtocol(7,_PR_basic_update_protocol_protodecl( _DSDECL_DSStats ));
	_DOC_RegisterFilter(7,_PR_upon_request_filter_filterdecl( _DSDECL_DSStats ));
	_DSDECL_DSAgent::RegisterCounters(uiOp);
	_DSDECL_DSAppearance::RegisterCounters(uiOp);
	_DSDECL_DSLevel::RegisterCounters(uiOp);
	_DSDECL_DSParticipant::RegisterCounters(uiOp);
	_DSDECL_DSProfile::RegisterCounters(uiOp);
	_DSDECL_DSStats::RegisterCounters(uiOp);
};
qBool _DOC_DOPlayerAgent::FormatVariableValue(const DuplicatedObject *pDO, Variable *pDataset, Variable *pVariable, NS_QUAZAL String *pstrResult) const {
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_agent);
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_appearance);
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_level);
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_participant);
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_profile);
	_DOC_FormatMatchingVariableValue(DOPlayerAgent,d_stats);
	return _DOC_DOTalker::FormatVariableValue(pDO, pDataset, pVariable, pstrResult);
}

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

bool _DOC_DOPlayerAgent::DispatchRMCCall(CallMethodOperation* pContext) {
	return _DOC_DOTalker::DispatchRMCCall(pContext);
}

bool _DOC_DOPlayerAgent::DispatchRMCResult(RMCContext* pContext) {
	return _DOC_DOTalker::DispatchRMCResult(pContext);
}


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


_DO_DOPlayerAgent::_DO_DOPlayerAgent()  {_DO_InitDO(DOPlayerAgent);}

_DO_ImplementSomeGeneralMethods(DOPlayerAgent);



void _DO_DOPlayerAgent::RegisterDatasets() {
	_DO_RegisterDataset(d_agent);
	_DO_RegisterDataset(d_appearance);
	_DO_RegisterDataset(d_level);
	_DO_RegisterDataset(d_participant);
	_DO_RegisterDataset(d_profile);
	_DO_RegisterDataset(d_stats);
}

void _DO_DOPlayerAgent::SpecificAddDSToDiscoveryMessage(Message* pMsg, Station* pStation) {
	_DO_DSAddToDiscovery(d_agent,pStation,2);
	_DO_DSAddToDiscovery(d_appearance,pStation,3);
	_DO_DSAddToDiscovery(d_level,pStation,4);
	_DO_DSAddToDiscovery(d_participant,pStation,5);
	_DO_DSAddToDiscovery(d_profile,pStation,6);
	_DO_DSAddToDiscovery(d_stats,pStation,7);
	DOTalker::SpecificAddDSToDiscoveryMessage(pMsg, pStation);
}

void _DO_DOPlayerAgent::SpecificExtractDSFromDiscoveryMessage(Message* pMsg) {
	_DO_DSExtractFromDiscovery(d_agent,2);
	_DO_DSExtractFromDiscovery(d_appearance,3);
	_DO_DSExtractFromDiscovery(d_level,4);
	_DO_DSExtractFromDiscovery(d_participant,5);
	_DO_DSExtractFromDiscovery(d_profile,6);
	_DO_DSExtractFromDiscovery(d_stats,7);
	DOTalker::SpecificExtractDSFromDiscoveryMessage(pMsg);
}

void _DO_DOPlayerAgent::CallOperationOnDatasets(DOOperation* pOperation, Operation::Event eEvent) {
	_DO_CallOperationOnDataset(d_agent,2);
	_DO_CallOperationOnDataset(d_appearance,3);
	_DO_CallOperationOnDataset(d_level,4);
	_DO_CallOperationOnDataset(d_participant,5);
	_DO_CallOperationOnDataset(d_profile,6);
	_DO_CallOperationOnDataset(d_stats,7);
	DOTalker::CallOperationOnDatasets(pOperation,eEvent);
}

bool _DO_DOPlayerAgent::SpecificUpdate(DataSet *pDataset, const Time& tUpdateTime) {
	_DO_DatasetUpdate(d_agent,2);
	_DO_DatasetUpdate(d_appearance,3);
	_DO_DatasetUpdate(d_level,4);
	_DO_DatasetUpdate(d_participant,5);
	_DO_DatasetUpdate(d_profile,6);
	_DO_DatasetUpdate(d_stats,7);
	return DOTalker::SpecificUpdate(pDataset, tUpdateTime);
}

bool _DO_DOPlayerAgent::SpecificRefresh(DataSet *pDataset, const Time& tRefreshTime) {
	_DO_DataSetRefresh(d_agent);
	_DO_DataSetRefresh(d_appearance);
	_DO_DataSetRefresh(d_level);
	_DO_DataSetRefresh(d_participant);
	_DO_DataSetRefresh(d_profile);
	_DO_DataSetRefresh(d_stats);
	return DOTalker::SpecificRefresh(pDataset, tRefreshTime);
}

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

	switch (byDatasetIndex) {
		_DO_DSExtract(d_agent,2);
		_DO_DSExtract(d_appearance,3);
		_DO_DSExtract(d_level,4);
		_DO_DSExtract(d_participant,5);
		_DO_DSExtract(d_profile,6);
		_DO_DSExtract(d_stats,7);
	}
	return DOTalker::SpecificExtractADataset(pMsg, byDatasetIndex);
}

END_NAMESPACE_QUAZAL;
