MAK RTIspy API Documentation for HLA 1516
subObjMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: subObjMsg.h,v $ $Revision: 1.18 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtSubObjMsg_H_
00013 #define DtSubObjMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netSubObjMsg.h"
00017 #include "attrHandSet.h"
00018 
00019 class DtConnectionMgr;
00020 class DtSubObjMsg;
00021 typedef void (*DtSubObjCb)(const DtSubObjMsg& inter, void* usr);
00022 
00023 class DT_DLL_LRC DtSubObjMsg : public DtRtiMsg
00024 {
00025 public:
00026 
00028    DtSubObjMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00029 
00030    DtSubObjMsg(
00031       DtObjectClassHandle theObj,
00032       bool isPassiveValue,
00033       bool replacementValue,
00034       const DtAttributeHandleSet& theSet,
00035       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00036 
00038    DtSubObjMsg(const DtNetSubObjMsg* netRepMsg,
00039       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00040 
00042    virtual ~DtSubObjMsg();
00043 
00045    virtual DtRtiMsg* clone(bool copy = true) const; 
00046 
00048    virtual void set(
00049       DtObjectClassHandle theObj,
00050       bool isPassiveValue,
00051       bool replacementValue,
00052       const DtAttributeHandleSet& theSet);
00053 
00055    virtual void setObjectClassHandle(DtObjectClassHandle hand);
00056    virtual DtObjectClassHandle objectClassHandle() const;
00057 
00059    virtual void setIsPassive(bool isPassiveValue);
00060    virtual bool isPassive() const;
00061 
00064    virtual void setReplacement(bool replacementValue);
00065    virtual bool replacement() const;
00066 
00068    virtual void setAttrHandles(const DtAttributeHandleSet& attrs);
00069    virtual const DtAttributeHandleSet& attrHandles() const;
00070 
00072    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00073 
00074 public:
00075 
00077    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00078       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00079 
00081    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00082 
00084    static void addCallback(DtConnectionMgr *conn,
00085       DtSubObjCb cb, void *usr, bool isMomCallback=false);
00086    static void removeCallback(DtConnectionMgr *conn,
00087       DtSubObjCb cb, void *usr, bool isMomCallback=false);
00088 
00089 protected:
00090 
00092    virtual DtNetSubObjMsg* netSubObjMsg();
00093    virtual const DtNetSubObjMsg* netSubObjMsg() const;
00094 
00096    virtual DtRtiMsgKind internalDtRtiMsgKind();
00097 
00099    virtual int minSize() const;
00100 
00102    virtual DtSubObjMsg* self() const;
00103 
00104 protected:
00105 
00106    int myDirty;
00107    DtAttributeHandleSet* myAttrs;
00108 };
00109 
00110 
00111 inline DtSubObjMsg* DtSubObjMsg::self() const
00112 {
00113    return const_cast<DtSubObjMsg*>( this );
00114 }
00115 
00116 #endif
00117 

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)