// Frame.h: interface for the CFrame class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_FRAME_H__51844BE7_6F9F_46F2_8C70_B28F0836B9C0__INCLUDED_) #define AFX_FRAME_H__51844BE7_6F9F_46F2_8C70_B28F0836B9C0__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /////////////////// #include "Header.h" #include "CRC.h" /////////////////// class CFrame // this class include all parts of a frame object . { public: BOOL Update();// this fuction updates the "Str" of this object with regarding to "header" , "payload" and "CRC" objects. CString payload;// an array of characters that shows the main info part of a frame . CCRC* crc;// Cyclic redundancy check object that used for error detection of frame that is added to the end of frame. CHeader* header;// header object of this frame object that is set by current layer politics. int size;// length of frame= number of this objects characters. CString str;// the character array of this object. CFrame();// the default constructor of this object. virtual ~CFrame();// the default deconstructor of this object. //private: char operator[](int index)const{return str[index];}// an overloading function to use th e"[]" as an operator in this class. the return value is the "index" the character of this frame object. }; #endif // !defined(AFX_FRAME_H__51844BE7_6F9F_46F2_8C70_B28F0836B9C0__INCLUDED_)