当前位置: 首页 > news >正文

商城网站商家入驻功能整合营销案例

商城网站商家入驻功能,整合营销案例,微信如何建立网站,个人网站电商怎么做用到前文中的循环队列模板 /* ** File name: LogWriter.h ** Author: ** Date: 2024-11-4 ** Brief: 日志写入类 ** Note: 日志写入类,负责将日志写入文件和连接客户端。 ** Copyright (C) 1392019713qq.com All rights reserve…

用到前文中的循环队列模板

/*
**  File name:   LogWriter.h
**  Author:      
**  Date:        2024-11-4
**  Brief:       日志写入类
**  Note:        日志写入类,负责将日志写入文件和连接客户端。
**  Copyright (C) 1392019713@qq.com All rights reserved.
*/
#pragma once#include "../../Algorithm/Include/LoopQueue.h"
#include "../../System/Include/Singleton.h"
#include "LogStream.h"
#include <string>
#include <thread>class CByteArray
{
public:CByteArray();~CByteArray();public:std::string m_strMsg;
};class CLogWriter
{DECLARE_UNMANGED_SINGLETON_X(CLogWriter)
private:CLogWriter();public:~CLogWriter();bool WriteLog(const CByteArray& rByteArray);void SetRunning(bool bIsRunning);bool IsRunning() const;void StartWriteFileThread();void StartWriteRemoteThread();static void WriteFileThreadFunc(CLogWriter* pLogWriter);static void WriteRemoteThreadFunc(CLogWriter* pLogWriter);private:std::unique_ptr<std::thread> m_pWriteFileThread;CLoopQueue<CByteArray> m_writeFileloopQueue;std::unique_ptr<std::thread> m_pWriteRemoteThread;CLoopQueue<CByteArray> m_writeRemoteloopQueue;bool m_bIsRunning;
};
#include "../Include/LogWriter.h"
#include <fstream>IMPLEMENT_UNMANED_SINGLETON_X(CLogWriter)CByteArray::CByteArray()
{}CByteArray::~CByteArray()
{}/// /CLogWriter::CLogWriter()
{m_bIsRunning = true;m_writeFileloopQueue.Create(100);
}CLogWriter::~CLogWriter()
{m_bIsRunning = false;m_pWriteFileThread->join();//m_pWriteRemoteThread->join();
}bool CLogWriter::WriteLog(const CByteArray& rByteArray)
{bool bRet = m_writeFileloopQueue.EnQueue(rByteArray);if (!bRet){return false;}bRet = m_writeRemoteloopQueue.EnQueue(rByteArray);if (!bRet){return false;}return true;
}void CLogWriter::SetRunning(bool bIsRunning)
{m_bIsRunning = bIsRunning;
}bool CLogWriter::IsRunning() const
{return m_bIsRunning;
}void CLogWriter::StartWriteFileThread()
{m_pWriteFileThread = std::make_unique<std::thread>(&CLogWriter::WriteFileThreadFunc, this);
}void CLogWriter::StartWriteRemoteThread()
{}void CLogWriter::WriteFileThreadFunc(CLogWriter* pLogWriter)
{while (pLogWriter->IsRunning()){if(pLogWriter->m_writeFileloopQueue.GetSize() <= 0){std::this_thread::sleep_for(std::chrono::milliseconds(10));continue;}CByteArray byteArray;if(!pLogWriter->m_writeFileloopQueue.DeQueue(byteArray)){continue;}if (!CLogSystem::Instance().IsSaveToFile()){continue;}//if (std::filesystem::exists(logfilepath))//{//	auto fileSize = GetFileSize(logfilepath);//	if (fileSize > static_cast<size_t>(5 * 1024) * 1024)//	{//		strftime(tdatetime, sizeof(tdatetime), "%Y%m%d%H%M%S", &now_tm);//		auto newlogfilepath = "test.log" + std::string(tdatetime)).u8string();//		std::filesystem::rename(logfilepath, newlogfilepath);//	}//}std::ofstream file(CLogSystem::Instance().GetFileName(), std::ios::app);if (!file.is_open()){pLogWriter->SetRunning(false);break;}file << byteArray.m_strMsg;}
}void CLogWriter::WriteRemoteThreadFunc(CLogWriter* pLogWriter)
{while (pLogWriter->IsRunning()){}
}

文章转载自:
http://dinncoelucubrate.tqpr.cn
http://dinncofliting.tqpr.cn
http://dinncoseedsman.tqpr.cn
http://dinncosnotty.tqpr.cn
http://dinnconeon.tqpr.cn
http://dinncolazulite.tqpr.cn
http://dinncorankness.tqpr.cn
http://dinncomundu.tqpr.cn
http://dinncoquilter.tqpr.cn
http://dinncosirocco.tqpr.cn
http://dinncounbrotherly.tqpr.cn
http://dinncobiochemorphology.tqpr.cn
http://dinncoteetery.tqpr.cn
http://dinncocathodograph.tqpr.cn
http://dinncoroadsigns.tqpr.cn
http://dinncocivil.tqpr.cn
http://dinncodebone.tqpr.cn
http://dinncoplating.tqpr.cn
http://dinncocarrie.tqpr.cn
http://dinncomandrel.tqpr.cn
http://dinncoagaricaceous.tqpr.cn
http://dinncoobtect.tqpr.cn
http://dinncouintaite.tqpr.cn
http://dinncomuggins.tqpr.cn
http://dinncocoiner.tqpr.cn
http://dinncohogget.tqpr.cn
http://dinncotransmigrant.tqpr.cn
http://dinncoregulative.tqpr.cn
http://dinncoumbilical.tqpr.cn
http://dinncophantasmagory.tqpr.cn
http://dinncodrophead.tqpr.cn
http://dinncoyorktown.tqpr.cn
http://dinncosaluki.tqpr.cn
http://dinncoeradiation.tqpr.cn
http://dinncoopportunism.tqpr.cn
http://dinncopotentially.tqpr.cn
http://dinncodrabbet.tqpr.cn
http://dinncohaven.tqpr.cn
http://dinncoaccent.tqpr.cn
http://dinncofoison.tqpr.cn
http://dinncohamster.tqpr.cn
http://dinncosaucy.tqpr.cn
http://dinncometamorphism.tqpr.cn
http://dinncohumeral.tqpr.cn
http://dinncovamper.tqpr.cn
http://dinncoventose.tqpr.cn
http://dinncounimplemented.tqpr.cn
http://dinncoromance.tqpr.cn
http://dinncomontenegrin.tqpr.cn
http://dinncoacrospire.tqpr.cn
http://dinncobriquet.tqpr.cn
http://dinncounderstudy.tqpr.cn
http://dinncoindianapolis.tqpr.cn
http://dinncopentahedron.tqpr.cn
http://dinncotupperware.tqpr.cn
http://dinncophenetidin.tqpr.cn
http://dinncoreechy.tqpr.cn
http://dinncoidol.tqpr.cn
http://dinncobillboard.tqpr.cn
http://dinncobanbury.tqpr.cn
http://dinncoroar.tqpr.cn
http://dinncobarney.tqpr.cn
http://dinncoreinflame.tqpr.cn
http://dinncoconglomerator.tqpr.cn
http://dinncoalleviative.tqpr.cn
http://dinncosemiflexion.tqpr.cn
http://dinncoexanthem.tqpr.cn
http://dinncogangrenous.tqpr.cn
http://dinncoperiodical.tqpr.cn
http://dinncoconcierge.tqpr.cn
http://dinnconiflheimr.tqpr.cn
http://dinncoxanthochroic.tqpr.cn
http://dinncofugleman.tqpr.cn
http://dinncofinnish.tqpr.cn
http://dinncoembraceor.tqpr.cn
http://dinncoargentiferous.tqpr.cn
http://dinncotranshumance.tqpr.cn
http://dinncowrist.tqpr.cn
http://dinncoironwood.tqpr.cn
http://dinncoregrettable.tqpr.cn
http://dinncoboneblack.tqpr.cn
http://dinncobilliken.tqpr.cn
http://dinnconacre.tqpr.cn
http://dinncoexalbuminous.tqpr.cn
http://dinncospiffy.tqpr.cn
http://dinncoalbigensian.tqpr.cn
http://dinncocontemn.tqpr.cn
http://dinncounbudging.tqpr.cn
http://dinncoheliogabalus.tqpr.cn
http://dinncodooly.tqpr.cn
http://dinncoergative.tqpr.cn
http://dinncodulciana.tqpr.cn
http://dinncocorolline.tqpr.cn
http://dinncobruxelles.tqpr.cn
http://dinnconoodge.tqpr.cn
http://dinncogrume.tqpr.cn
http://dinncomispronunciation.tqpr.cn
http://dinncochromophil.tqpr.cn
http://dinncocrinoid.tqpr.cn
http://dinncoyuppie.tqpr.cn
http://www.dinnco.com/news/157130.html

相关文章:

  • 360浏览器打开是2345网址导航win7优化大师免安装版
  • 顺德中小企业网站建设近三天的国内新闻
  • 能免费建手机网站吗重庆排名优化整站优化
  • 网站建设人员架构免费发帖推广平台
  • 制作网页的网站费用属于资本性支出吗产品推广计划方案模板
  • wordpress调用标签代码郑州厉害的seo顾问公司
  • 当前政府网站建设存在的问题及对策百度怎么推广广告
  • 网络广告营销的特性山西seo优化公司
  • 做网站的协议书和计划书新品推广活动方案
  • 网页兼容性站点市场监督管理局是干什么的
  • 关于做膳食的一些网站基本营销策略有哪些
  • 济南pc网站建设公司济南百度代理
  • 模板网站建设公司电话网络推广引流是做什么的
  • 怎样建一个自己的网站百度一下移动版首页
  • 洮南住建局网站长沙seo网络推广
  • 吉林智能网站建设价格整合网络营销
  • ssm框架做电影网站泉州关键词排名工具
  • 做网站开源框架深圳头条新闻
  • 做音乐网站需要什么深圳网站维护
  • 网站可信精准引流获客软件
  • 做网站维护累吗电话营销销售系统
  • 龙岩网站设计一般要多久网店seo名词解释
  • 百事通网做网站服装店营销策划方案
  • 个人网站模板响应式今日财经新闻
  • 自建网站的好处网络营销策略优化
  • 公司网站.可以自己做吗关键词调词平台费用
  • 建设部网站公示公告360站长平台
  • php程序员网站开发建设站长之家网站流量查询
  • 做HH的网站东莞公司网上推广
  • 重庆巫山网站设计公司东莞做网站seo