title: How to fill objects with many different member types in a clever way, polymorphically?
body: <p>Is there an OO pattern to fill objects with lots of data, with this data being usually different within each object, polymorphically?
  [edited] The issue here is that in another part of the code I will have a pointer to the base class and I want to fill the data of the concrete objects pointed by this base class.</p>
  
  <ul>
  <li>My first idea was to create a base class with pure virtual methods. So each concrete object would implement how its data is filled. However, as the code evolved I noticed that the base class grown too much only to store dozens of pure abstracts methods, and that concrete classes overwritten a lot of unnecessary methods that were only useful in its siblings. </li>
  </ul>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>public Filler
  {
       virtual void fill_struct1(struct myStruct1) = 0;
       virtual void fill_struct2(struct myStruct2) = 0;
       // I will need more methods to give the derivate objects the capacity of
       // filling its data members polymorphically.
  }
  
  class A: public Filler
  {
       void fill_struct1(struct myStruct1);
       void fill_struct2(struct myStruct2);
       // There can be more overwritten methods.
       struct myStruct1 member_1;
       struct myStruct2 member_2;
       struct myStruct3 member_3;
       // There can be more members of different types.
  }
  
  class B: public Filler
  {
       void fill_struct1(struct myStruct1);
       void fill_struct2(struct myStruct2);
       void fill_struct4(struct myStruct4);
       // There can be more overwritten methods.
       struct myStruct1 member_1;
       struct myStruct2 member_2;
       struct myStruct4 member_3;
       // There can be more members of different types. But sometimes the members can be equal one used in a sibling.
  }
  </code></pre>