MCPcopy Create free account
hub / github.com/NativeScript/android / GetNodeType

Method GetNodeType

test-app/runtime/src/main/cpp/MetadataReader.cpp:174–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174uint8_t MetadataReader::GetNodeType(MetadataTreeNode *treeNode) {
175 if (treeNode->type == MetadataTreeNode::INVALID_TYPE) {
176 uint8_t nodeType;
177
178 uint32_t offsetValue = treeNode->offsetValue;
179
180 if (offsetValue == 0) {
181 nodeType = MetadataTreeNode::PACKAGE;
182 } else if ((0 < offsetValue) && (offsetValue < ARRAY_OFFSET)) {
183 nodeType = *(m_valueData + offsetValue);
184 } else if (offsetValue == ARRAY_OFFSET) {
185 nodeType = MetadataTreeNode::ARRAY;
186 } else {
187 uint16_t nodeId = offsetValue - ARRAY_OFFSET;
188 MetadataTreeNode * arrElemNode = GetNodeById(nodeId);
189 nodeType = *(m_valueData + arrElemNode->offsetValue);
190 }
191
192 treeNode->type = nodeType;
193 }
194
195 return treeNode->type;
196}
197
198MetadataTreeNode *MetadataReader::GetOrCreateTreeNodeByName(const string &className) {
199 MetadataTreeNode * treeNode = GetRoot();

Callers 10

MetadataNodeMethod · 0.80
IsNodeTypeInterfaceMethod · 0.80
CreateWrapperMethod · 0.80
PackageGetterCallbackMethod · 0.80
ExtendMethodCallbackMethod · 0.80
SetMissingBaseMethodsMethod · 0.80
GetSignatureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected