Learn R Programming

RProtoBuf (version 0.1-0)

Descriptor-class: Class "Descriptor"

Description

full descriptive information about a protocol buffer message type. This is a thin wrapper around the C++ class Descriptor

Arguments

Objects from the Class

Objects are usually created by calls to the P function.

References

The Descriptor c++ class. http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.descriptor.html#Descriptor

See Also

the P function creates "Descriptor" messages.

Examples

Run this code
# example proto file supplied with this package
proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 

# reading a proto file and creating the descriptor
Person <- P( "tutorial.Person", file = proto.file )

# enum type
Person$PhoneType

# nested type
Person$PhoneNumber

# field
Person$email

# use this descriptor to create a message
new( Person )

Run the code above in your browser using DataLab