TDocumentAncestor Class

Manage an abstracted document file.

Unit: uDocumentsAncestor
System.TObject
  uDocumentsAncestor.TDocumentAncestor
    uDocumentsAncestor.TBinaryDocumentAncestor
    uDocumentsAncestor.TJSONDocumentAncestor
type TDocumentAncestor = class(TObject)

The TDocumentAncestor type exposes the following members.

Show:
 NameDescription
Create

Used to create a new instance of this class. It's better to use TDocument.DefaultDocument if you have only one document in your project, but create instances for each document if you want to edit more than one at the same time.

Top
Show:
 NameDescription
FileName

The FileName for this document (no path, no extension) if opened by LoadFromFile(WithAName) or it has been saved by SaveToFile(WithAName)

HasChanged

Returns True if a document parameter has changed since last Clear(), LoadXXX() or SaveXXX()

Path

Path to the folder where this document will be saved.

Top
Show:
 NameDescription
Clear

Used to clean current instance and reset all properties and fields to their default values

GetDocumentExtension

Returns the file extension for the storrage file of this document.

GetDocumentGUID

Returns the unique identifier used in the document jeader to check if the file is compatible with this project.

IsCrypted

Return True if this document is crypted.

LoadFromFile

Used to load the document from a file after clearing the instance.

SaveToFile

Used to save current document to a file

SetHasChanged

Top

Descend from its descendants for your real documents.