engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FXmlFile类 参考

Class representing an XML file 更多...

#include <XmlFile.h>

Public 成员函数

void Clear ()
 Clears the file of all internals. 更多...
 
 FXmlFile ()
 Constructs the file without a path
 
 FXmlFile (const FString &InFile, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile)
 Constructs the file with the passed path. 更多...
 
FString GetLastError () const
 Gets the last error message from the class
 
FXmlNode * GetRootNode ()
 Returns the root node of the loaded file. 更多...
 
const FXmlNode * GetRootNode () const
 Returns the root node of the loaded file. 更多...
 
bool IsValid () const
 Checks to see if a file is loaded
 
bool LoadFile (const FString &Path, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile)
 Loads the file with the passed path. 更多...
 
bool Save (const FString &Path)
 Write to disk, UTF-16 format only at the moment 更多...
 

详细描述

Class representing an XML file

构造及析构函数说明

◆ FXmlFile()

FXmlFile::FXmlFile ( const FString &  InFile,
EConstructMethod::Type  ConstructMethod = EConstructMethod::ConstructFromFile 
)

Constructs the file with the passed path.

InFile is either treated as a filename to open, or as a text buffer to load.

参数
InFileThe path/text to use
ConstructMethodWhether to load a file of use the string as a buffer of xml data

成员函数说明

◆ Clear()

void FXmlFile::Clear ( )

Clears the file of all internals.

Note: Makes any existing pointers to FXmlNode's INVALID

◆ GetRootNode() [1/2]

FXmlNode * FXmlFile::GetRootNode ( )

Returns the root node of the loaded file.

nullptr if no file loaded. It is assumed that there will always be one and only one root node.

返回
Pointer to root node

◆ GetRootNode() [2/2]

const FXmlNode * FXmlFile::GetRootNode ( ) const

Returns the root node of the loaded file.

nullptr if no file loaded. It is assumed that there will always be one and only one root node.

返回
Pointer to root node

◆ LoadFile()

bool FXmlFile::LoadFile ( const FString &  Path,
EConstructMethod::Type  ConstructMethod = EConstructMethod::ConstructFromFile 
)

Loads the file with the passed path.

Path is either treated as a filename to open, or as a text buffer to load.

参数
PathThe path/text to use
ConstructMethodWhether to load a file of use the string as a buffer of xml data

◆ Save()

bool FXmlFile::Save ( const FString &  Path)

Write to disk, UTF-16 format only at the moment

参数
PathFile path to save to
返回
Whether writing the XML to a file succeeded

该类的文档由以下文件生成: