MAK RTIspy API Documentation for HLA 1.3
creRespMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: creRespMsg.h,v $ $Revision: 1.18 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtCreateResponseMsg_H_
00013 #define DtCreateResponseMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netRtiMsgHdr.h"
00017 #include "netCrRespMsg.h"
00018 
00019 class DtConnectionMgr;
00020 class DtCreateResponseMsg;
00021 typedef void (*DtCreateResponseCb)(const DtCreateResponseMsg& inter, void* usr);
00022 
00023 enum DtCreateResponseFlag
00024 {
00025    DtCRExecCreated,
00026    DtCRExecAlreadyExists,
00027    DtCRExecCouldNotOpenFed,
00028    DtCRExecCouldNotCreateTimeFactory,
00029    DtCRWaiting   
00030 };
00031 
00032 class DT_DLL_LRC DtCreateResponseMsg : public DtRtiMsg
00033 {
00034 public:
00035 
00037    DtCreateResponseMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00038 
00039    DtCreateResponseMsg(unsigned long ID,
00040       DtCreateResponseFlag flag,
00041       MAKRti::DtString const & errorString,
00042       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00043 
00045    DtCreateResponseMsg(const DtNetCreateResponseMsg* netRepMsg,
00046       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00047 
00049    virtual ~DtCreateResponseMsg();
00050 
00052    virtual DtRtiMsg* clone(bool copy = true) const; 
00053 
00055    virtual void set(unsigned long ID,
00056       DtCreateResponseFlag flag, MAKRti::DtString const & errorString);
00057 
00059    void setDestinationID( const unsigned long ID );
00060    const unsigned long destinationID() const;
00061 
00063    void setResponseFlag(DtCreateResponseFlag flag);
00064    DtCreateResponseFlag responseFlag() const;
00065 
00067    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00068 
00069 public:
00070 
00072    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00073       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00074 
00076    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00077 
00079    static void addCallback(DtConnectionMgr* conn,
00080       DtCreateResponseCb cb, void* usr);
00081    static void removeCallback(DtConnectionMgr* conn,
00082       DtCreateResponseCb cb, void* usr);
00083 
00084    void setErrorString( MAKRti::DtString const & errorStr );
00085    MAKRti::DtString errorString() const;
00086    char* errorStringPtr();
00087    const char* errorStringPtr() const;
00088    void setErrorStringSize( unsigned long size );
00089    unsigned long errorStringSize() const;
00090 
00091 protected:
00092 
00094    virtual DtNetCreateResponseMsg* netCreateResponseMsg();
00095    virtual const DtNetCreateResponseMsg* netCreateResponseMsg() const;
00096 
00098    virtual DtRtiMsgKind internalDtRtiMsgKind();
00099 
00101    virtual int minSize() const;
00102 
00104    virtual DtCreateResponseMsg* self() const;
00105 };
00106 
00107 
00108 inline DtCreateResponseMsg* DtCreateResponseMsg::self() const
00109 {
00110    return const_cast<DtCreateResponseMsg*>( this );
00111 }
00112 
00113 #endif
00114 

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)