title: Extending Protobuf with my own methods
body: <p>How should I add methods a Protobuf message?</p>
  
  <p>Suppose I have in my .proto file:</p>
  
  <pre><code>package proto;
  message Person {
    required string name = 1;
    required int32 id = 2;
    optional string email = 3;    
  }
  </code></pre>
  
  <p>and I want to add a method, say, string <code>concatenateNameEmail()</code> to the message.</p>
  
  <p>What I do right now is I create my own C++ class like this:</p>
  
  <pre><code>class Person : public proto::Person
  {
  public:
    Person( proto::Person const &amp; person_ )
    : proto::Person(person_)
    {}
  
    string concateNateNameEmail()
    {
     ...
    }
  };
  </code></pre>
  
  <p>So the downside is I need to call proto::Person copy constructor. Is there a more elegant solution than this?</p>