00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef DCPS_GUIDBUILDER_H 00009 #define DCPS_GUIDBUILDER_H 00010 00011 #include "dds/DdsDcpsGuidC.h" 00012 00013 #include "GuidUtils.h" 00014 00015 #include "dcps_export.h" 00016 00017 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00018 00019 namespace OpenDDS { 00020 namespace DCPS { 00021 00022 class OpenDDS_Dcps_Export GuidBuilder { 00023 public: 00024 GuidBuilder(); 00025 explicit GuidBuilder(GUID_t& guid); 00026 00027 ~GuidBuilder(); 00028 00029 static GUID_t create(); 00030 00031 void guidPrefix0(long p0); 00032 void guidPrefix1(long p1); 00033 void guidPrefix2(long p2); 00034 00035 void entityId(EntityId_t entityId); 00036 void entityId(long entityId); 00037 00038 void entityKey(long entityKey); 00039 00040 void entityKind(CORBA::Octet entityKind); 00041 void entityKind(EntityKind kind, bool makeBuiltin); 00042 00043 operator GUID_t(); 00044 00045 private: 00046 GUID_t guid_cxx_; 00047 GUID_t& guid_; 00048 }; 00049 00050 } // namespace DCPS 00051 } // namespace OpenDDS 00052 00053 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00054 00055 #ifdef __ACE_INLINE__ 00056 # include "GuidBuilder.inl" 00057 #endif /* __ACE_INLINE__ */ 00058 00059 #endif /* DCPS_GUIDBUILDER_H */