// @Time : 2023-10-24 19:10:31 // @FileName: test_view.cpp // @Author : 423A35C7 // @Software: VSCode #include #include "view.hpp" using namespace std; template class TestModel : public vector { public: using vector::vector; // 这样好像可以继承构造函数 int_ get_length() { return this->size(); } }; int main() { TestModel a {1, 2, 3, 4, 5}; auto background_view = BackgroundView(DEFAULT_GATE_X, DEFAULT_GATE_Y); auto queue_view = SimpleQueueView>(a, 10, 10); // queue_view.init(); queue_view.refresh(); TestModel b {10, 20, 30, 40, 50}; auto queue_view2 = SimpleQueueView>(b, 20, 50); // queue_view2.init(); queue_view2.refresh(); return 0; }