Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
google.protobuf.text_format._Parser Class Reference
Inheritance diagram for google.protobuf.text_format._Parser:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, allow_unknown_extension=False, allow_field_number=False, descriptor_pool=None, allow_unknown_field=False)
 
def MergeLines (self, lines, message)
 
def ParseLines (self, lines, message)
 

Public Attributes

 allow_field_number
 
 allow_unknown_extension
 
 allow_unknown_field
 
 descriptor_pool
 

Private Member Functions

def _ConsumeAnyTypeUrl (self, tokenizer)
 
def _MergeField (self, tokenizer, message)
 
def _MergeMessageField (self, tokenizer, message, field)
 
def _MergeScalarField (self, tokenizer, message, field)
 
def _ParseOrMerge (self, lines, message)
 

Static Private Member Functions

def _IsProto3Syntax (message)
 

Private Attributes

 _allow_multiple_scalars
 

Detailed Description

Text format parser for protocol message.

Definition at line 760 of file text_format.py.

Constructor & Destructor Documentation

◆ __init__()

def google.protobuf.text_format._Parser.__init__ (   self,
  allow_unknown_extension = False,
  allow_field_number = False,
  descriptor_pool = None,
  allow_unknown_field = False 
)

Definition at line 763 of file text_format.py.

Member Function Documentation

◆ _ConsumeAnyTypeUrl()

def google.protobuf.text_format._Parser._ConsumeAnyTypeUrl (   self,
  tokenizer 
)
private
Consumes a google.protobuf.Any type URL and returns the type name.

Definition at line 940 of file text_format.py.

◆ _IsProto3Syntax()

def google.protobuf.text_format._Parser._IsProto3Syntax (   message)
staticprivate

Definition at line 1014 of file text_format.py.

◆ _MergeField()

def google.protobuf.text_format._Parser._MergeField (   self,
  tokenizer,
  message 
)
private
Merges a single protocol message field into a message.

Args:
  tokenizer: A tokenizer to parse the field name and values.
  message: A protocol message to record the data.

Raises:
  ParseError: In case of text parsing problems.

Definition at line 806 of file text_format.py.

◆ _MergeMessageField()

def google.protobuf.text_format._Parser._MergeMessageField (   self,
  tokenizer,
  message,
  field 
)
private
Merges a single scalar field into a message.

Args:
  tokenizer: A tokenizer to parse the field value.
  message: The message of which field is a member.
  field: The descriptor of the field to be merged.

Raises:
  ParseError: In case of text parsing problems.

Definition at line 955 of file text_format.py.

◆ _MergeScalarField()

def google.protobuf.text_format._Parser._MergeScalarField (   self,
  tokenizer,
  message,
  field 
)
private
Merges a single scalar field into a message.

Args:
  tokenizer: A tokenizer to parse the field value.
  message: A protocol message to record the data.
  field: The descriptor of the field to be merged.

Raises:
  ParseError: In case of text parsing problems.
  RuntimeError: On runtime errors.

Definition at line 1019 of file text_format.py.

◆ _ParseOrMerge()

def google.protobuf.text_format._Parser._ParseOrMerge (   self,
  lines,
  message 
)
private
Converts a text representation of a protocol message into a message.

Args:
  lines: Lines of a message's text representation.
  message: A protocol buffer message to merge into.

Raises:
  ParseError: On text parsing problems.

Definition at line 785 of file text_format.py.

◆ MergeLines()

def google.protobuf.text_format._Parser.MergeLines (   self,
  lines,
  message 
)
Merges a text representation of a protocol message into a message.

Definition at line 779 of file text_format.py.

◆ ParseLines()

def google.protobuf.text_format._Parser.ParseLines (   self,
  lines,
  message 
)
Parses a text representation of a protocol message into a message.

Definition at line 773 of file text_format.py.

Member Data Documentation

◆ _allow_multiple_scalars

google.protobuf.text_format._Parser._allow_multiple_scalars
private

Definition at line 775 of file text_format.py.

◆ allow_field_number

google.protobuf.text_format._Parser.allow_field_number

Definition at line 765 of file text_format.py.

◆ allow_unknown_extension

google.protobuf.text_format._Parser.allow_unknown_extension

Definition at line 764 of file text_format.py.

◆ allow_unknown_field

google.protobuf.text_format._Parser.allow_unknown_field

Definition at line 767 of file text_format.py.

◆ descriptor_pool

google.protobuf.text_format._Parser.descriptor_pool

Definition at line 766 of file text_format.py.


The documentation for this class was generated from the following file:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:10