TXMLToRODL
Overview
The TXMLToRODL class is a specialization of the TRODLReader class for decoding streamed RODL data in the XML format into a TRODLLibrary instance. You may use it to load RODL files, resources, etc.
Use case
Take a look at this excerpt from the 'uRODL.pas' file:
function ReadRODLFromFile(aReaderClass: TRODLReaderClass; const aFileName: string): TRODLLibrary;
begin
with aReaderClass.Create do try
result := ReadFromFile(aFileName);
finally
Free;
end;
end;
It
may be used as
//...
var
lib: TRODLLibrary;
begin
lib := ReadRODLFromFile(TXMLToRODL,
'...');
//...
Location
- Unit: uXMLToRODL.pas
- Ancestry: TRODLReader | TXMLToRODL
constructor Create virtual (declared in TRODLReader)
Creates a new instance with a supplied values.
constructor Create(aAddToExisting: TRODLLibrary; aRecreateGuids: Boolean)
Parameters:
- aAddToExisting:
- aRecreateGuids:
GetFormat override
Returns current format
class function GetFormat: string
IntReadFromStream protected virtual (declared in TRODLReader)
function IntReadFromStream(Source: TStream; aFilename: string): TRODLLibrary
Parameters:
- Source:
- aFilename:
LoadFileToLibrary (declared in TRODLReader)
Loads library from file
class procedure LoadFileToLibrary(aFilename: string; aLibrary: TRODLLibrary; aRodlUse: TRODLUse; aRecreateGuids: Boolean)
Parameters:
- aFilename: Filename
- aLibrary: Library
- aRodlUse: Specifies current rodl use
- aRecreateGuids: Recreate guids or not
LoadStreamToLibrary protected override
Loads library from stream
procedure LoadStreamToLibrary(Source: TStream; aLibrary: TRODLLibrary; aRodlName: string; aRodlUse: TRODLUse; aReplaceLibraryAttributes: Boolean)
Parameters:
- Source: Source stream
- aLibrary: Rodl library
- aRodlName: Rodl name
- aRodlUse: Specifies rodl use
- aReplaceLibraryAttributes: Replace library attributes or not
Read (TStream, string): TRODLLibrary overload (declared in TRODLReader)
function Read(Source: TStream; const aFilename: string): TRODLLibrary
Parameters:
- Source:
- aFilename:
Read (TStream, TRODLLibrary, string, Boolean): TRODLLibrary overload (declared in TRODLReader)
class function Read(Source: TStream; aAddToExisting: TRODLLibrary; const aFilename: string; aRecreateGuids: Boolean): TRODLLibrary
Parameters:
- Source:
- aAddToExisting:
- aFilename:
- aRecreateGuids:
ReadFromFile (declared in TRODLReader)
function ReadFromFile(const aFileName: string): TRODLLibrary
Parameters:
- aFileName:
ReadFromString (ROUTF8String, string): TRODLLibrary overload (declared in TRODLReader)
function ReadFromString(const anUTF8String: ROUTF8String; const aFilename: string): TRODLLibrary
Parameters:
- anUTF8String:
- aFilename:
ReadFromString (ROUTF8String, TRODLLibrary, string, Boolean): TRODLLibrary overload (declared in TRODLReader)
class function ReadFromString(const anUTF8String: ROUTF8String; aAddToExisting: TRODLLibrary; const aFilename: string; aRecreateGuids: Boolean): TRODLLibrary
Parameters:
- anUTF8String:
- aAddToExisting:
- aFilename:
- aRecreateGuids:
GetFormat override
Returns current format
class function GetFormat: string
LoadFileToLibrary (declared in TRODLReader)
Loads library from file
class procedure LoadFileToLibrary(aFilename: string; aLibrary: TRODLLibrary; aRodlUse: TRODLUse; aRecreateGuids: Boolean)
Parameters:
- aFilename: Filename
- aLibrary: Library
- aRodlUse: Specifies current rodl use
- aRecreateGuids: Recreate guids or not
Read (TStream, TRODLLibrary, string, Boolean): TRODLLibrary overload (declared in TRODLReader)
class function Read(Source: TStream; aAddToExisting: TRODLLibrary; const aFilename: string; aRecreateGuids: Boolean): TRODLLibrary
Parameters:
- Source:
- aAddToExisting:
- aFilename:
- aRecreateGuids:
ReadFromString (ROUTF8String, TRODLLibrary, string, Boolean): TRODLLibrary overload (declared in TRODLReader)
class function ReadFromString(const anUTF8String: ROUTF8String; aAddToExisting: TRODLLibrary; const aFilename: string; aRecreateGuids: Boolean): TRODLLibrary
Parameters:
- anUTF8String:
- aAddToExisting:
- aFilename:
- aRecreateGuids:
constructor Create virtual (declared in TRODLReader)
Creates a new instance with a supplied values.
constructor Create(aAddToExisting: TRODLLibrary; aRecreateGuids: Boolean)
Parameters:
- aAddToExisting:
- aRecreateGuids:
IntReadFromStream protected virtual (declared in TRODLReader)
function IntReadFromStream(Source: TStream; aFilename: string): TRODLLibrary
Parameters:
- Source:
- aFilename:
LoadStreamToLibrary protected override
Loads library from stream
procedure LoadStreamToLibrary(Source: TStream; aLibrary: TRODLLibrary; aRodlName: string; aRodlUse: TRODLUse; aReplaceLibraryAttributes: Boolean)
Parameters:
- Source: Source stream
- aLibrary: Rodl library
- aRodlName: Rodl name
- aRodlUse: Specifies rodl use
- aReplaceLibraryAttributes: Replace library attributes or not
Read (TStream, string): TRODLLibrary overload (declared in TRODLReader)
function Read(Source: TStream; const aFilename: string): TRODLLibrary
Parameters:
- Source:
- aFilename:
ReadFromFile (declared in TRODLReader)
function ReadFromFile(const aFileName: string): TRODLLibrary
Parameters:
- aFileName:
ReadFromString (ROUTF8String, string): TRODLLibrary overload (declared in TRODLReader)
function ReadFromString(const anUTF8String: ROUTF8String; const aFilename: string): TRODLLibrary
Parameters:
- anUTF8String:
- aFilename: