intro.bbdoc 994 B

12345678910111213141516171819
  1. <p>Persistence is a means of storing data beyond the execution of a program, in such a way that the data can be reproduced, in memory, at a later time.</p>
  2. <p>The Text.Persistence module attempts to do this through the use of reflection and xml.</p>
  3. <h3>Usage</h3>
  4. <p>
  5. The most simple usage is to pass an object into TPersist.Serialize(), which returns the serialized representation of it as a String.
  6. </p>
  7. <p>
  8. To reverse the process, the serialized String can be passed into TPersist.DeSerialize(), returning a new Object instance, which is essentially a "deep"
  9. copy of the original object.
  10. </p>
  11. <p>
  12. There are also methods, SerializeToFile(), SerializeToDoc(), and SerializeToStream() which output to different formats apporpriately.
  13. </p>
  14. <p>
  15. The DeSerialize() function itself can take a TxmlDoc, TStream or String data as a parameter, as well as there being the specialised methods of
  16. DeSerializeFromDoc(), DeSerializeFromFile(), and DeSerializeFromStream().
  17. </p>
  18. <p>
  19. </p>