Avoiding casts in abstract types
The best solution is to make ComponentProperties know how to print itself.

 class ComponentProperties {
     friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; s, ComponentProperties const&amp; d) {
         return d.print(s);
     }
     virtual std::ostream&amp; print(std::ostream&amp; s) const {
         return s &lt;&lt; componentProperty_;
     }
     //  STUFF
 };

 class TextboxProperties: public ComponentProperties {
     virtual std::ostream&amp; print(std::ostream&amp; s) const {
         return ComponentProperties::print(s) &lt;&lt; ", " &lt;&lt; textboxProperty_;
     }
     // STUFF
  };

  class Component {
      // PS. I tend to put my simple friend class definitions.
      //     inline within the class. They are after all part
      //     of the classes public interface and tightly bound
      //     to the implementation of the class.
      friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, const Component&amp; component) {  
          return out &lt;&lt; component.properties_;
      }
      // STUFF
  };


Advantage of doing it this way is you can get rid of this getter methods.