[Rprotobuf-commits] r495 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 10 10:16:12 CEST 2013


Author: murray
Date: 2013-07-10 10:16:12 +0200 (Wed, 10 Jul 2013)
New Revision: 495

Modified:
   pkg/man/Descriptor-class.Rd
   pkg/man/EnumDescriptor-class.Rd
   pkg/man/FieldDescriptor-class.Rd
   pkg/man/FileDescriptor-class.Rd
   pkg/man/Message-class.Rd
   pkg/man/P.Rd
   pkg/man/RProtoBuf-package.Rd
   pkg/man/aslist.Rd
   pkg/man/clone.Rd
   pkg/man/is_extension.Rd
   pkg/man/label.Rd
   pkg/man/number.Rd
   pkg/man/type.Rd
   pkg/man/with.Rd
Log:
Improve documentation of aslist and be more sparing with \dontrun in all
examples so that more example code is actually evaluated during R CMD check.



Modified: pkg/man/Descriptor-class.Rd
===================================================================
--- pkg/man/Descriptor-class.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/Descriptor-class.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -93,9 +93,10 @@
 \dontrun{
 # 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 )
+}
+\dontshow{Person <- P( "tutorial.Person" ) }
 
 # enum type
 Person$PhoneType
@@ -109,5 +110,4 @@
 # use this descriptor to create a message
 new( Person )
 }
-}
 \keyword{classes}

Modified: pkg/man/EnumDescriptor-class.Rd
===================================================================
--- pkg/man/EnumDescriptor-class.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/EnumDescriptor-class.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -73,7 +73,8 @@
 
 # reading a proto file and creating the descriptor
 Person <- P( "tutorial.Person", file = proto.file )
-
+}
+\dontshow{Person <- P("tutorial.Person") }
 # enum type
 Person$PhoneType
 
@@ -83,7 +84,6 @@
 
 has(Person$PhoneType, "FOOBAR")
 
-length(protobuf_unittest.TestAllTypes$NestedEnum)
+length(Person$PhoneType)
 }
-}
 \keyword{classes}

Modified: pkg/man/FieldDescriptor-class.Rd
===================================================================
--- pkg/man/FieldDescriptor-class.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/FieldDescriptor-class.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -88,6 +88,8 @@
 
 # reading a proto file and creating the descriptor
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{Person <- P("tutorial.Person") }
 
 # field descriptor object
 Person$email
@@ -149,7 +151,5 @@
 
 # Return the class of a message field
 message_type(Person$phone)
-
 }
-}
 \keyword{classes}

Modified: pkg/man/FileDescriptor-class.Rd
===================================================================
--- pkg/man/FileDescriptor-class.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/FileDescriptor-class.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -37,7 +37,6 @@
 	\linkS4class{Descriptor}
 }
 \examples{
-\dontrun{
 # example proto file supplied with this package
 desc <- P("tutorial.Person")
 person <- new(desc)
@@ -47,4 +46,3 @@
 # [1] "addressbook.proto"
 as.character(person$fileDescriptor())
 }
-}
\ No newline at end of file

Modified: pkg/man/Message-class.Rd
===================================================================
--- pkg/man/Message-class.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/Message-class.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -78,6 +78,9 @@
 
 # reading a proto file and creating the descriptor
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{ Person <- P("tutorial.Person") }
+
 PhoneNumber <- P( "tutorial.Person.PhoneNumber" )
 
 # creating a prototype message from the descriptor
@@ -129,5 +132,4 @@
 writeLines( as.character( m ) )
 sapply( m$person, function(p) p$name )
 }
-}
 \keyword{classes}

Modified: pkg/man/P.Rd
===================================================================
--- pkg/man/P.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/P.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -25,7 +25,9 @@
 \dontrun{
 proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{ Person <- P("tutorial.Person") }
+
 as.character( Person )
 }
-}
 \keyword{ interface }

Modified: pkg/man/RProtoBuf-package.Rd
===================================================================
--- pkg/man/RProtoBuf-package.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/RProtoBuf-package.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -45,7 +45,7 @@
 \examples{
 \dontrun{
 # an example proto file
-system.file( "proto", "AddressBook.proto", package = "RProtoBuf" )
+system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
 
 # create a message of type AddressBook, defined in the example proto file
 demo( "addressbook", package = "RProtoBuf" )

Modified: pkg/man/aslist.Rd
===================================================================
--- pkg/man/aslist.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/aslist.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -32,9 +32,10 @@
 enum type descriptors (\linkS4class{EnumDescriptor} objects), 
 or field descriptors (\linkS4class{FieldDescriptor} objects)
 
-For enum descriptors, ...
+For enum descriptors, a named list of the enumerated values.
 
-For file descriptors, ...
+For file descriptors, a named list of descriptors defined in the
+specified file descriptor.
 
 For service descriptors, ...
 
@@ -43,13 +44,10 @@
 Romain Francois <francoisromain at free.fr>
 }
 \examples{
-\dontrun{
-proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 
-Person <- P( "tutorial.Person", file = proto.file )
+Person <- P( "tutorial.Person" )
 romain <- new( Person, email = "francoisromain at free.fr", id = 1 )
 as.list( romain )
 as.list( Person )
 as.list( Person$PhoneType)
 }
-}
 \keyword{ programming }

Modified: pkg/man/clone.Rd
===================================================================
--- pkg/man/clone.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/clone.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -15,10 +15,12 @@
 \examples{
 \dontrun{
 # example proto file supplied with this package
-proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 
+proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
 
 # reading a proto file and creating the descriptor
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{Person <- P("tutorial.Person")}
 
 # creating a prototype message from the descriptor
 sheep <- new( Person, email = "francoisromain at free.fr", id = 2 )
@@ -32,7 +34,6 @@
 # this can also be used as a pseudo method
 sheep$clone()
 sheep$clone( id = 3 )
-}	
 }
 \keyword{methods}
 

Modified: pkg/man/is_extension.Rd
===================================================================
--- pkg/man/is_extension.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/is_extension.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -10,9 +10,6 @@
 }
 \keyword{methods}
 \examples{
-\dontrun{
-proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
-Person <- P( "tutorial.Person", file = proto.file )
+Person <- P( "tutorial.Person" )
 is_extension(Person$id)
-}
 }
\ No newline at end of file

Modified: pkg/man/label.Rd
===================================================================
--- pkg/man/label.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/label.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -23,6 +23,9 @@
 \dontrun{
 proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{ Person <- P("tutorial.Person") }
+
 label(Person$id)
 label(Person$email)
 label(Person$phone)
@@ -32,5 +35,4 @@
 LABEL_OPTIONAL
 LABEL_REQUIRED
 LABEL_REPEATED
-}
 }
\ No newline at end of file

Modified: pkg/man/number.Rd
===================================================================
--- pkg/man/number.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/number.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -14,10 +14,12 @@
 \dontrun{
 proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{ Person <- P("tutorial.Person") }
+
 number(Person$id)
 number(Person$email)
 as.character(Person)
 
 number(value(tutorial.Person$PhoneType, name="HOME"))
-}
 }
\ No newline at end of file

Modified: pkg/man/type.Rd
===================================================================
--- pkg/man/type.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/type.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -52,9 +52,10 @@
 \dontrun{
 proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{Person <- P( "tutorial.Person" )}
 type(Person$id)
 type(Person$id, as.string=TRUE)
 cpp_type(Person$email)
 cpp_type(Person$email, TRUE)
-}
 }
\ No newline at end of file

Modified: pkg/man/with.Rd
===================================================================
--- pkg/man/with.Rd	2013-07-09 03:07:02 UTC (rev 494)
+++ pkg/man/with.Rd	2013-07-10 08:16:12 UTC (rev 495)
@@ -36,10 +36,11 @@
 \dontrun{
 proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" ) 
 Person <- P( "tutorial.Person", file = proto.file )
+}
+\dontshow{Person <- P( "tutorial.Person") }
 romain <- within( new( Person ), {
 	email <- "francoisromain at free.fr"
 	id <- 10L
 } )
 }
-}
 \keyword{ classes }



More information about the Rprotobuf-commits mailing list