Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

serializer -- serialization and deserialization of Dao data types

The module implements conversion of Dao data types to internal textual serialization format and vice versa

Index

namespace std

Functions:

Functions

serialize(invar value: any) => string

Serializes value to text. For a class instance to be serializeable, its class should define serialize() method returning instance-related data to be serialized

deserialize(text: string ) => any

Deserializes value from text. For a class instance to be deserializeable, its class should provide constructor compatible with the data returned by the serialize() method; if the latter returns a tuple, the constructor should accept parameters corresponding to the individual fields of that tuple

Errors: Deserialize if deserialization failed

backup(dest = "backup.sdo", limit = 0)

Saves the current state of the program to the file specified by dest. if limit is greater then 0, objects whose serialized size exceeds limit * 1000 bytes are not included in the backup

Errors: File if failed to write to dest

restore(source = "backup.sdo")

Restores previously saved program state from the file specified by source

Errors: File if failed to read to dest, Deserialize if deserialization failed