MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / AS_GetFloatingContents

Function AS_GetFloatingContents

Source/GUI/IMUI/imui_script.cpp:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114static CScriptArray* AS_GetFloatingContents(IMContainer* element) {
115 asIScriptContext* ctx = asGetActiveContext();
116 asIScriptEngine* engine = ctx->GetEngine();
117 asITypeInfo* arrayType = engine->GetTypeInfoById(engine->GetTypeIdByDecl("array<IMElement@>"));
118 CScriptArray* array = CScriptArray::Create(arrayType, (asUINT)0);
119
120 std::vector<IMElement*> vals = element->getFloatingContents();
121
122 array->Reserve(vals.size());
123
124 for (auto& val : vals) {
125 array->InsertLast((void*)&val);
126 }
127
128 return array;
129}
130
131static CScriptArray* AS_GetContainers(IMDivider* element) {
132 asIScriptContext* ctx = asGetActiveContext();

Callers

nothing calls this directly

Calls 8

GetTypeInfoByIdMethod · 0.80
getFloatingContentsMethod · 0.80
CreateFunction · 0.50
GetEngineMethod · 0.45
GetTypeIdByDeclMethod · 0.45
ReserveMethod · 0.45
sizeMethod · 0.45
InsertLastMethod · 0.45

Tested by

no test coverage detected