title: C++ getter/setter paradigm
body: <p>I recently came across this class and was surprised at how the getters and 
  setters were implemented.</p>
  
  <p>I have not come across this before and would welcome some second opinions.</p>
  
  <p>Do you think this is a good paradigm?
  Is is bad?
  Is it evil?</p>
  
  <p>Header:</p>
  
  <pre><code>    class Tool
  {
  public:
      Tool();
      virtual ~Tool();
  
      bool setName(const std::string &amp;name);
      bool getName(std::string &amp;name) const;
  
      void clearName();
  
  private:
      std::string m_name;
      bool m_nameSet;
  
  };
  </code></pre>
  
  <p>cpp file:</p>
  
  <pre><code>#include "Tool.h"
  
  Tool::Tool()
  : m_name("")
  , m_nameSet(false)
  {
  }
  
  
  Tool::~Tool()
  {
  }
  
  
  bool Tool::setName(const std::string &amp;name)
  {
      m_name = name;
      m_nameSet = true;
      return (m_nameSet);
  }    
  
  bool Tool::getName(std::string &amp;name) const
  {
      bool success = false;
      if (m_nameSet)
      {
          name = m_name;
          success = true;
      }
      return (success);
  }
  </code></pre>