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, bool makeBuiltin)
 operator GUID_t ()

Static Public Member Functions

static GUID_t create ()

Private Attributes

GUID_t guid_cxx_
GUID_tguid_

Detailed Description

Definition at line 22 of file GuidBuilder.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file GuidBuilder.cpp.

00035   : guid_cxx_(create())
00036   , guid_(guid_cxx_)
00037 {
00038 }

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

Definition at line 40 of file GuidBuilder.cpp.

00041   : guid_cxx_()
00042   , guid_(guid)
00043 {
00044 }

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

Definition at line 46 of file GuidBuilder.cpp.

00047 {
00048 }


Member Function Documentation

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

Definition at line 51 of file GuidBuilder.cpp.

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

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

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

Here is the caller graph for this function:

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

Definition at line 14 of file GuidBuilder.inl.

References entityKey(), and entityKind().

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

Here is the call graph for this function:

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

Definition at line 90 of file GuidBuilder.cpp.

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

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

00091 {
00092   guid_.entityId = entityId;
00093 }

Here is the caller graph for this function:

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

Definition at line 96 of file GuidBuilder.cpp.

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

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

00097 {
00098   fill_guid(guid_.entityId.entityKey, entityKey, 3);
00099 }

Here is the caller graph for this function:

void OpenDDS::DCPS::GuidBuilder::entityKind ( EntityKind  kind,
bool  makeBuiltin 
)

Definition at line 108 of file GuidBuilder.cpp.

References OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::EntityId_t::entityKind, OpenDDS::DCPS::ENTITYKIND_BUILTIN_READER_WITH_KEY, OpenDDS::DCPS::ENTITYKIND_BUILTIN_TOPIC, OpenDDS::DCPS::ENTITYKIND_BUILTIN_WRITER_WITH_KEY, 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_BUILTIN_READER, OpenDDS::DCPS::KIND_BUILTIN_TOPIC, OpenDDS::DCPS::KIND_BUILTIN_WRITER, 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.

00109 {
00110   switch (kind) {
00111 
00112   // User Entities
00113 
00114   case KIND_WRITER:
00115     guid_.entityId.entityKind = makeBuiltin ?
00116       ENTITYKIND_BUILTIN_WRITER_WITH_KEY : ENTITYKIND_USER_WRITER_WITH_KEY;
00117     break;
00118 
00119   case KIND_READER:
00120     guid_.entityId.entityKind = makeBuiltin ?
00121       ENTITYKIND_BUILTIN_READER_WITH_KEY : ENTITYKIND_USER_READER_WITH_KEY;
00122     break;
00123 
00124   case KIND_TOPIC:
00125     guid_.entityId.entityKind = makeBuiltin ?
00126       ENTITYKIND_BUILTIN_TOPIC : ENTITYKIND_OPENDDS_TOPIC;
00127     break;
00128 
00129   // Builtin Entities
00130 
00131   case KIND_BUILTIN_WRITER:
00132     guid_.entityId.entityKind = ENTITYKIND_BUILTIN_WRITER_WITH_KEY;
00133     break;
00134 
00135   case KIND_BUILTIN_READER:
00136     guid_.entityId.entityKind = ENTITYKIND_BUILTIN_READER_WITH_KEY;
00137     break;
00138 
00139   case KIND_BUILTIN_TOPIC:
00140     guid_.entityId.entityKind = ENTITYKIND_BUILTIN_TOPIC;
00141     break;
00142 
00143   // OpenDDS specific Publisher Guid values
00144   case KIND_PUBLISHER:
00145     guid_.entityId.entityKind =
00146       ENTITYKIND_OPENDDS_PUBLISHER;
00147     break;
00148 
00149   // OpenDDS specific Subscriber Guid values
00150   case KIND_SUBSCRIBER:
00151     guid_.entityId.entityKind =
00152       ENTITYKIND_OPENDDS_SUBSCRIBER;
00153     break;
00154 
00155   // OpenDDS specific other Guid values
00156   case KIND_USER:
00157     guid_.entityId.entityKind =
00158       ENTITYKIND_OPENDDS_USER;
00159     break;
00160 
00161   default:
00162     guid_.entityId.entityKind =
00163       ENTITYKIND_USER_UNKNOWN;
00164   }
00165 }

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

Definition at line 102 of file GuidBuilder.cpp.

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

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

00103 {
00104   guid_.entityId.entityKind = entityKind;
00105 }

Here is the caller graph for this function:

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

Definition at line 72 of file GuidBuilder.cpp.

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

00073 {
00074   fill_guid(guid_.guidPrefix, p0, 4);
00075 }

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

Definition at line 78 of file GuidBuilder.cpp.

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

Referenced by OpenDDS::DCPS::RepoIdBuilder::federationId().

00079 {
00080   fill_guid(guid_.guidPrefix + 4, p1, 4);
00081 }

Here is the caller graph for this function:

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

Definition at line 84 of file GuidBuilder.cpp.

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

Referenced by OpenDDS::DCPS::RepoIdBuilder::participantId().

00085 {
00086   fill_guid(guid_.guidPrefix + 8, p2, 4);
00087 }

Here is the caller graph for this function:

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

Definition at line 21 of file GuidBuilder.inl.

References guid_.

00022 {
00023   return guid_;
00024 }


Member Data Documentation

Definition at line 46 of file GuidBuilder.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1