00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ 00009 00010 #include "RepoIdConverter.h" 00011 00012 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00013 00014 namespace OpenDDS { 00015 namespace DCPS { 00016 00017 RepoIdConverter::RepoIdConverter(const RepoId& repoId) 00018 : GuidConverter(repoId) 00019 {} 00020 00021 RepoIdConverter::~RepoIdConverter() 00022 {} 00023 00024 OpenDDS::Federator::RepoKey 00025 RepoIdConverter::federationId() const 00026 { 00027 return guid_.guidPrefix[4] << 24 | 00028 guid_.guidPrefix[5] << 16 | 00029 guid_.guidPrefix[6] << 8 | 00030 guid_.guidPrefix[7]; 00031 } 00032 00033 ParticipantId 00034 RepoIdConverter::participantId() const 00035 { 00036 return guid_.guidPrefix[ 8] << 24 | 00037 guid_.guidPrefix[ 9] << 16 | 00038 guid_.guidPrefix[10] << 8 | 00039 guid_.guidPrefix[11]; 00040 } 00041 00042 } // namespace DCPS 00043 } // namespace OpenDDS 00044 00045 OPENDDS_END_VERSIONED_NAMESPACE_DECL