IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
iserializer.py
Go to the documentation of this file.
1from abc import ABC, abstractmethod
2from typing import TextIO
3
5
6
7class ISerializer(ABC):
8 """!
9 @brief
10 Interface for serializing data to an output stream.
11
12 This interface defines a contract for writing structured or binary data
13 into an output stream.
14
15 Implementations of this interface are responsible for formatting and
16 writing the contents of one or more archives to a given output destination.
17
18 @ingroup ids_peak_common_python_serialization
19
20 @since ids_peak_common 1.1
21 """
22
23 @abstractmethod
24 def write(self, archive: IArchive, stream: TextIO) -> None:
25 """!
26 @brief
27 Serializes data and writes it to the specified output stream.
28
29 @param archive: The archive which will be written to the output.
30 @param stream: The output stream (e.g., file or buffer) to which
31 serialized data will be written.
32
33 @since ids_peak_common 1.1
34 """
35 pass
Interface for serializing data to an output stream.
Definition iserializer.py:7
None write(self, IArchive archive, TextIO stream)
Serializes data and writes it to the specified output stream.