MAK RTIspy API Documentation for HLA 1516
joinLightWeightMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: joinLightWeightMsg.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtJoinLightWeightMsg_H_
00013 #define DtJoinLightWeightMsg_H_
00014 
00015 #include "rtiMsg.h"
00016 #include "netRtiMsgHdr.h"
00017 #include "netJoinLightWeightMsg.h"
00018 #include <vlutil/vlString.h>
00019 #include <vlutil/vlUtil.h>
00020 #include <vlutil/vlInetAddr.h>
00021 
00022 class DtConnectionMgr;
00023 class DtJoinLightWeightMsg;
00024 typedef void (*DtJoinLightWeightCb)(const DtJoinLightWeightMsg& inter, void* usr);
00025 
00026 class DT_DLL_LRC DtJoinLightWeightMsg : public DtRtiMsg
00027 {
00028 public:
00029 
00031    DtJoinLightWeightMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00032 
00033    DtJoinLightWeightMsg(
00034       MAKRti::DtString const & fedTypeValue,
00035       MAKRti::DtString const & fedExNameValue,
00036       MAKRti::DtString const& fedNameValue,
00037       MAKRti::DtString const& federateHostNameValue,
00038       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039 
00041    DtJoinLightWeightMsg(const DtNetJoinLightWeightMsg* netRepMsg,
00042       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00043 
00045    virtual ~DtJoinLightWeightMsg();
00046 
00048    virtual DtRtiMsg* clone(bool copy = true) const; 
00049 
00051    virtual void set(
00052       MAKRti::DtString const & fedTypeValue,
00053       MAKRti::DtString const & fedExNameValue,
00054       MAKRti::DtString const & fedNameValue,
00055       MAKRti::DtString const& federateHostNameValue);
00056 
00058    virtual void setFederateType(MAKRti::DtString const & type);
00059 
00061    virtual MAKRti::DtString federateType() const;
00062 
00064    virtual void setFullFedExName(MAKRti::DtString const & name);
00065 
00067    virtual MAKRti::DtString fullFedExName() const;
00068 
00070    virtual void setFederateName(MAKRti::DtString const & name);
00071 
00073    virtual MAKRti::DtString federateName() const;
00074 
00076    virtual void setFederateHostName(MAKRti::DtString const& name);
00077 
00079    virtual MAKRti::DtString federateHostName() const;
00080 
00083    virtual void setIpAddress( const MAKRti::DtInetAddr& ip );
00084 
00086    virtual MAKRti::DtInetAddr ipAddress() const;
00087 
00089    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00090 
00091 public:
00092 
00094    static DtRtiMsg* create(const DtNetMsgHeader* initial,
00095       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00096 
00098    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00099 
00101    static void addCallback(DtConnectionMgr* conn,
00102       DtJoinLightWeightCb cb, void* usr);
00103    static void removeCallback(DtConnectionMgr* conn,
00104       DtJoinLightWeightCb cb, void* usr);
00105 
00106 protected:
00107 
00109    virtual DtNetJoinLightWeightMsg* netJoinLightWeightMsg();
00110    virtual const DtNetJoinLightWeightMsg* netJoinLightWeightMsg() const;
00111 
00113    virtual DtRtiMsgKind internalDtRtiMsgKind();
00114 
00116    virtual int minSize() const;
00117 
00121    virtual int setMinSizes( MAKRti::DtString const & federateType,
00122       MAKRti::DtString const & fedExName,
00123       MAKRti::DtString const & federateName,
00124       MAKRti::DtString const& federateHostName);
00125 
00127    virtual void setFederateTypeSize( unsigned long size );
00128    virtual unsigned long federateTypeSize() const;
00129 
00131    virtual void setFederateNameSize( unsigned long size );
00132    virtual unsigned long federateNameSize() const;
00133 
00135    virtual void setFedExNameSize( unsigned long size );
00136    virtual unsigned long fedExNameSize() const;
00137 
00139    virtual void setFederateHostNameSize( unsigned long size );
00140    virtual unsigned long federateHostNameSize() const;
00141 
00143    virtual const char* federateTypePtr() const;
00144    virtual const char* federateNamePtr() const;
00145    virtual const char* fedExNamePtr() const;
00146    virtual const char* federateHostNamePtr() const;
00147    
00148    //non-const versions
00149    virtual char* federateTypePtr();
00150    virtual char* federateNamePtr();
00151    virtual char* fedExNamePtr();
00152    virtual char* federateHostNamePtr();
00153 
00155    virtual DtJoinLightWeightMsg* self() const;
00156 
00157 };
00158 
00159 inline DtJoinLightWeightMsg* DtJoinLightWeightMsg::self() const
00160 {
00161    return const_cast<DtJoinLightWeightMsg*>( this );
00162 }
00163 
00164 #endif
00165 

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)