clear-methods {RProtoBuf}R Documentation

Clear a field or all fields of the message and set them to their default values

Description

Clear one field or all fields of the message and set them to their default values

Methods

signature(object = "Message", field = "missing")

Clear all fields of the message and set them to their default values

signature(object = "Message", field = "character")

Clear the field identified by its name

signature(object = "Message", field = "integer")

Clear the field identified by its tag number

signature(object = "Message", field = "numeric")

Clear the field identified by its tag number

signature(object = "Message", field = "raw")

Clear the field identified by its tag number

Examples

	message <- new( tutorial.Person, name = "dddd", email = "eeeeeee", id = 1 )
	writeLines( as.character( message ) )
	clear( message )
	# clear works also as a pseudo method :
	message$clear() 
	
	writeLines( as.character( message ) )
	
	# clear single fields
	message <- new( tutorial.Person, name = "dddd", email = "eeeeeee", id = 1 )
	message$clear( "name" )
	writeLines( as.character( message ) )
	

[Package RProtoBuf version 0.4.22 Index]