title: How to get protobuf enum as string?
body: <p>Is it possible to obtain the string equivalent of protobuf enums in C++?</p>
  
  <p>e.g.:</p>
  
  <p><strong><em>The following is the message description:</em></strong></p>
  
  <pre><code>package MyPackage;
  
  message MyMessage
  {
      enum RequestType
      {
          Login = 0;
          Logout = 1;
      }
  
      optional RequestType requestType = 1;
  }
  </code></pre>
  
  <p><strong><em>In my code I wish to do something like this:</em></strong></p>
  
  <pre><code>MyMessage::RequestType requestType = MyMessage::RequestType::Login;
  
  // requestTypeString will be "Login"
  std::string requestTypeString = ProtobufEnumToString(requestType);
  </code></pre>