title: Flyweight Pattern in C++
body: <p>When creating a flyweight pattern, how does one usually store superflous objects.  Lets say I create an Aircraft.</p>
  
  <pre><code>class Aircraft
  {
  private:
      char make[32];
      char model[32];
      double cruiseSpeed;
      double cruiseAltitude;
      double climbRate;
      double wingspan;
      double fuselageLength;
  
      AircraftType craftType;
  
  public:
  
      Aircraft(void);
      Aircraft(AircraftType);
      ~Aircraft(void);
  
      void setMake(char*);
      void setModel(char*);
      void setCruiseSpeed(double);
      void setCruiseAltitude(double);
      void setClimbRate(double);
      void setWingSpan(double);
      void setFuselageLength(double);
  
      char* getMake();
      char* getModel();
      double getCruiseSpeed();
      double getCruiseAltitude();
      double getClimbRate();
      double getWingSpan();
      double getFuselageLength();    
  };
  </code></pre>
  
  <p>Lets also say I'm reading in many aircrafts from an xml data sheet, so I want to just create one one these objects and store the rest of the information somewhere.  Would I create another class that manages the flyweight information, then maybe pass it a key with the Aircraft object to input into the only instance one at a time?  Or would you just bypass putting the information in the object instance at all?</p>
  
  <p>For this type of object, would the only efficiency gained in not creating multiple instance be the get and sets?</p>