Class SimpleTextSerializer
Defined in File simple_text_serializer.hpp
Base Type
public holoscan::Resource
(Class Resource)
-
class SimpleTextSerializer : public holoscan::Resource
-
Public Functions
- HOLOSCAN_RESOURCE_FORWARD_ARGS_SUPER (SimpleTextSerializer, Resource) SimpleTextSerializer()=default
-
~SimpleTextSerializer() override = default
-
virtual void setup(ComponentSpec &spec) override
Define the resource specification.
- Parameters
spec – The reference to the component specification.
-
bool can_handle_message(const std::type_info &message_type) const
-
std::string serialize_to_string(std::any data)
Serialize data to a simple text string.
Serialize tensor data to a simple text string.
-
std::string serialize_tensormap_to_string(const TensorMap &tensor_map, bool log_data_content = false)
Serialize tensor map data to a simple text string.
Serialize metadata to a simple text string.
-
template<typename T>
inline void register_encoder(std::function<std::string(const std::any&)> encoder) Register a custom encoder for a specific type.
- Template Parameters
T – The type to register an encoder for
- Parameters
encoder – Function that takes const std::any& and returns std::string