Arma Reforger Script API
Loading...
Searching...
No Matches
LocParserRule Interface Reference

Localisation rule controlled by LocParserManager. More...

Inheritance diagram for LocParserRule:
LocParserRule_Custom

Public Member Functions

string GetID (string fileName, string varName, array< BaseContainer > objects, array< int > indexes)
 Get intended ID of the string.
 
bool Evaluate (string fileName, string varName, array< BaseContainer > objects)
 Check if the string can be localized according to this rule.
 
BaseContainer Localize (string fileName, string varName, array< BaseContainer > objects, string id, string text)
 Check if the string can be localized according to this rule.
 
void InitRule (notnull LocParserManager config)
 

Protected Attributes

ref CustomStringTableItem m_ItemTemplate
 
LocParserManager m_Config
 

Detailed Description

Localisation rule controlled by LocParserManager.

When parsing files, each found string is evaluated towards all available rules.

Member Function Documentation

◆ Evaluate()

bool LocParserRule.Evaluate ( string fileName,
string varName,
array< BaseContainer > objects )

Check if the string can be localized according to this rule.

To be overloaded by inherited classes.

Parameters
[in]fileNameName of the file (without path or extension) in which the string is
[in]varNameName of the variable which holds the string
[in]objectsHierarchy of script classes leading to the string, starting from the bottom-most one
Returns
True if the string can be localized

Implemented in LocParserRule_Custom.

◆ GetID()

string LocParserRule.GetID ( string fileName,
string varName,
array< BaseContainer > objects,
array< int > indexes )

Get intended ID of the string.

To be overloaded by inherited classes.

Parameters
[in]fileNameName of the file (without path or extension) in which the string is
[in]varNameName of the variable which holds the string
[in]objectsHierarchy of script classes leading to the string, starting from the bottom-most one
[out]indexItem index (when in array)
Returns
Localization ID

Implemented in LocParserRule_Custom.

◆ InitRule()

void LocParserRule.InitRule ( notnull LocParserManager config)
Parameters
[in]config

◆ Localize()

BaseContainer LocParserRule.Localize ( string fileName,
string varName,
array< BaseContainer > objects,
string id,
string text )

Check if the string can be localized according to this rule.

To be overloaded by inherited classes.

Parameters
[in]fileNameName of the file (without path or extension) in which the string is
[in]varNameName of the variable which holds the string
[in]objectsHierarchy of script classes leading to the string, starting from the bottom-most one
[in]idIntended localization ID
[in]textContent of the string
Returns
Newly added container (can be null if no new container was added, e.g., when only logging or when it already existed in the database)

Member Data Documentation

◆ m_Config

LocParserManager LocParserRule.m_Config
protected

◆ m_ItemTemplate

ref CustomStringTableItem LocParserRule.m_ItemTemplate
protected

The documentation for this interface was generated from the following file: