InstanceHandle.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef DCPS_INSTANCEHANDLE_H
00009 #define DCPS_INSTANCEHANDLE_H
00010 
00011 #include "ace/Atomic_Op_T.h"
00012 #include "ace/Thread_Mutex.h"
00013 
00014 #include "dds/DdsDcpsInfrastructureC.h"
00015 
00016 #include "dcps_export.h"
00017 
00018 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00019 
00020 namespace OpenDDS {
00021 namespace DCPS {
00022 
00023 const DDS::InstanceHandle_t HANDLE_UNKNOWN(0);
00024 
00025 class OpenDDS_Dcps_Export InstanceHandleGenerator {
00026 public:
00027   explicit InstanceHandleGenerator(long begin = HANDLE_UNKNOWN);
00028 
00029   ~InstanceHandleGenerator();
00030 
00031   DDS::InstanceHandle_t next();
00032 
00033 private:
00034   ACE_Atomic_Op<ACE_Thread_Mutex, long> sequence_;
00035 };
00036 
00037 } // namespace DCPS
00038 } // namespace OpenDDS
00039 
00040 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00041 
00042 #endif /* DCPS_INSTANCEHANDLE_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1