MAK RTIspy API Documentation for HLA 1516
notifyRegMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: notifyRegMsg.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef notifyRegMsg_H_
00010 #define notifyRegMsg_H_
00011 #ifdef DDM
00012 
00015 
00016 #include "rtiMsg.h"
00017 #include "netNotRegMsg.h"
00018 
00019 class DtConnectionMgr;
00020 class DtNotifyRegMsg;
00021 class DtRegionExtent;
00022 class DtNetExtent;
00023 class DtDistributedRegion;
00024 
00025 typedef void (*DtNotifyRegCb)(const DtNotifyRegMsg& msg, void* usr);
00026 
00031 class DT_DLL_LRC DtNotifyRegMsg : public DtRtiMsg
00032 {
00033 public:
00034 
00036    DtNotifyRegMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00037 
00039    DtNotifyRegMsg(const DtDistributedRegion &region,
00040       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00041 
00043    DtNotifyRegMsg(const DtNetNotifyRegMsg* netRepMsg,
00044       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00045 
00047    virtual ~DtNotifyRegMsg();
00048 
00050    virtual DtRtiMsg* clone(bool copy = true) const; 
00051 
00053    virtual void set(const DtDistributedRegion &region);
00054 
00056    virtual void setRegionHandle(DtRegionHandle handleValue);
00057    virtual DtRegionHandle regionHandle() const;
00058 
00060    virtual void setSpaceHandle(DtSpaceHandle handleValue);
00061    virtual DtSpaceHandle spaceHandle() const;
00062 
00064    virtual void setNumberExtents(unsigned long count);
00065    virtual unsigned long numberExtents() const;      
00066    
00068    virtual void setNumberDimensions(unsigned long count);
00069    virtual unsigned long numberDimensions() const;
00070 
00072    virtual void setExtents(const DtRegionExtent* extentList,
00073       unsigned long numExtents);
00074    virtual const DtRegionExtent* extents() const;
00075    
00077    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00078 
00079 public:
00080 
00082    static DtRtiMsg* create(const DtNetMsgHeader* initial, 
00083       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);    
00084 
00086    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00087 
00089    static void addCallback(DtConnectionMgr *conn, 
00090       DtNotifyRegCb cb, void *usr);
00091    static void removeCallback(DtConnectionMgr *conn, 
00092       DtNotifyRegCb cb, void *usr);
00093    
00094 protected:
00095    
00097    virtual DtNetExtent* netExtents();
00098 
00100    virtual void fillFromNetRep(
00101       DtNetExtent* netRepExtent,
00102       DtRegionExtent* extents,
00103       unsigned long numExtents) const;
00104 
00106    virtual void fillNetRep(
00107       const DtRegionExtent* extents,
00108       DtNetExtent* netRepExtent,
00109       unsigned long numExtents);
00110 
00112    virtual DtNetNotifyRegMsg* netNotifyRegMsg();
00113    virtual const DtNetNotifyRegMsg* netNotifyRegMsg() const;
00114 
00116    virtual DtRtiMsgKind internalDtRtiMsgKind();
00117 
00119    virtual int minSize(DtRegionExtent const* extentList=NULL,
00120       int numExtents=0) const;
00121 
00123    virtual DtNotifyRegMsg* self() const;
00124 
00125 protected:
00126 
00128    unsigned long myExtentCount;
00129 
00131    DtRegionExtent* myExtents;
00132 
00134    unsigned long myExtentSlotCount;
00135 
00137    bool myDirty;
00138 };
00139 
00140 
00141 inline DtNotifyRegMsg* DtNotifyRegMsg::self() const
00142 {
00143    return const_cast<DtNotifyRegMsg*>( this );
00144 }
00145 
00146 #endif
00147 #endif
00148 

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)