年度归档: 2024 年

22 篇文章

doxygen文档注释编写指南
通过doxygen生成文档 生成配置文件 通过doxygen -g <config_filename>生成Doxyfile的配置文件。 通过配置文件生成文档 使用以下命令生成文档,前提是已经生成了配置文件并且配置了相关项。 doxygen Doxyfile doxygen注释要求 Comment blocks for C-like la…
windows批处理教程
批处理相关用法 设置注释 设置注释可以通过Rem和::完成,例如: :: :: the below code is used to build project using cmake. :: Rem This is for listing down all the files in the directory Program files 重定向 和…
Coordinate System
Coordinate System The coordinate system is controlled by the QPainter class. Together with the QPaintDevice and QPaintEngine classes, QPainter form the basis of Qt's painting …
Qt Widgets Designer Form Class文件的解读
示例 chatwindows.h #ifndef CHATWINDOW_H #define CHATWINDOW_H #include <QWidget> // 前置声明,Ui::ChatWindow是通过designer自动生成的,因此需要先声明 namespace Ui { class ChatWindow; } class Cha…
TCP/IP协议详解
Ethernet II 帧格式 目的MAC地址  占用6字节 源MAC地址  占用6字节 帧类型  占用2字节 数据payload  占用46字节~1500字节 源MAC地址  占用4字节 Ethernet II 帧的最小和最大长度 最小帧长度:64 字节(包括帧头和 FCS)。如果有效载荷部分小于…
TCP网络编程
第八章 IP地址和域名之间的转换 利用域名获取IP地址 #include <netdb.h> struct hostent * gethostbyname(const char * hostname); hostent结构体定义如下: struct hostent { char * h_name; char ** h_aliases; …
C++ 模板编程
第一章 函数模板 函数模板初探 定义模板 定义一个返回最大值的函数模板 template<typename T> T max(T a, T b) { return b < a ? a : b; } 这里T表示类型参数,是模板参数。 使用模板 #include "max1.hpp" #include <io…
创建型设计模式
抽象工厂(Abstract Factory) 适用性 一个系统要独立于它的产品的创建、组合和表示时。 一个系统要由多个产品系列中的一个来配置时。 当你要强调一系列相关的产品对象的设计以便进行联合使用时。 当你提供一个产品类库,而只想显示它们的接口而不是实现时。