c++ verson
This commit is contained in:
parent
92db5d94c8
commit
6b734fd028
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp.errorSquiggles": "disabled"
|
||||||
|
}
|
||||||
38
c++/abstract_factory.cc
Normal file
38
c++/abstract_factory.cc
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @name 抽象工厂模式
|
||||||
|
* @brief: 创建相关对象族
|
||||||
|
* @note 场景:跨平台UI组件库(如 Windows/macOS 按钮+文本框组合)
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Button {
|
||||||
|
public:
|
||||||
|
virtual void render() = 0;
|
||||||
|
};
|
||||||
|
class WinButton : public Button {
|
||||||
|
public:
|
||||||
|
void render() override {}
|
||||||
|
};
|
||||||
|
class MacButton : public Button {
|
||||||
|
public:
|
||||||
|
void render() override {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class GUIFactory {
|
||||||
|
public:
|
||||||
|
virtual Button* createButton() = 0;
|
||||||
|
};
|
||||||
|
class WinFactory : public GUIFactory {
|
||||||
|
Button* createButton() override { return new WinButton(); }
|
||||||
|
};
|
||||||
|
class MacFactory : public GUIFactory {
|
||||||
|
Button* createButton() override { return new MacButton(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
// 使用
|
||||||
|
GUIFactory* factory = new WinFactory(); // 根据配置切换
|
||||||
|
Button* btn = factory->createButton();
|
||||||
|
btn->render();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
32
c++/adapter.cc
Normal file
32
c++/adapter.cc
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* @name 适配器模式
|
||||||
|
* @brief: 转换接口以兼容客户端
|
||||||
|
* @note 场景:集成旧库、第三方库接口转换
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 旧类 (不兼容接口)
|
||||||
|
class LegacyPrinter {
|
||||||
|
public:
|
||||||
|
void printDocument() { /* 旧式打印 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class PrinterInterface {
|
||||||
|
public:
|
||||||
|
virtual void print() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 适配器
|
||||||
|
class PrinterAdapter : public PrinterInterface {
|
||||||
|
LegacyPrinter legacyPrinter;
|
||||||
|
public:
|
||||||
|
void print() override {
|
||||||
|
legacyPrinter.printDocument(); // 调用旧方法
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
PrinterInterface* printer = new PrinterAdapter();
|
||||||
|
printer->print();
|
||||||
|
}
|
||||||
54
c++/builder.cc
Normal file
54
c++/builder.cc
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/**
|
||||||
|
* @name 建造者模式
|
||||||
|
* @brief: 分步构造复杂对象
|
||||||
|
* @note 场景:创建包含多个配置选项的对象(如电脑配置、订单)
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Pizza {
|
||||||
|
public:
|
||||||
|
void setDough(const std::string& d) { dough = d; }
|
||||||
|
void setSauce(const std::string& s) { sauce = s; }
|
||||||
|
void addTopping(const std::string& t) { toppings.push_back(t); }
|
||||||
|
private:
|
||||||
|
std::string dough;
|
||||||
|
std::string sauce;
|
||||||
|
std::vector<std::string> toppings;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PizzaBuilder {
|
||||||
|
public:
|
||||||
|
virtual void buildDough() = 0;
|
||||||
|
virtual void buildSauce() = 0;
|
||||||
|
virtual void buildToppings() = 0;
|
||||||
|
Pizza* getPizza() { return pizza; }
|
||||||
|
protected:
|
||||||
|
Pizza* pizza = new Pizza();
|
||||||
|
};
|
||||||
|
|
||||||
|
class HawaiianBuilder : public PizzaBuilder {
|
||||||
|
public:
|
||||||
|
void buildDough() override { pizza->setDough("cross"); }
|
||||||
|
void buildSauce() override { pizza->setSauce("mild"); }
|
||||||
|
void buildToppings() override {
|
||||||
|
pizza->addTopping("ham");
|
||||||
|
pizza->addTopping("pineapple");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class Director {
|
||||||
|
public:
|
||||||
|
Pizza* makePizza(PizzaBuilder* builder) {
|
||||||
|
builder->buildDough();
|
||||||
|
builder->buildSauce();
|
||||||
|
builder->buildToppings();
|
||||||
|
return builder->getPizza();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Director director;
|
||||||
|
HawaiianBuilder builder;
|
||||||
|
Pizza* pizza = director.makePizza(&builder);
|
||||||
|
}
|
||||||
45
c++/chain_responsibility.cc
Normal file
45
c++/chain_responsibility.cc
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* @name 责任链模式
|
||||||
|
* @brief: 使多个对象都有机会处理请求
|
||||||
|
* @note 场景:日志过滤系统、审批流程、异常处理链
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Handler {
|
||||||
|
public:
|
||||||
|
virtual void handleRequest(int level) = 0;
|
||||||
|
void setNext(Handler* h) { next = h; }
|
||||||
|
protected:
|
||||||
|
Handler* next = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Manager : public Handler {
|
||||||
|
public:
|
||||||
|
void handleRequest(int level) override {
|
||||||
|
if (level <= 5) {
|
||||||
|
// 处理请求
|
||||||
|
} else if (next) {
|
||||||
|
next->handleRequest(level);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class Director : public Handler {
|
||||||
|
void handleRequest(int level) override {
|
||||||
|
if (level > 5 && level <= 10) {
|
||||||
|
// 处理请求
|
||||||
|
} else if (next) {
|
||||||
|
next->handleRequest(level);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Handler* manager = new Manager();
|
||||||
|
Handler* director = new Director();
|
||||||
|
manager->setNext(director);
|
||||||
|
|
||||||
|
manager->handleRequest(3); // Manager处理
|
||||||
|
manager->handleRequest(7); // Director处理
|
||||||
|
}
|
||||||
36
c++/command.cc
Normal file
36
c++/command.cc
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/**
|
||||||
|
* @name 命令模式
|
||||||
|
* @brief: 将请求封装为对象
|
||||||
|
* @note 场景:GUI 按钮操作、撤销/重做功能、任务队列
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Command {
|
||||||
|
public:
|
||||||
|
virtual void execute() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Light {
|
||||||
|
public:
|
||||||
|
void turnOn() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class LightOnCommand : public Command {
|
||||||
|
Light* light;
|
||||||
|
public:
|
||||||
|
void execute() override { light->turnOn(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
class RemoteControl {
|
||||||
|
Command* command;
|
||||||
|
public:
|
||||||
|
void setCommand(Command* cmd) { command = cmd; }
|
||||||
|
void pressButton() { command->execute(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
RemoteControl remote;
|
||||||
|
remote.setCommand(new LightOnCommand());
|
||||||
|
remote.pressButton();
|
||||||
|
}
|
||||||
37
c++/decorator.cc
Normal file
37
c++/decorator.cc
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/**
|
||||||
|
* @name 装饰器模式
|
||||||
|
* @brief: 动态添加职责
|
||||||
|
* @note 场景:流处理(加密/压缩装饰)、GUI 组件增强
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Coffee {
|
||||||
|
public:
|
||||||
|
virtual double cost() = 0;
|
||||||
|
};
|
||||||
|
class SimpleCoffee : public Coffee {
|
||||||
|
public:
|
||||||
|
double cost() override { return 6.9; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class CoffeeDecorator : public Coffee {
|
||||||
|
protected:
|
||||||
|
Coffee* coffee;
|
||||||
|
public:
|
||||||
|
CoffeeDecorator(Coffee* c) : coffee(c) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
class MilkDecorator : public CoffeeDecorator {
|
||||||
|
public:
|
||||||
|
MilkDecorator(Coffee* c) : CoffeeDecorator(c) {}
|
||||||
|
double cost() override {
|
||||||
|
return coffee->cost() + 0.5; // 增加牛奶费用
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Coffee* coffee = new SimpleCoffee();
|
||||||
|
coffee = new MilkDecorator(coffee); // 动态装饰
|
||||||
|
coffee->cost(); // 基础 + 牛奶
|
||||||
|
}
|
||||||
34
c++/factory_method.cc
Normal file
34
c++/factory_method.cc
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* @name 工厂方法模式
|
||||||
|
* @brief: 将对象创建委托给子类
|
||||||
|
* @note 场景:框架需要扩展多种类型对象(如 UI 控件、游戏角色)
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Product {
|
||||||
|
public:
|
||||||
|
virtual void use() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConcreteProductA : public Product {
|
||||||
|
void use() override { /* 产品A的功能 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class Creator {
|
||||||
|
public:
|
||||||
|
virtual Product* createProduct() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConcreteCreatorA : public Creator {
|
||||||
|
Product* createProduct() override {
|
||||||
|
return new ConcreteProductA();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Creator* creator = new ConcreteCreatorA();
|
||||||
|
Product* product = creator->createProduct();
|
||||||
|
product->use();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
38
c++/flyweght.cc
Normal file
38
c++/flyweght.cc
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @name 享元模式
|
||||||
|
* @brief: 高效共享大量细粒度对象
|
||||||
|
* @note 场景:文本编辑器字符格式、游戏粒子系统
|
||||||
|
*/
|
||||||
|
|
||||||
|
class CharacterStyle {
|
||||||
|
public:
|
||||||
|
CharacterStyle(const std::string& font, int size, bool bold)
|
||||||
|
: font(font), size(size), bold(bold) {}
|
||||||
|
// 风格属性...
|
||||||
|
private:
|
||||||
|
std::string font;
|
||||||
|
int size;
|
||||||
|
bool bold;
|
||||||
|
};
|
||||||
|
|
||||||
|
class StyleFactory {
|
||||||
|
public:
|
||||||
|
CharacterStyle* getStyle(const std::string& font, int size, bool bold) {
|
||||||
|
std::string key = font + std::to_string(size) + (bold ? "b" : "");
|
||||||
|
if (styles.find(key) == styles.end()) {
|
||||||
|
styles[key] = new CharacterStyle(font, size, bold);
|
||||||
|
}
|
||||||
|
return styles[key];
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
std::unordered_map<std::string, CharacterStyle*> styles;
|
||||||
|
};
|
||||||
|
|
||||||
|
class TextCharacter {
|
||||||
|
public:
|
||||||
|
TextCharacter(char c, CharacterStyle* style)
|
||||||
|
: character(c), style(style) {}
|
||||||
|
private:
|
||||||
|
char character;
|
||||||
|
CharacterStyle* style; // 共享的样式对象
|
||||||
|
};
|
||||||
41
c++/interpreter.cc
Normal file
41
c++/interpreter.cc
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @name 解释器模式
|
||||||
|
* @brief: 定义语言的语法表示
|
||||||
|
* @note 场景:SQL解析、正则表达式、数学公式计算
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Expression {
|
||||||
|
public:
|
||||||
|
virtual int interpret() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Number : public Expression {
|
||||||
|
public:
|
||||||
|
Number(int value) : value(value) {}
|
||||||
|
int interpret() override { return value; }
|
||||||
|
private:
|
||||||
|
int value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Add : public Expression {
|
||||||
|
public:
|
||||||
|
Add(Expression* left, Expression* right)
|
||||||
|
: left(left), right(right) {}
|
||||||
|
int interpret() override {
|
||||||
|
return left->interpret() + right->interpret();
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
Expression* left;
|
||||||
|
Expression* right;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用:构建表达式树 (2 + (3 + 4))
|
||||||
|
Expression* expr = new Add(
|
||||||
|
new Number(2),
|
||||||
|
new Add(new Number(3), new Number(4))
|
||||||
|
);
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int result = expr->interpret(); // 输出9
|
||||||
|
}
|
||||||
35
c++/observer.cc
Normal file
35
c++/observer.cc
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
* @name 观察者模式
|
||||||
|
* @brief: 定义对象间一对多的依赖关系
|
||||||
|
* @note 场景:事件处理系统、消息订阅、MVC 模型更新视图
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class Observer {
|
||||||
|
public:
|
||||||
|
virtual void update(const std::string& msg) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Subject {
|
||||||
|
std::vector<Observer*> observers;
|
||||||
|
public:
|
||||||
|
void attach(Observer* o) { observers.push_back(o); }
|
||||||
|
void notify(const std::string& msg) {
|
||||||
|
for (auto o : observers) o->update(msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConcreteObserver : public Observer {
|
||||||
|
void update(const std::string& msg) override { /* 处理消息 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Subject subject;
|
||||||
|
subject.attach(new ConcreteObserver());
|
||||||
|
subject.notify("Event occurred!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
41
c++/proxy.cc
Normal file
41
c++/proxy.cc
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @name 代理模式
|
||||||
|
* @brief: 为其他对象提供代理以控制访问
|
||||||
|
* @note 场景:延迟加载、访问控制、远程代理
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Image {
|
||||||
|
public:
|
||||||
|
virtual void display() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class RealImage : public Image {
|
||||||
|
public:
|
||||||
|
RealImage(const std::string& file) : filename(file) { load(); }
|
||||||
|
void display() override { /* 显示图片 */ }
|
||||||
|
private:
|
||||||
|
void load() { /* 耗时加载操作 */ }
|
||||||
|
std::string filename;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ProxyImage : public Image {
|
||||||
|
public:
|
||||||
|
ProxyImage(const std::string& file) : filename(file) {}
|
||||||
|
void display() override {
|
||||||
|
if (!realImage) {
|
||||||
|
realImage = new RealImage(filename);
|
||||||
|
}
|
||||||
|
realImage->display();
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
RealImage* realImage = nullptr;
|
||||||
|
std::string filename;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Image* image = new ProxyImage("large_photo.jpg");
|
||||||
|
// 此时未加载真实图片
|
||||||
|
image->display(); // 首次访问时加载
|
||||||
|
}
|
||||||
25
c++/singleton.cc
Normal file
25
c++/singleton.cc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* @name 单例模式
|
||||||
|
* @brief: 确保类只有一个实例,并提供全局访问点
|
||||||
|
* @note 场景:日志记录器、配置管理、线程池、数据库连接池
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Singleton {
|
||||||
|
public:
|
||||||
|
static Singleton& getInstance() {
|
||||||
|
static Singleton instance; // 线程安全 (C++11)
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
void doSomething() { /* ... */ }
|
||||||
|
private:
|
||||||
|
Singleton() = default; // 私有构造
|
||||||
|
Singleton(const Singleton&) = delete; // 禁用拷贝
|
||||||
|
Singleton& operator=(const Singleton&) = delete;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Singleton::getInstance().doSomething();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
40
c++/state.cc
Normal file
40
c++/state.cc
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* @name 状态模式
|
||||||
|
* @brief: 允许对象在内部状态改变时改变行为
|
||||||
|
* @note 场景:订单状态机、游戏角色状态、电梯控制
|
||||||
|
*/
|
||||||
|
|
||||||
|
class OrderState {
|
||||||
|
public:
|
||||||
|
virtual void shipOrder(Order* order) = 0;
|
||||||
|
virtual void cancelOrder(Order* order) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class NewState : public OrderState {
|
||||||
|
void shipOrder(Order* order) override {};
|
||||||
|
void cancelOrder(Order* order) override {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ShippedState : public OrderState {
|
||||||
|
void shipOrder(Order* order) override { /* 已发货,不可重复操作 */ }
|
||||||
|
void cancelOrder(Order* order) override { /* 已发货不可取消 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class Order {
|
||||||
|
public:
|
||||||
|
Order() : state(new NewState()) {}
|
||||||
|
void ship() { state->shipOrder(this); }
|
||||||
|
void cancel() { state->cancelOrder(this); }
|
||||||
|
void changeState(OrderState* newState) {
|
||||||
|
delete state;
|
||||||
|
state = newState;
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
OrderState* state;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 状态转换实现
|
||||||
|
void NewState::shipOrder(Order* order) {
|
||||||
|
// 发货逻辑...
|
||||||
|
order->changeState(new ShippedState());
|
||||||
|
}
|
||||||
30
c++/strategy.cc
Normal file
30
c++/strategy.cc
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/**
|
||||||
|
* @name 策略模式
|
||||||
|
* @brief: 封装可互换的算法
|
||||||
|
* @note 场景:支付方式选择(信用卡/支付宝)、排序算法切换
|
||||||
|
*/
|
||||||
|
|
||||||
|
class PaymentStrategy {
|
||||||
|
public:
|
||||||
|
virtual void pay(int amount) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CreditCardStrategy : public PaymentStrategy {
|
||||||
|
void pay(int amount) override { /* 信用卡支付逻辑 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class PaymentContext {
|
||||||
|
PaymentStrategy* strategy;
|
||||||
|
public:
|
||||||
|
void setStrategy(PaymentStrategy* s) { strategy = s; }
|
||||||
|
void executePayment(int amount) { strategy->pay(amount); }
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
PaymentContext context;
|
||||||
|
context.setStrategy(new CreditCardStrategy());
|
||||||
|
context.executePayment(100);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
33
c++/template_method.cc
Normal file
33
c++/template_method.cc
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/**
|
||||||
|
* @name 模板方法模式
|
||||||
|
* @brief: 定义算法框架,允许子类重写特定步骤
|
||||||
|
* @note 场景:数据解析流程、数据库操作模板、游戏主循环
|
||||||
|
*/
|
||||||
|
|
||||||
|
class DataExporter {
|
||||||
|
public:
|
||||||
|
// 模板方法 (final 阻止子类覆盖整个算法)
|
||||||
|
void exportData() final {
|
||||||
|
openDataSource();
|
||||||
|
convertData(); // 子类可重写的步骤
|
||||||
|
closeDataSource();
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
virtual void convertData() = 0; // 纯虚函数
|
||||||
|
void openDataSource() { /* 通用实现 */ }
|
||||||
|
void closeDataSource() { /* 通用实现 */ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class CSVExporter : public DataExporter {
|
||||||
|
protected:
|
||||||
|
void convertData() override {
|
||||||
|
// CSV格式转换逻辑
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 使用
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
DataExporter* exporter = new CSVExporter();
|
||||||
|
exporter->exportData(); // 执行完整流程
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user