Download Now

    Reference IFiler

    Declared in Codebot.Text.Xml.pas on line 41

    IFiler reads and writes typed values to xml nodes selected by an xpath key. Read methods return a default value when the key is not found, and when Stored is true the default value is also written to the document.
      IFiler = interface
      public
        { Write an encrypted string value }
        procedure Encrypt(const Key, Value: string);
        { Read and decrypt a string value }
        function Decrypt(const Key: string): string;
        { Read a string value }
        function ReadStr(const Key: string; const DefValue: string = ''; Stored: Boolean = False): string;
        { Write a string value }
        procedure WriteStr(const Key, Value: string);
        { Read a boolean value }
        function ReadBool(const Key: string; const DefValue: Boolean = False; Stored: Boolean = False): Boolean;
        { Write a boolean value }
        procedure WriteBool(const Key: string; Value: Boolean);
        { Read an integer value }
        function ReadInt(const Key: string; const DefValue: Integer = 0; Stored: Boolean = False): Integer;
        { Write an integer value }
        procedure WriteInt(const Key: string; Value: Integer);
        { Read a 64 bit integer value }
        function ReadInt64(const Key: string; const DefValue: Int64 = 0; Stored: Boolean = False): Int64;
        { Write a 64 bit integer value }
        procedure WriteInt64(const Key: string; Value: Int64);
        { Read a float value }
        function ReadFloat(const Key: string; const DefValue: Single = 0; Stored: Boolean = False): Single;
        { Write a float value }
        procedure WriteFloat(const Key: string; Value: Single);
        { Read a date value }
        function ReadDate(const Key: string; const DefValue: TDateTime = 0; Stored: Boolean = False): TDateTime;
        { Write a date value }
        procedure WriteDate(const Key: string; Value: TDateTime);
        { The document the filer writes to }
        property Document: IDocument read GetDocument;
      end;

    See also