我应该如何定义FundamentalOperationalData
?什么是FundamentalOperationalData_MarkXTransponder m_FODSystemMarkTransponder;
?是填写FundamentalOperationalData
内部的其他数据还是不同的数据?
我可以看到here是父亲。
我想宣布一些东西为FundamentalOperationalData Mydata(1,2,3 ......
来源为here
namespace KDIS {
namespace DATA_TYPE {
class KDIS_EXPORT FundamentalOperationalData : public DataTypeBase
{
protected:
union
{
struct
{
KUINT8 m_ui8SystemStatus;
KUINT8 m_ui8AltParam4;
KUINT8 m_ui8InfoLayers;
KUINT8 m_ui8Modifier;
KUINT16 m_ui16Param1;
KUINT16 m_ui16Param2;
KUINT16 m_ui16Param3;
KUINT16 m_ui16Param4;
KUINT16 m_ui16Param5;
KUINT16 m_ui16Param6;
};
FundamentalOperationalData_MarkXTransponder m_FODSystemMarkTransponder;
FundamentalOperationalData_MarkXInterrogator m_FODSystemMarkInterrogator;
FundamentalOperationalData_Soviet m_FODSystemSoviet;
FundamentalOperationalData_RRB m_FODSystemRRB;
};
public:
static const KUINT16 FUNDAMENTAL_OPERATIONAL_DATA_SIZE = 16;
FundamentalOperationalData( void );
FundamentalOperationalData( KDataStream & stream ) throw( KException );
FundamentalOperationalData( const FundamentalOperationalData_MarkXTransponder & FOD );
FundamentalOperationalData( const FundamentalOperationalData_MarkXInterrogator & FOD );
FundamentalOperationalData( const FundamentalOperationalData_Soviet & FOD );
FundamentalOperationalData( const FundamentalOperationalData_RRB & FOD );
virtual ~FundamentalOperationalData( void );
//************************************
// FullName: KDIS::DATA_TYPE::FundamentalOperationalData::SetFundamentalOperationalData
// KDIS::DATA_TYPE::FundamentalOperationalData::GetFundamentalOperationalData
// Description: Sets/Gets Fundamental Operational Data for a specific system.
// Parameter: FundamentalOperationalData_X FOD
//************************************
void SetFundamentalOperationalData_MarkXTransponder( const FundamentalOperationalData_MarkXTransponder & FOD );
void SetFundamentalOperationalData_MarkXInterrogator( const FundamentalOperationalData_MarkXInterrogator & FOD );
void SetFundamentalOperationalData_Soviet( const FundamentalOperationalData_Soviet & FOD );
void SetFundamentalOperationalData_RRB( const FundamentalOperationalData_RRB & FOD );
const FundamentalOperationalData_MarkXTransponder & GetSetFundamentalOperationalData_MarkXTransponder() const;
FundamentalOperationalData_MarkXTransponder & GetSetFundamentalOperationalData_MarkXTransponder();
const FundamentalOperationalData_MarkXInterrogator & GetFundamentalOperationalData_MarkXInterrogator() const;
FundamentalOperationalData_MarkXInterrogator & GetFundamentalOperationalData_MarkXInterrogator();
const FundamentalOperationalData_Soviet & GetFundamentalOperationalData_Soviet() const;
FundamentalOperationalData_Soviet & GetFundamentalOperationalData_Soviet();
const FundamentalOperationalData_RRB & GetFundamentalOperationalData_RRB() const;
FundamentalOperationalData_RRB & GetFundamentalOperationalData_RRB();
//************************************
// FullName: KDIS::DATA_TYPE::FundamentalOperationalData::GetAsString
// Description: Returns a string representation
//************************************
virtual KString GetAsString() const;
//************************************
// FullName: KDIS::DATA_TYPE::FundamentalOperationalData::Decode
// Description: Convert From Network Data.
// Parameter: KDataStream & stream
//************************************
virtual void Decode( KDataStream & stream ) throw( KException );
//************************************
// FullName: KDIS::DATA_TYPE::FundamentalOperationalData::Encode
// Description: Convert To Network Data.
// Parameter: KDataStream & stream
//************************************
virtual KDataStream Encode() const;
virtual void Encode( KDataStream & stream ) const;
KBOOL operator == ( const FundamentalOperationalData & Value ) const;
KBOOL operator != ( const FundamentalOperationalData & Value ) const;
};
}; // END namespace DATA_TYPES
}; // END namespace KDIS
答案 0 :(得分:1)
FundamentalOperationalData
没有带(1,2,3..
您可以使用以下命令初始化此类:
FundamentalOperationalData_MarkXTransponder
参考FundamentalOperationalData_MarkXInterrogator
参考FundamentalOperationalData_Soviet
参考FundamentalOperationalData_RRB
参考KDataStream
参考 FundamentalOperationalData_MarkXTransponder
是FundamentalOperationalData
类的受保护成员。
此处的union
可以访问这些成员:
struct
{
KUINT8 m_ui8SystemStatus;
KUINT8 m_ui8AltParam4;
KUINT8 m_ui8InfoLayers;
KUINT8 m_ui8Modifier;
KUINT16 m_ui16Param1;
KUINT16 m_ui16Param2;
KUINT16 m_ui16Param3;
KUINT16 m_ui16Param4;
KUINT16 m_ui16Param5;
KUINT16 m_ui16Param6;
};
通过这些成员
FundamentalOperationalData_MarkXTransponder m_FODSystemMarkTransponder;
FundamentalOperationalData_MarkXInterrogator m_FODSystemMarkInterrogator;
FundamentalOperationalData_Soviet m_FODSystemSoviet;
FundamentalOperationalData_RRB m_FODSystemRRB;
由于联盟只有足够的存储空间来容纳其成员列表中的最大成员。