title: Generate set/get methods for a c++ class
body: <p>Is there any tool that generates set and get methods for a class automatically.</p>
  
  <p>Just I create classes very frequently and would like to have a tool which for each class-member wil generate the following functions automatically:</p>
  
  <pre><code>Member_Type getMemberName() const; //in header file
  Member_Type getMemberName() const //in source file 
  {
      return member;
  }
  
  void setMemberName(const Member_Type &amp; val); //in header
  void setMemberName(const Member_Type &amp; val) //in source file 
  {
      member = val;
  }
  </code></pre>
  
  <p>I have met a macro like this but did not like the idea:</p>
  
  <pre><code>#define GETSETVAR(type, name) \
  private: \
      type name; \
  public: \
      const type&amp; get##name##() const { return name; } \
      void set##name##(const type&amp; newval) { name = newval; }
  </code></pre>
  
  <p>May be someone knows how to do that with MS Visual Studio, or eny other tool?</p>