RProtoBuf (version 0.4.22)

P: Protocol Buffer descriptor importer

Description

The P function searches for a protocol message descriptor in the descriptor pool.

Usage

P(type, file)

Value

An object of class Descriptor for message types or FieldDescriptor for extensions. An error is generated otherwise.

Arguments

type

Fully qualified type name of the protocol buffer or extension

file

optional proto file. If given, the definition contained in the file is first registered with the pool of message descriptors

Author

Romain Francois <francoisromain@free.fr>

Examples

Run this code
if (FALSE) {
proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 
Person <- P( "tutorial.Person", file = proto.file )
}
 Person <- P("tutorial.Person") 

cat(as.character( Person ))

Run the code above in your browser using DataLab