Code Monkey home page Code Monkey logo

cpp_software_design's People

Contributors

igl42 avatar khayk avatar sebastianwilke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp_software_design's Issues

problems with Guideline 4.

Hi, I have learned a lot from your book, but in guideline 4 I have two questions:1. should the “widgetDetails::BlobCollection blobs_” in wideget class be “widgetDetails::BlobCollection::blobs_” ,and if the blobs_ is a class, then does it introduce a new dependency? 2. After extracting the Blobcollection class, I rather don't quite understand how to use the widget class, and how to use the BlobCollection class to test,may you show me an example,thanks!

[G35_Decorator_1] The `value` type don't match main function comments

This is main function comments

// 7% tax: 19*1.07 = 20.33
// 20% discount, 19% tax: (999*0.8)*1.19 = 951.05

And output format is followings.

std::ostream& operator<<( std::ostream& os, Money money )
{
   return os << money.value;
}

So, I think output type is 'value' field type. Then 'value' field type is uint64_t.

uint64_t value{};

return Money{ static_cast<uint64_t>( money.value * factor ) };

If main comments is collect, it should change uint64_t to double(or float).

chapter 8 : the type erasure design pattern code can not compile

In session : An owning type erasure implemention
this code can not compile at this line : Shape shape( drawingCircle );

Am I need to change the implemention of Shape Class ?

//---- <YourMain.cpp> ----------------

int main()
{
// Create a circle as one representative of a concrete shape type
Circle circle{ 3.14 };

// Bind the circle to some drawing functionality
auto drawingCircle = = { myCircleDrawer(circle); };

// Type-erase the circle equipped with drawing behavior
Shape shape( drawingCircle );

// Drawing the shape
draw( shape );

// ...

return EXIT_SUCCESS;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.