MAK RTIspy API Documentation for HLA 1.3
discObjMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: discObjMsg.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtDiscObjMsg_H_
00013 #define DtDiscObjMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netDiscObjMsg.h"
00017 
00018 class DtConnectionMgr;
00019 class DtDiscObjMsg;
00020 
00021 typedef void (*DtDiscObjCb)(const DtDiscObjMsg& msg, void* usr);
00022 
00023 class DT_DLL_LRC DtDiscObjMsg : public DtRtiMsg
00024 {
00025 public:
00026 
00028    DtDiscObjMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00029 
00030    DtDiscObjMsg(
00031       DtObjectInstanceHandle objHandleValue,
00032       DtObjectClassHandle classHandleValue,
00033       DtFederateHandle owner,
00034       bool removeDiscoverValue,
00035       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00036 
00038    DtDiscObjMsg(const DtNetDiscObjMsg* netRepMsg,
00039       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00040 
00042    virtual ~DtDiscObjMsg();
00043 
00045    virtual DtRtiMsg* clone(bool copy = true) const; 
00046 
00048    virtual void set(
00049       DtObjectInstanceHandle objHandleValue,
00050       DtObjectClassHandle classHandleValue,
00051       DtFederateHandle owner,
00052       bool removeDiscoverValue);
00053 
00055    virtual void setObjHandle(DtObjectInstanceHandle objHandle);
00056    virtual void setObjHandles(const std::set<DtObjectInstanceHandle>& objHandles);
00057    virtual void getObjHandles(std::vector<DtObjectInstanceHandle>& objHandles) const;
00058 
00060    virtual void setClassHandle(DtObjectClassHandle hand);
00061    virtual DtObjectClassHandle classHandle() const;
00062 
00065    virtual void setOwnerHandle(DtFederateHandle owner);
00066    virtual DtFederateHandle ownerHandle() const;
00067 
00071    virtual void setRemoveDiscover(bool removeDiscoverValue);
00072    virtual bool removeDiscover() const;
00073 
00075    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00076 
00077 public:
00078 
00080    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00081       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00082 
00084    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00085 
00087    static void addCallback(DtConnectionMgr *conn,
00088       DtDiscObjCb cb, void *usr);
00089    static void removeCallback(DtConnectionMgr *conn,
00090       DtDiscObjCb cb, void *usr);
00091 
00092 protected:
00093 
00095    virtual DtNetDiscObjMsg* netDiscObjMsg();
00096    virtual const DtNetDiscObjMsg* netDiscObjMsg() const;
00097 
00099    virtual DtRtiMsgKind internalDtRtiMsgKind();
00100 
00102    virtual int minSize() const;
00103 
00105    virtual void setObjHandleCount( unsigned long count );
00106    virtual unsigned long objHandleCount() const;
00107 
00109    virtual const DtNetU32* objHandlesPtr() const;
00110    virtual DtNetU32* objHandlesPtr();
00111 
00112 
00114    virtual DtDiscObjMsg* self() const;
00115 };
00116 
00117 
00118 inline DtDiscObjMsg* DtDiscObjMsg::self() const
00119 {
00120    return const_cast<DtDiscObjMsg*>( this );
00121 }
00122 
00123 #endif
00124 

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)