DayZ 1.24
Loading...
Searching...
No Matches
typename Class Reference

Private Member Functions

proto volatile Class Spawn ()
 Dynamic variant to 'new' keyword. It creates new instance of class.
 
proto owned string GetModule ()
 Get the name of the module the typename belongs to.
 
proto native owned string ToString ()
 Returns type name of variable as string.
 
proto native bool IsInherited (typename baseType)
 Returns true when type is the same as 'baseType', or inherited one.
 
proto native int GetVariableCount ()
 
proto native owned string GetVariableName (int vIdx)
 
proto native GetVariableType (int vIdx)
 
proto bool GetVariableValue (Class var, int vIdx, out void val)
 

Static Private Member Functions

static string EnumToString (typename e, int enumValue)
 Return string name of enum value.
 
static int StringToEnum (typename e, string enumName)
 Return enum value from string name.
 

Detailed Description

Definition at line 509 of file EnConvert.c.

Member Function Documentation

◆ EnumToString()

static string typename::EnumToString ( typename e ,
int enumValue )
inlinestaticprivate

Return string name of enum value.

static string EnumToString(typename e, int enumValue)
Return string name of enum value.
Definition EnConvert.c:551
proto void Print(void var)
Prints content of variable to console/log.

Definition at line 551 of file EnConvert.c.

552 {
553 int cnt = e.GetVariableCount();
554 int val;
555
556 for (int i = 0; i < cnt; i++)
557 {
558 if (e.GetVariableType(i) == int && e.GetVariableValue(null, i, val) && val == enumValue)
559 return e.GetVariableName(i);
560 }
561
562 return "unknown";
563 }

◆ GetModule()

proto owned string typename::GetModule ( )
private

Get the name of the module the typename belongs to.

Returns
string Name of parent module (1_Core)

◆ GetVariableCount()

proto native int typename::GetVariableCount ( )
private

◆ GetVariableName()

proto native owned string typename::GetVariableName ( int vIdx)
private

◆ GetVariableType()

proto native typename::GetVariableType ( int vIdx)
private

◆ GetVariableValue()

proto bool typename::GetVariableValue ( Class var,
int vIdx,
out void val )
private

◆ IsInherited()

proto native bool typename::IsInherited ( typename baseType )
private

Returns true when type is the same as 'baseType', or inherited one.

Parameters
baseTypetypename
Returns
bool true when type is the same as 'baseType', or inherited one.
???

◆ Spawn()

proto volatile Class typename::Spawn ( )
private

Dynamic variant to 'new' keyword. It creates new instance of class.

Returns
volatile instance of class
???

◆ StringToEnum()

static int typename::StringToEnum ( typename e ,
string enumName )
inlinestaticprivate

Return enum value from string name.

Print( typename.StringToEnum(DialogPriority, "WARNING") );
static int StringToEnum(typename e, string enumName)
Return enum value from string name.
Definition EnConvert.c:571

Definition at line 571 of file EnConvert.c.

572 {
573 int count = e.GetVariableCount();
574 int value;
575
576 for (int i = 0; i < count; i++)
577 {
578 if (e.GetVariableType(i) == int && e.GetVariableValue(null, i, value) && e.GetVariableName(i) == enumName)
579 return value;
580 }
581
582 return -1;
583 }

◆ ToString()

proto native owned string typename::ToString ( )
private

Returns type name of variable as string.


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