Effective C + +-----clause 19: Design class like design type

Source: Internet
Author: User

The design of class is the design of type. Before you define a new type, make sure that you have considered all the discussion topics covered by this article.

How should objects of the new type be created and destroyed?

What is the difference between the initialization of an object and the assignment of an object?

What does it mean if the object of the new type is passed by value (passed in the values)?

What is the "legal value" of the new type?

Does your new type need to match an inheritance graph (inheritance graph)?

What kind of conversion do you need for your new type?

What operators and functions are reasonable for this new type?

What kind of standard function should be dismissed?

Who should take a member of the new type?

What is the "undeclared interface" for the new type (undeclared interface)?

How generalized is your new type?

Do you really need a new type?

Effective C + +-----clause 19: Design class like design type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.