MAK RTIspy API Documentation for HLA Evolved
fedHandleSet.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: fedHandleSet.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtFederateHandleSet_H_
00013 #define DtFederateHandleSet_H_
00014 
00015 #include "rtiMsConfig.h"
00016 
00017 #ifdef DtIFSPEC1516
00018 #include "RTI/RTI1516.h"
00019 #include "internalTypes.h"
00020 
00021 class DT_DLL_LRC DtFederateHandleSet
00022 {
00023 public:
00025    DtFederateHandleSet(unsigned long count=1);
00026    DtFederateHandleSet(rti1516::FederateHandleSet const& handleSet);
00027 
00029    virtual ~DtFederateHandleSet();
00030    
00031    virtual unsigned long size() const;
00032 
00033    virtual rti1516::FederateHandleSet::const_iterator
00034       getConstIterator(unsigned long i) const;
00035    virtual rti1516::FederateHandleSet::iterator
00036       getIterator(unsigned long i);
00037 
00038    virtual DtFederateHandle getHandle(unsigned long i) const;
00039 
00040    virtual void add(DtFederateHandle h);
00041 
00042    virtual void remove(DtFederateHandle h);
00043    
00044    virtual void empty();
00045 
00046    virtual bool isMember(DtFederateHandle h) const;
00047 
00048    virtual rti1516::FederateHandleSet const& getImplementation() const;
00049 
00050 protected:
00051    rti1516::FederateHandleSet mySet;
00052 };
00053 
00054 #elif defined(DtIFSPEC1516E)
00055 #include "RTI/RTI1516.h"
00056 #include "internalTypes.h"
00057 
00058 class DT_DLL_LRC DtFederateHandleSet
00059 {
00060 public:
00062     DtFederateHandleSet(unsigned long count=1);
00063     DtFederateHandleSet(rti1516e::FederateHandleSet const& handleSet);
00064 
00066     virtual ~DtFederateHandleSet();
00067 
00068     virtual unsigned long size() const;
00069 
00070     virtual rti1516e::FederateHandleSet::const_iterator
00071         getConstIterator(unsigned long i) const;
00072     virtual rti1516e::FederateHandleSet::iterator
00073         getIterator(unsigned long i);
00074 
00075     virtual DtFederateHandle getHandle(unsigned long i) const;
00076 
00077     virtual void add(DtFederateHandle h);
00078 
00079     virtual void remove(DtFederateHandle h);
00080 
00081     virtual void empty();
00082 
00083     virtual bool isMember(DtFederateHandle h) const;
00084 
00085     virtual rti1516e::FederateHandleSet const& getImplementation() const;
00086 
00087 protected:
00088     rti1516e::FederateHandleSet mySet;
00089 };
00090 
00091 #else
00092 
00093 #ifdef DtIFSPEC13DLC
00094 #include "RTI13.h"
00095 #define RTI rti13
00096 #else
00097 #include "RTI.hh"
00098 #endif
00099 #include <vector>
00100 
00101 class DT_DLL_LRC DtFederateHandleSet : public RTI::FederateHandleSet
00102 {
00103 public:
00105    DtFederateHandleSet(RTI::ULong count = 1, bool allowSetToGrow=true);
00106 
00108    virtual ~DtFederateHandleSet();
00109    
00110    virtual RTI::ULong size() const;
00111 
00112    virtual RTI::FederateHandle getHandle(RTI::ULong i) const
00113       throw (
00114          RTI::ArrayIndexOutOfBounds);
00115 
00116    virtual void add(RTI::FederateHandle h)
00117       throw (
00118          RTI::ValueCountExceeded);
00119 
00120    virtual void remove(RTI::FederateHandle h)
00121       throw (
00122          RTI::ArrayIndexOutOfBounds);
00123    
00124    virtual void empty();
00125 
00126    virtual RTI::Boolean isMember(RTI::FederateHandle h) const;
00127 
00128 protected:
00129    
00130    RTI::ULong myMaxSize;
00131    
00132    std::vector< RTI::FederateHandle > myVals;
00133 
00134    bool myAllowSetToGrow;
00135 };
00136 
00137 #endif //! DtIFSPEC1516
00138 #endif //! DtFederateHandleSet_H_
00139 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)