-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseLayer.h
More file actions
45 lines (37 loc) · 1.39 KB
/
BaseLayer.h
File metadata and controls
45 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
// BaseLayer.h: interface for the CBaseLayer class.
//
//////////////////////////////////////////////////////////////////////
#define _AFXDLL
#include "pch.h"
#include"stdafx.h"
#if !defined(AFX_BASELAYER_H__041C5A07_23A9_4CBC_970B_8743460A7DA9__INCLUDED_)
#define AFX_BASELAYER_H__041C5A07_23A9_4CBC_970B_8743460A7DA9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CBaseLayer
{
public:
char* GetLayerName();
CBaseLayer* GetUnderLayer();
CBaseLayer* GetUpperLayer(int nindex);
void SetUnderUpperLayer(CBaseLayer* pUULayer = NULL);
void SetUpperUnderLayer(CBaseLayer* pUULayer = NULL);
void SetUnderLayer(CBaseLayer* pUnderLayer = NULL);
void SetUpperLayer(CBaseLayer* pUpperLayer = NULL);
CBaseLayer(char* pName = NULL);
virtual ~CBaseLayer();
// param : unsigned char* - the data of the upperlayer
// int - the length of data
virtual BOOL Send(unsigned char*, int) { return FALSE; }
// param : unsigned char* - the data of the underlayer
virtual BOOL Receive(unsigned char* ppayload) { return FALSE; }
virtual BOOL Receive() { return FALSE; }
protected:
char* m_pLayerName;
CBaseLayer* mp_UnderLayer; // UnderLayer pointer
CBaseLayer* mp_aUpperLayer[MAX_LAYER_NUMBER]; // UpperLayer pointer
int m_nUpperLayerCount; // UpperLayer Count
};
#endif // !defined(AFX_BASELAYER_H__041C5A07_23A9_4CBC_970B_8743460A7DA9__INCLUDED_)