Class MetadataEntryRef¶
Defined in File metadata.h
Inheritance Relationships¶
Base Type¶
public ouster::sdk::osf::MetadataEntryClass MetadataEntry
Class Documentation¶
-
class MetadataEntryRef : public ouster::sdk::osf::MetadataEntry¶
MetadataEntry wrapper for byte Flatbuffers bytes representation.
Used during deserialization and acts as regular polymorphic metadata type (almost).
Doesn’t own the memory of the underlying buffer.
Reconstructs itself to the concrete metadata type with:
as_type() - using the stored type() to recofer deserialization function
as<MetadataDerived>() OR metadata_pointer_as<MetadataDerived>() - using the specified derived metadata class.
Public Functions
-
explicit MetadataEntryRef(const OsfBuffer &buf)¶
Creates the metadata reference from Flatbuffers v2::MetadataEntry buffer.
No copy involved.
- Parameters:
buf[in] The buffer to create the MetadataEntryRef from.
-
virtual std::string type() const override¶
Return the type of the MetadataEntry.
- Returns:
The type of the MetadataEntry.
-
virtual std::string static_type() const override¶
Return the type of the MetadataEntry.
- Returns:
The type of the MetadataEntry.
-
virtual std::unique_ptr<MetadataEntry> clone() const override¶
Clone the MetadataEntry.
- Returns:
The cloned MetadataEntry object.
-
virtual std::vector<uint8_t> buffer() const final¶
Return the raw underlying buffer for the MetadataEntryRef.
- Returns:
The raw underlying byte vector.
-
std::unique_ptr<MetadataEntry> as_type() const¶
Reconstructs the object as concrete metadata of type() from the buffer() using registered deserialization function from_buffer() of current type.
- Returns:
The reconstructed object.
-
explicit MetadataEntryRef(const OsfBuffer &buf)¶