📄 pub_person.h
字号:
/**********************************************************************************
欢迎使用FFB-MOT对象模板V1.1
设计者:尹娟,龚建兴
Email:fj_gjx@yahoo.com
Phone:0731-4574996
日期 :2003.8.25
**********************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef FWPUB_PERSON_H_
#define FWPUB_PERSON_H_
#include "DataTypeDef.h"
#include "FWBaseClass.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//{{FW_OBJECT_INFOMATION_BEGIN
// OMT_NAME: Person
// OMT_PS: P
// OMT_DESCRIPTION:
//}}FW_OBJECT_INFOMATION_END
class CPub_Person : public CFWBaseClass
{
public:
CPub_Person();
//Attribute
public:
//{{FW_PUBLIC_OMT_ATTRIBUTE_VALUE_DECLARE_BEGIN <<----- Don't delete it!>>
// 聊天者年级
unsigned long m_age;
//
std::string m_real_name;
//
std::string m_user_name;
//}}FW_PUBLIC_OMT_ATTRIBUTE_VALUE_DECLARE_END <<----- Don't delete it!>>
private:
//{{FW_PRIVATE_OMT_ATTRIBUTE_FLAG_DECLARE_BEGIN <<----- Don't delete it!>>
RTI::Boolean ms_IsSendage;
RTI::Boolean ms_IsTransferage;
RTI::Boolean ms_IsOwnedage;
RTI::Boolean ms_IsSendreal_name;
RTI::Boolean ms_IsTransferreal_name;
RTI::Boolean ms_IsOwnedreal_name;
RTI::Boolean ms_IsSenduser_name;
RTI::Boolean ms_IsTransferuser_name;
RTI::Boolean ms_IsOwneduser_name;
//}}FW_PRIVATE_OMT_ATTRIBUTE_FLAG_DECLARE_END <<----- Don't delete it!>>
//{{FW_PRIVATE_STATIC_ATTRIBUTE_DECLARE_BEGIN <<----- Don't delete it!>>
static RTI::ObjectClassHandle ms_PersonId;
static char* ms_PersonStr;
static RTI::AttributeHandle ms_ageId;
static char* const ms_ageStr;
static RTI::AttributeHandle ms_real_nameId;
static char* const ms_real_nameStr;
static RTI::AttributeHandle ms_user_nameId;
static char* const ms_user_nameStr;
static CStringArray m_AttrNamesArray;
//}}FW_PRIVATE_STATIC_ATTRIBUTE_DECLARE_END <<----- Don't delete it!>>
//Method
public:
//{{FW_PUBLIC_VIRTUAL_METHOD_DECLARE_BEGIN <<----- Don't delete it!>>
virtual void CreateNVPSet(RTI::AttributeHandleValuePairSet *pAttributes, CStringArray &theAttrNames);
virtual void UpdateAttributeValues(CStringArray &upAttrNames, char *theTag = NULL);
virtual void UpdateAttributeValues(CStringArray &upAttrNames, RTIfedTime theTimeStamp, char *theTag = NULL);
virtual RTI::Boolean IsUpdate();
virtual void SetUpdateControl(RTI::Boolean updateFlag, const RTI::AttributeHandleSet &theAttrHandles);
virtual void ProvideUpdate(const RTI::AttributeHandleSet &theAttrHandles);
virtual void SetTransferOwnerFlag(RTI::Boolean transferFlag, const RTI::AttributeHandleSet &theAttrHandles);
virtual void SetOwnedAttrsFlag(RTI::Boolean ownedFlag, const RTI::AttributeHandleSet &theAttrHandles);
virtual unsigned long GetAttributeCount();
//}}FW_PUBLIC_VIRTUAL_METHOD_DECLARE_END <<----- Don't delete it!>>
//{{FW_PUBLIC_METHOD_DECLARE_BEGIN <<----- Don't delete it!>>
static void Init(const RTI::ObjectClassHandle &theObject = 0);
static RTI::ObjectClassHandle GetClassId();
static RTI::AttributeHandle FindAttributeHandle(CString theAttrName);
static RTI::AttributeHandleSet* GetAttributeHandleSet(CStringArray &theAttrNames);
static void Publishing();
static void Unpublished();
static CPub_Person* CreateAndRegisterObject(RTI::RTIambassador &theRtiAmb, char *theobjectName = NULL);
static void DestoryObjInst(CPub_Person* pObj, RTI::RTIambassador &theRtiAmb, char *theTag = NULL);
static void DestoryObjInst(CPub_Person* pObj, RTI::RTIambassador &theRtiAmb,
const RTI::FedTime& theTimeStamp, char *theTag = NULL);
void RegisterObject(char *theobjectName = NULL);
void Process(double time);
void ProcessReceiveInter(RTI::InteractionClassHandle theClass, const RTI::ParameterHandleValuePairSet &theParameters,
const char *tag = 0);
void ProcessReceiveInter(RTI::InteractionClassHandle theClass, const RTI::ParameterHandleValuePairSet &theParameters,
const RTI::FedTime &theFederateTime, const char *tag = 0);
//}}FW_PUBLIC_METHOD_DECLARE_END <<----- Don't delete it!>>
};
#endif //FWPUB_PERSON_H_
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -