OpenDDS::DCPS::GuidBuilder Class Reference

#include <GuidBuilder.h>

Inheritance diagram for OpenDDS::DCPS::GuidBuilder:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::GuidBuilder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GuidBuilder ()
 GuidBuilder (GUID_t &guid)
 ~GuidBuilder ()
void guidPrefix0 (long p0)
void guidPrefix1 (long p1)
void guidPrefix2 (long p2)
void entityId (EntityId_t entityId)
void entityId (long entityId)
void entityKey (long entityKey)
void entityKind (CORBA::Octet entityKind)
void entityKind (EntityKind kind)
 operator GUID_t ()

Static Public Member Functions

static GUID_t create ()

Private Attributes

GUID_t guid_cxx_
GUID_tguid_

Detailed Description

Definition at line 20 of file GuidBuilder.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::GuidBuilder::GuidBuilder (  ) 

Definition at line 32 of file GuidBuilder.cpp.

00033   : guid_cxx_(create())
00034   , guid_(guid_cxx_)
00035 {
00036 }

OpenDDS::DCPS::GuidBuilder::GuidBuilder ( GUID_t guid  )  [explicit]

Definition at line 38 of file GuidBuilder.cpp.

00039   : guid_cxx_()
00040   , guid_(guid)
00041 {
00042 }

OpenDDS::DCPS::GuidBuilder::~GuidBuilder (  ) 

Definition at line 44 of file GuidBuilder.cpp.

00045 {
00046 }


Member Function Documentation

GUID_t OpenDDS::DCPS::GuidBuilder::create (  )  [static]

Definition at line 49 of file GuidBuilder.cpp.

References OpenDDS::DCPS::ENTITYID_UNKNOWN, and OpenDDS::DCPS::VENDORID_OCI.

Referenced by OpenDDS::DCPS::InfoRepoDiscovery::bit_key_to_repo_id().

00050 {
00051   GUID_t guid = {
00052     { VENDORID_OCI[0],
00053       VENDORID_OCI[1],
00054       0,
00055       0,
00056       0,
00057       0,
00058       0,
00059       0,
00060       0,
00061       0,
00062       0,
00063       0
00064     }, ENTITYID_UNKNOWN
00065   };
00066   return guid;
00067 }

ACE_INLINE void OpenDDS::DCPS::GuidBuilder::entityId ( long  entityId  ) 

Definition at line 12 of file GuidBuilder.inl.

References entityKey(), and entityKind().

00013 {
00014   entityKey(entityId >> 8);
00015   entityKind(static_cast<CORBA::Octet>(0xff & entityId));
00016 }

void OpenDDS::DCPS::GuidBuilder::entityId ( EntityId_t  entityId  ) 

Definition at line 88 of file GuidBuilder.cpp.

References OpenDDS::DCPS::GUID_t::entityId, and guid_.

Referenced by OpenDDS::DCPS::InfoRepoDiscovery::bit_key_to_repo_id(), RepoIdGenerator::next(), and OpenDDS::DCPS::operator>>().

00089 {
00090   guid_.entityId = entityId;
00091 }

void OpenDDS::DCPS::GuidBuilder::entityKey ( long  entityKey  ) 

Definition at line 94 of file GuidBuilder.cpp.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKey, fill_guid(), and guid_.

Referenced by entityId(), RepoIdGenerator::next(), and OpenDDS::DCPS::DomainParticipantImpl::RepoIdSequence::next().

00095 {
00096   fill_guid(guid_.entityId.entityKey, entityKey, 3);
00097 }

void OpenDDS::DCPS::GuidBuilder::entityKind ( EntityKind  kind  ) 

Definition at line 106 of file GuidBuilder.cpp.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_OPENDDS_PUBLISHER, OpenDDS::DCPS::ENTITYKIND_OPENDDS_SUBSCRIBER, OpenDDS::DCPS::ENTITYKIND_OPENDDS_TOPIC, OpenDDS::DCPS::ENTITYKIND_OPENDDS_USER, OpenDDS::DCPS::ENTITYKIND_USER_READER_WITH_KEY, OpenDDS::DCPS::ENTITYKIND_USER_UNKNOWN, OpenDDS::DCPS::ENTITYKIND_USER_WRITER_WITH_KEY, guid_, OpenDDS::DCPS::KIND_PUBLISHER, OpenDDS::DCPS::KIND_READER, OpenDDS::DCPS::KIND_SUBSCRIBER, OpenDDS::DCPS::KIND_TOPIC, OpenDDS::DCPS::KIND_USER, and OpenDDS::DCPS::KIND_WRITER.

00107 {
00108   switch (kind) {
00109   case KIND_WRITER:
00110     guid_.entityId.entityKind =
00111       ENTITYKIND_USER_WRITER_WITH_KEY;
00112     break;
00113 
00114   case KIND_READER:
00115     guid_.entityId.entityKind =
00116       ENTITYKIND_USER_READER_WITH_KEY;
00117     break;
00118 
00119   case KIND_TOPIC:
00120     guid_.entityId.entityKind =
00121       ENTITYKIND_OPENDDS_TOPIC;
00122     break;
00123 
00124   // OpenDDS specific Publisher Guid values
00125   case KIND_PUBLISHER:
00126     guid_.entityId.entityKind =
00127       ENTITYKIND_OPENDDS_PUBLISHER;
00128     break;
00129 
00130   // OpenDDS specific Subscriber Guid values
00131   case KIND_SUBSCRIBER:
00132     guid_.entityId.entityKind =
00133       ENTITYKIND_OPENDDS_SUBSCRIBER;
00134     break;
00135 
00136   // OpenDDS specific other Guid values
00137   case KIND_USER:
00138     guid_.entityId.entityKind =
00139       ENTITYKIND_OPENDDS_USER;
00140     break;
00141 
00142   default:
00143     guid_.entityId.entityKind =
00144       ENTITYKIND_USER_UNKNOWN;
00145   }
00146 }

void OpenDDS::DCPS::GuidBuilder::entityKind ( CORBA::Octet  entityKind  ) 

Definition at line 100 of file GuidBuilder.cpp.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKind, and guid_.

Referenced by entityId(), and RepoIdGenerator::next().

00101 {
00102   guid_.entityId.entityKind = entityKind;
00103 }

void OpenDDS::DCPS::GuidBuilder::guidPrefix0 ( long  p0  ) 

Definition at line 70 of file GuidBuilder.cpp.

References fill_guid(), guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.

Referenced by OpenDDS::DCPS::operator>>().

00071 {
00072   fill_guid(guid_.guidPrefix, p0, 4);
00073 }

void OpenDDS::DCPS::GuidBuilder::guidPrefix1 ( long  p1  ) 

Definition at line 76 of file GuidBuilder.cpp.

References fill_guid(), guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.

Referenced by OpenDDS::DCPS::RepoIdBuilder::federationId(), and OpenDDS::DCPS::operator>>().

00077 {
00078   fill_guid(guid_.guidPrefix + 4, p1, 4);
00079 }

void OpenDDS::DCPS::GuidBuilder::guidPrefix2 ( long  p2  ) 

Definition at line 82 of file GuidBuilder.cpp.

References fill_guid(), guid_, and OpenDDS::DCPS::GUID_t::guidPrefix.

Referenced by OpenDDS::DCPS::operator>>(), and OpenDDS::DCPS::RepoIdBuilder::participantId().

00083 {
00084   fill_guid(guid_.guidPrefix + 8, p2, 4);
00085 }

ACE_INLINE OpenDDS::DCPS::GuidBuilder::operator GUID_t (  ) 

Definition at line 19 of file GuidBuilder.inl.

References guid_.

00020 {
00021   return guid_;
00022 }


Member Data Documentation

GUID_t& OpenDDS::DCPS::GuidBuilder::guid_ [private]

Definition at line 45 of file GuidBuilder.h.

Referenced by entityId(), entityKey(), entityKind(), guidPrefix0(), guidPrefix1(), guidPrefix2(), and operator GUID_t().

GUID_t OpenDDS::DCPS::GuidBuilder::guid_cxx_ [private]

Definition at line 44 of file GuidBuilder.h.


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:18 2016 for OpenDDS by  doxygen 1.4.7