C/C++ API Reference
Loading...
Searching...
No Matches
pw::protobuf::internal::FinderBase< Derived, T > Class Template Reference
Inheritance diagram for pw::protobuf::internal::FinderBase< Derived, T >:
pw::protobuf::Finder< uint32_t, &Decoder::ReadUint32 > pw::protobuf::StreamFinder< uint32_t, &StreamDecoder::ReadUint32 > pw::protobuf::EnumFinder< T > pw::protobuf::EnumStreamFinder< T >

Public Member Functions

Result< T > Last ()
 Finds the last occurrence of the field.
 
Result< T > Find (Occurrence occurrence)
 Finds the first or last occurrence of the field.
 

Member Function Documentation

◆ Find()

template<typename Derived , typename T >
Result< T > pw::protobuf::internal::FinderBase< Derived, T >::Find ( Occurrence  occurrence)
inline

Finds the first or last occurrence of the field.

Parameters
occurrenceWhether to find the first or last occurrence.
Returns
A Result containing the field on success or one of the following error codes on failure:

◆ Last()

template<typename Derived , typename T >
Result< T > pw::protobuf::internal::FinderBase< Derived, T >::Last ( )
inline

Finds the last occurrence of the field.

This method iterates through the message, calling Next() on the derived class repeatedly until the field is no longer found. The last successfully read value is returned.

Returns
A Result containing the last occurrence of the field on success or one of the following error codes on failure:
  • NOT_FOUND: The field is not present in the message.
  • Other errors from the underlying decoder.

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