On Fri, Aug 28, 2009 at 6:42 PM, Kenton Varda<ken...@google.com> wrote:

> To answer your specific question, BTW, yes, you can inspect the contents of
> UnknownFieldSet.  Every message object has methods unknown_fields() and
> mutable_unkown_fields() which return the UnknownFieldSet.  The API is
> described here:
> http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.unknown_field_set.html

I'm probably missing something, but I get a complation error when
trying to access the unknown fields of a message:

Error   1       error C2248:
'google::protobuf::UnknownFieldSet::UnknownFieldSet' : cannot access
private member declared in class 'google::protobuf::UnknownFieldSet';
e:\dev\ide-platform\core\ide\protobuf\src\google/protobuf/unknown_field_set.h(124)
: see declaration of
'google::protobuf::UnknownFieldSet::UnknownFieldSet';
e:\dev\ide-platform\core\ide\protobuf\src\google/protobuf/unknown_field_set.h(63)
: see declaration of
'google::protobuf::UnknownFieldSet'     
e:\dev\ide-platform\core\ide\CSpyServer\src\model\CssListWindowService.cpp      
21

The code looks like this:

void
foo(const cdp::DebugCommand &cmd)
{
  UnknownFieldSet set = cmd.GetReflection()->GetUnknownFields(cmd);
}

-- 
/Jesper

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to