MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / toString

Method toString

src/Enum.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121
122String EnumBase_obj::toString() {
123 if (mFixedFields==0)
124 return _hx_tag;
125 if (mFixedFields==1)
126 return _hx_tag + HX_CSTRING("(") + _hx_getFixed()->asString() + HX_CSTRING(")");
127
128 Array<String> args = Array_obj<String>::__new(mFixedFields);
129 cpp::Variant *v = _hx_getFixed();
130 for(int i=0;i<mFixedFields;i++)
131 args[i] = v[i].asString();
132
133 return _hx_tag + HX_CSTRING("(") + args->join(HX_CSTRING(",")) + HX_CSTRING(")");
134}
135
136}
137

Callers 4

StringMethod · 0.45
CreateStringFunction · 0.45
__CompareMethod · 0.45
operator+Method · 0.45

Calls 3

_hx_getFixedFunction · 0.85
__newFunction · 0.85
asStringMethod · 0.80

Tested by

no test coverage detected