IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
ideserializer.py
Go to the documentation of this file.
1from abc import ABC, abstractmethod
2from typing import TextIO
3
4from ids_peak_common.serialization.iarchive import IArchive
5
6
7class IDeserializer(ABC):
8 """!
9 @brief
10 Interface for deserializing structured data from an input stream into an archive.
11
12 This interface defines the contract for reconstructing archive objects
13 from serialized representations stored in a file, buffer, or other input source.
14
15 @ingroup ids_peak_common_python_serialization
16
17 @since ids_peak_common 1.1
18 """
19
20 @abstractmethod
21 def read(self, stream: TextIO) -> IArchive:
22 """!
23 @brief
24 Deserializes data from the specified input stream into an archive.
25
26 This method reads raw data from the provided input stream and converts it
27 into a structured :class:`IArchive` object. The stream must be open, valid,
28 and ready for reading before this function is called.
29
30 @param stream: The input stream to read from.
31 It should point to the beginning of a valid archive format.
32 @return A deserialized IArchive instance.
33
34 @since ids_peak_common 1.1
35 """
36 pass
Interface for deserializing structured data from an input stream into an archive.
IArchive read(self, TextIO stream)
Deserializes data from the specified input stream into an archive.