cup-cli 0.1.2

A Cargo-like tool for C++ Project Building and Package Management
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod exe;
mod lib;

pub use exe::Executable;
pub use lib::Static;

use crate::cli::{CreateProject, TemplateType};

/// 创建一个指定类型的插件实例
pub fn create_instance(ty: TemplateType) -> Box<dyn CreateProject> {
    match ty {
        TemplateType::Executable => Box::new(Executable::default()),
        TemplateType::Static => Box::new(Static::default()),
        _ => todo!(),
    }
}