¡@

Home 

c++ Programming Glossary: accessorbar

Make interchangeable class types via pointer casting only, without having to allocate any new objects?

http://stackoverflow.com/questions/11219159/make-interchangeable-class-types-via-pointer-casting-only-without-having-to-all

AccessorFoo fooPtr Node AccessorFoo createViaFactory Node AccessorBar barPtr reinterpret_cast Node AccessorBar fooPtr Under the hood.. Node AccessorBar barPtr reinterpret_cast Node AccessorBar fooPtr Under the hood the factory method is actually making.. constructor AccessorFoo foo NodeBase createViaFactory AccessorBar bar foo.getNode But if I don't have to pay for all that I don't..