LibreOffice
LibreOffice 24.2 SDK API Reference
|
allows to make UNO objects persistent More...
import"XPersistObject.idl";
Public Member Functions | |
string | getServiceName () |
gives the service name of the object More... | |
void | write ([in] com::sun::star::io::XObjectOutputStream OutStream) raises ( com::sun::star::io::IOException ) |
writes all the persistent data of the object to the stream. More... | |
void | read ([in] com::sun::star::io::XObjectInputStream InStream) raises ( com::sun::star::io::IOException ) |
reads all the persistent data of the object from the stream. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
allows to make UNO objects persistent
Every UNO object, that wants to be serializable, should implement this interface. The object stores stores itself, when the write method is called.
The object needs to be created before it deserializes itself again (by using the read method). Therefore it must be creatable by name via a factory, which is in general the global service manager. The create and read mechanism is implemented by the com::sun::star::io::ObjectInputStream.
The serialization format (the series of strings, integers, objects) must be specified at the specification of the concrete service.
The interface does not support any special versioning mechanism.
string getServiceName | ( | ) |
gives the service name of the object
This name is used to create such an object by a factory during deserialization.
void read | ( | [in] com::sun::star::io::XObjectInputStream | InStream | ) | |
raises | ( | com::sun::star::io::IOException | |||
) |
reads all the persistent data of the object from the stream.
In case other XPersistObjects are read from the stream, the implementation uses a factory to create these objects (in general the global service manager).
The implementation must read the data in the order documented at the service specification.
InStream | the stream, the data shall be read from. |
void write | ( | [in] com::sun::star::io::XObjectOutputStream | OutStream | ) | |
raises | ( | com::sun::star::io::IOException | |||
) |
writes all the persistent data of the object to the stream.
The implementation must write the data in the order documented in the service specification.
OutStream | the stream, the data shall be written to. The stream supports simple types and other XPersistObject implementations. |