📄 attemperengine.h
字号:
// ***************************************************************
// AttemperEngine version: 1.0
// -------------------------------------------------------------
// File Name: AttemperEngine.h
// Created: 2007/07/18
// Modified: 2007/07/18 16:49
// Author: William.Liang
// Msn: lwq49@msn.com
// Email: lwq49@21cn.com, lwq49@msn.com
// Description:
//
// Purpose:
// -------------------------------------------------------------
// license:
//
// The contents of this file are subject to the Mozilla Public
// License Version 1.1 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy
// of the License at http://www.mozilla.org/MPL/ Software dis-
// tributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or im-
// plied. See the License for the specific language governing
// rights and limitations under the License.
//
// The Initial Developer of the Original Code is William.Liang .
// Copyright (C) 2007 - All Rights Reserved.
// ***************************************************************
#ifndef ATTEMPER_ENGINE_HEAD_FILE
#define ATTEMPER_ENGINE_HEAD_FILE
#pragma once
//组件头文件
#include "ServiceEnginer.h"
#include "QueueService.h"
//////////////////////////////////////////////////////////////////////////
//调度管理类
class SERVICE_ENGINER_CLASS CAttemperEngine : public IAttemperEngine, public IQueueServiceSink
{
//核心变量
protected:
bool m_bService; //运行标志
CQueueService m_RequestQueueService; //队列对象
//接口变量
protected:
//ITCPSocketEngine * m_pITCPSocketEngine; //网络引擎
IAttemperEngineSink * m_pIAttemperEngineSink; //挂接接口
//函数定义
public:
//构造函数
CAttemperEngine(void);
//析构函数
virtual ~CAttemperEngine(void);
//基础接口
public:
//释放对象
virtual bool __cdecl Release() { if (IsValid()) delete this; return true; }
//是否有效
virtual bool __cdecl IsValid() { return AfxIsValidAddress(this,sizeof(CAttemperEngine))?true:false; }
//接口查询
virtual void * __cdecl QueryInterface(const IID & Guid, DWORD dwQueryVer);
//管理接口
public:
//启动服务
virtual bool __cdecl StartService();
//停止服务
virtual bool __cdecl StopService();
//设置网络
virtual bool __cdecl SetSocketEngine(IUnknownEx * pIUnknownEx);
//注册钩子
virtual bool __cdecl SetAttemperEngineSink(IUnknownEx * pIUnknownEx);
//获取接口
virtual void * __cdecl GetQueueService(const IID & Guid, DWORD dwQueryVer);
//队列接口
public:
//触发接口
virtual void __cdecl OnQueueServiceSink(WORD wIdentifier, void * pBuffer, WORD wDataSize, DWORD dwInsertTime);
};
//////////////////////////////////////////////////////////////////////////
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -