Working in generics and role

zhaozj2021-02-16  99

Through the template, you can imagine an object to be tasted by multiple roles.

These characters each completed their own tasks, but they are abstract; can pass through parameters

These roles themselves are also templates

Template

Class CreationPolicy = CREATEUSINGNEW,

What is this line?

Description CREATEPOLICY is a template that requires a class parameter;

Why don't we transfer it outside and then transfer it, the purpose of doing this is to be simple

We can treat templates as combined technology, which separates algorithms and objects

转载请注明原文地址:https://www.9cbs.com/read-11549.html

New Post(0)