A type of ESerializer suitable for serialization and deserialization to and from memory buffers. More...
#include <eVision/Easy/ESerializer.h>
Public Member Functions | |
| EFileSerializer (eVision::ESerializerMode mode, const std::string &filePath, eVision::ESerializerFileWriterMode fileWriterMode) | |
| Creates an instance of EFileSerializer either in read mode or write mode. | |
| EFileSerializer (eVision::ESerializerMode mode, const std::string &filePath) | |
| Creates an instance of EFileSerializer either in read mode or write mode. | |
| virtual | ~EFileSerializer () throw () |
| virtual eVision::ESerializerMode | GetMode () const |
| The current mode of the serializer. | |
| virtual void | Close () |
| Closes the EFileSerializer::EFileSerializer object and frees the file handle created during the construction of this object. | |
| virtual bool | GetClosed () const |
| Indicates if the ESerializer is closed or not. | |
| virtual bool | GetWriting () const |
| Returns true if the ESerializer object has been created for writing and false otherwise. | |
| EFileSerializer (CppWrapperInternal::InternalConstructor) | |
| Public Member Functions inherited from eVision::ESerializer | |
| virtual | ~ESerializer () throw () |
| ESerializer (CppWrapperInternal::InternalConstructor) | |
Additional Inherited Members | |
| Static Public Member Functions inherited from eVision::ESerializer | |
| static std::unique_ptr< eVision::ESerializer > | CreateFileWriter (const std::string &filePath, eVision::ESerializerFileWriterMode mode) |
| Returns an ESerializer object suitable for opening a file and writing into it. | |
| static std::unique_ptr< eVision::ESerializer > | CreateFileWriter (const std::string &filePath) |
| Returns an ESerializer object suitable for opening a file and writing into it. | |
| static std::unique_ptr< eVision::ESerializer > | CreateFileReader (const std::string &filePath) |
| Returns an ESerializer object suitable for reading from a file. | |
| static std::unique_ptr< eVision::ESerializer > | CreateMemoryWriter () |
| Returns an ESerializer object suitable for serializing into a buffer. | |
| static std::unique_ptr< eVision::ESerializer > | CreateMemoryWriter (uint32_t initialBufferSize) |
| Returns an ESerializer object suitable for serializing into a buffer. | |
| static std::unique_ptr< eVision::ESerializer > | CreateMemoryWriter (void *buffer, uint32_t size) |
| Returns an ESerializer object suitable for serializing into a buffer. | |
| static std::unique_ptr< eVision::ESerializer > | CreateMemoryReader (void *buffer, uint32_t size) |
| Returns an ESerializer object suitable for reading from a buffer. | |
| static std::unique_ptr< eVision::ESerializer > | CreateMemoryReader (const std::vector< uint8_t > &bytes) |
| Returns an ESerializer object suitable for reading from a buffer. | |
| static std::unique_ptr< eVision::ESerializer > | CreateCallbackWriter (void *isEOS, void *setCurrentPos, void *getCurrentPos, void *serializeMemory, void *close, void *cookie) |
| static std::unique_ptr< eVision::ESerializer > | CreateCallbackReader (void *isEOS, void *setCurrentPos, void *getCurrentPos, void *serializeMemory, void *close, void *cookie) |
| Public Attributes inherited from eVision::ESerializer | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
A type of ESerializer suitable for serialization and deserialization to and from memory buffers.
Call to EFileSerializer::Close is mandatory after usage to ensure the file handle used by this class is properly released.
License(s): None
| eVision::EFileSerializer::EFileSerializer | ( | eVision::ESerializerMode | mode, |
| const std::string & | filePath, | ||
| eVision::ESerializerFileWriterMode | fileWriterMode ) |
Creates an instance of EFileSerializer either in read mode or write mode.
| mode | The serializer mode, read or write. |
| filePath | Full path and name specification of the file to be used to create the EFileSerializer object. |
| fileWriterMode | Used only in write mode. Creation mode of the storage file, as defined by ESerializerFileWriterMode (defaults to overwrite mode). |
The ESerializerFileWriterMode parameter is an enumerated type that allows to control what happens when the EFileSerializer is used in write mode and the file already exists:
| eVision::EFileSerializer::EFileSerializer | ( | eVision::ESerializerMode | mode, |
| const std::string & | filePath ) |
Creates an instance of EFileSerializer either in read mode or write mode.
| mode | The serializer mode, read or write. |
| filePath | Full path and name specification of the file to be used to create the EFileSerializer object. |
The ESerializerFileWriterMode parameter is an enumerated type that allows to control what happens when the EFileSerializer is used in write mode and the file already exists:
|
virtual | ||||||||||||
| eVision::EFileSerializer::EFileSerializer | ( | CppWrapperInternal::InternalConstructor | ) |
|
virtual |
Closes the EFileSerializer::EFileSerializer object and frees the file handle created during the construction of this object.
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 from eVision::ESerializer.
|
virtual |
Indicates if the ESerializer is closed or not.
Implements eVision::ESerializer.
|
virtual |
The current mode of the serializer.
Implements eVision::ESerializer.
|
virtual |
Returns true if the ESerializer object has been created for writing and false otherwise.
Reimplemented from eVision::ESerializer.