ArticyXImporter
ArticyXImporter for Unreal Engine
Loading...
Searching...
No Matches
UArticyArchiveReader Class Reference

#include <ArticyArchiveReader.h>

Inheritance diagram for UArticyArchiveReader:

Public Member Functions

bool OpenArchive (const FString &InArchiveFileName)
bool ReadFile (const FString &Filename, FString &OutResult) const
bool FetchJson (const TSharedPtr< FJsonObject > &JsonRoot, const FString &FieldName, FString &Hash, TSharedPtr< FJsonObject > &OutJsonObject) const

Static Public Member Functions

static FString ArchiveBytesToString (const uint8 *In, int32 Count)

Protected Member Functions

bool ReadHeader ()
bool ReadFileData ()

Protected Attributes

FString ArchiveFileName
FArticyArchiveHeader Header
TMap< FString, FArticyArchiveFileDataFileDictionary

Detailed Description

Class responsible for reading and processing Articy archives.

Member Function Documentation

◆ ArchiveBytesToString()

FString UArticyArchiveReader::ArchiveBytesToString ( const uint8 * In,
int32 Count )
static

Converts an array of bytes to a string, assuming UTF-8 encoding.

Parameters
InThe byte array to convert.
CountThe number of bytes in the array.
Returns
The resulting string.

◆ FetchJson()

bool UArticyArchiveReader::FetchJson ( const TSharedPtr< FJsonObject > & JsonRoot,
const FString & FieldName,
FString & Hash,
TSharedPtr< FJsonObject > & OutJsonObject ) const

Fetches a JSON object from the archive, verifying the hash for changes.

Parameters
JsonRootThe root JSON object to search within.
FieldNameThe field name containing the desired JSON object.
HashThe hash value to check against.
OutJsonObjectThe resulting JSON object, if found and changed.
Returns
True if the JSON object was successfully fetched and changed; otherwise, false.

◆ OpenArchive()

bool UArticyArchiveReader::OpenArchive ( const FString & InArchiveFileName)

Opens an archive file for reading.

Parameters
InArchiveFileNameThe name of the archive file to open.
Returns
True if the archive was successfully opened and read; otherwise, false.

◆ ReadFile()

bool UArticyArchiveReader::ReadFile ( const FString & Filename,
FString & OutResult ) const

Reads a file from the archive.

Parameters
FilenameThe name of the file to read from the archive.
OutResultThe string that will receive the file's content.
Returns
True if the file was successfully read; otherwise, false.

◆ ReadFileData()

bool UArticyArchiveReader::ReadFileData ( )
protected

Reads file data from the archive, populating the file dictionary.

Returns
True if the file data was successfully read; otherwise, false.

◆ ReadHeader()

bool UArticyArchiveReader::ReadHeader ( )
protected

Reads the header from the archive file.

Returns
True if the header was successfully read; otherwise, false.

Member Data Documentation

◆ ArchiveFileName

FString UArticyArchiveReader::ArchiveFileName
protected

The name of the archive file.

◆ FileDictionary

TMap<FString, FArticyArchiveFileData> UArticyArchiveReader::FileDictionary
protected

The dictionary of files contained in the archive.

◆ Header

FArticyArchiveHeader UArticyArchiveReader::Header
protected

The header information of the archive.


The documentation for this class was generated from the following files: