Abstract interface for file-like objects. More...

Public Member Functions | |
| None | Close (self) |
| Closes the eVision.ESerializer object and frees any underlying ressource it could have reserved. | |
| eVision.ESerializerMode | Mode (self) |
| The current mode of the serializer. | |
| bool | Closed (self) |
| Indicates if the eVision.ESerializer is closed or not. | |
| bool | Writing (self) |
| Returns true if the eVision.ESerializer object has been created for writing and false otherwise. | |
Static Public Member Functions | |
| eVision.ESerializer|None | CreateFileWriter (str filePath, eVision.ESerializerFileWriterMode mode) |
| Returns an eVision.ESerializer object suitable for opening a file and writing into it. | |
| eVision.ESerializer|None | CreateFileWriter (str filePath) |
| Returns an eVision.ESerializer object suitable for opening a file and writing into it. | |
| eVision.ESerializer|None | CreateFileReader (str filePath) |
| Returns an eVision.ESerializer object suitable for reading from a file. | |
| eVision.ESerializer|None | CreateMemoryWriter () |
| Returns an eVision.ESerializer object suitable for serializing into a buffer. | |
| eVision.ESerializer|None | CreateMemoryWriter (int initialBufferSize) |
| Returns an eVision.ESerializer object suitable for serializing into a buffer. | |
| eVision.ESerializer|None | CreateMemoryWriter (ctypes.c_void_p buffer, int size) |
| Returns an eVision.ESerializer object suitable for serializing into a buffer. | |
| eVision.ESerializer|None | CreateMemoryReader (ctypes.c_void_p buffer, int size) |
| Returns an eVision.ESerializer object suitable for reading from a buffer. | |
| eVision.ESerializer|None | CreateMemoryReader (list[int] bytes) |
| Returns an eVision.ESerializer object suitable for reading from a buffer. | |
Abstract interface for file-like objects.
Remarks:
The eVision.ESerializer object manages operations of reading from and writing to an archive (a file on the system hard disk, for instance). eVision.ESerializer objects cannot be instantiated directly. To create an eVision.ESerializer object, one of the following static factory methods has to be used:
License(s): None
| None eVision.ESerializer.Close | ( | self | ) |
Closes the eVision.ESerializer object and frees any underlying ressource it could have reserved.
This method is always called implicitly during the destruction of the object. It is still recommended to call it explicitly in programming languages other than C++ to ensure the underlying ressources are correctly released.
This method never throws exceptions.
Reimplemented in eVision.ECallbackSerializer, eVision.EFileSerializer, and eVision.EMemorySerializer.
| bool eVision.ESerializer.Closed | ( | self | ) |
Indicates if the eVision.ESerializer is closed or not.
Reimplemented in eVision.ECallbackSerializer, eVision.EFileSerializer, and eVision.EMemorySerializer.
|
static |
Returns an eVision.ESerializer object suitable for reading from a file.
Remarks:
If the call does not succeed, it returns NULL. Please check the eVision error code to get further informations.
Call to eVision.ESerializer.Close is mandatory after usage to ensure the file handle used by this object is properly released.
Instantiate directly eVision.EFileSerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| filePath | Full path and name specification of the file to be used to create the eVision.ESerializer object. |
|
static |
Returns an eVision.ESerializer object suitable for opening a file and writing into it.
Remarks:
The eVision.ESerializerFileWriterMode parameter is an enumerated type that allows to control what happens when the file already exists:
If the call does not succeed, it returns NULL. Please check the eVision error code to get further information.
Call to eVision.ESerializer.Close is mandatory after usage to ensure the file handle used by this object is properly released.
Instantiate directly eVision.EFileSerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| filePath | Full path and name specification of the file to be used to create the eVision.ESerializer object. |
|
static |
Returns an eVision.ESerializer object suitable for opening a file and writing into it.
Remarks:
The eVision.ESerializerFileWriterMode parameter is an enumerated type that allows to control what happens when the file already exists:
If the call does not succeed, it returns NULL. Please check the eVision error code to get further information.
Call to eVision.ESerializer.Close is mandatory after usage to ensure the file handle used by this object is properly released.
Instantiate directly eVision.EFileSerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| filePath | Full path and name specification of the file to be used to create the eVision.ESerializer object. |
| mode | Creation mode of the storage file, as defined by eVision.ESerializerFileWriterMode (by default, Overwrite). |
|
static |
Returns an eVision.ESerializer object suitable for reading from a buffer.
Remarks:
It is up to users to delete the eVision.ESerializer object when they have done using it in Load calls.
Instantiate directly a eVision.EMemorySerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| buffer | Address of an external buffer to be used by the memory serializer. |
Those bytes will be copied into the returned object's internal buffer.
| size | Size of the external buffer. |
|
static |
Returns an eVision.ESerializer object suitable for reading from a buffer.
Remarks:
It is up to users to delete the eVision.ESerializer object when they have done using it in Load calls.
Instantiate directly a eVision.EMemorySerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| bytes | A vector containing a list of bytes to read. |
Those bytes will be copied into the returned object's internal buffer.
|
static |
Returns an eVision.ESerializer object suitable for serializing into a buffer.
Remarks:
If a buffer is not provided, a buffer will be automatically created and managed internally by the object.
Please note that, in this case, if you didn't provide a size, the buffer will be automatically resized as needed.
It is up to users to delete the eVision.ESerializer object when they have done using it in Save calls.
The returned serializer underlying type is eVision.EMemorySerializer, for more information, see the class documentation.
Instantiate directly eVision.EMemorySerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
|
static |
Returns an eVision.ESerializer object suitable for serializing into a buffer.
Remarks:
If a buffer is not provided, a buffer will be automatically created and managed internally by the object.
Please note that, in this case, if you didn't provide a size, the buffer will be automatically resized as needed.
It is up to users to delete the eVision.ESerializer object when they have done using it in Save calls.
The returned serializer underlying type is eVision.EMemorySerializer, for more information, see the class documentation.
Instantiate directly eVision.EMemorySerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| buffer | Address of the buffer to be used by the memory serializer. |
| size | Size of the buffer to be used by the memory serializer. |
|
static |
Returns an eVision.ESerializer object suitable for serializing into a buffer.
Remarks:
If a buffer is not provided, a buffer will be automatically created and managed internally by the object.
Please note that, in this case, if you didn't provide a size, the buffer will be automatically resized as needed.
It is up to users to delete the eVision.ESerializer object when they have done using it in Save calls.
The returned serializer underlying type is eVision.EMemorySerializer, for more information, see the class documentation.
Instantiate directly eVision.EMemorySerializer using its constructor instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| initialBufferSize | Size to which allocate the buffer used internally by the memory serializer. |
| eVision.ESerializerMode eVision.ESerializer.Mode | ( | self | ) |
The current mode of the serializer.
Reimplemented in eVision.ECallbackSerializer, eVision.EFileSerializer, and eVision.EMemorySerializer.
| bool eVision.ESerializer.Writing | ( | self | ) |
Returns true if the eVision.ESerializer object has been created for writing and false otherwise.
Use eVision.ESerializer.Mode instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
Reimplemented in eVision.EFileSerializer.