cxlove / DesignPattern

The example code from head first design patterns for practicing
0 stars 2 forks source link

How to design the interface for iterator to avoiding including each other in header file #23

Open cxlove opened 8 years ago

cxlove commented 8 years ago

See the commit for Issue #22

cxlove commented 8 years ago

See the code in https://github.com/cxlove/DesignPattern/commit/c4f83ad3bfdbcfb654b72d7730c78f2acbe41f19#diff-5b55143b9207a351ed46782e2dd5f882R31

cxlove commented 8 years ago

what I want to do in this code is to check whether the pointer is a specific subclass pointer.

such as the "instanceof" in Java

cxlove commented 8 years ago

It seems can use a forward declaration. but it's also a imperfect design