| 1081 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1082 | |
| 1083 | void FGFDMExec::BuildPropertyCatalog(struct PropertyCatalogStructure* pcs) |
| 1084 | { |
| 1085 | auto pcsNew = std::make_unique<struct PropertyCatalogStructure>(); |
| 1086 | const SGPropertyNode* root_node = instance->GetNode(); |
| 1087 | const string root_name = GetFullyQualifiedName(root_node) + "/"; |
| 1088 | const size_t root_name_length = root_name.length(); |
| 1089 | |
| 1090 | for (int i=0; i<pcs->node->nChildren(); i++) { |
| 1091 | string access=""; |
| 1092 | pcsNew->base_string = pcs->base_string + "/" + pcs->node->getChild(i)->getNameString(); |
| 1093 | int node_idx = pcs->node->getChild(i)->getIndex(); |
| 1094 | if (node_idx != 0) { |
| 1095 | pcsNew->base_string = CreateIndexedPropertyName(pcsNew->base_string, node_idx); |
| 1096 | } |
| 1097 | if (pcs->node->getChild(i)->nChildren() == 0) { |
| 1098 | if (pcsNew->base_string.substr(0, root_name_length) == root_name) { |
| 1099 | pcsNew->base_string = pcsNew->base_string.erase(0, root_name_length); |
| 1100 | } |
| 1101 | if (pcs->node->getChild(i)->getAttribute(SGPropertyNode::READ)) access="R"; |
| 1102 | if (pcs->node->getChild(i)->getAttribute(SGPropertyNode::WRITE)) access+="W"; |
| 1103 | PropertyCatalog.push_back(pcsNew->base_string+" ("+access+")"); |
| 1104 | } else { |
| 1105 | pcsNew->node = pcs->node->getChild(i); |
| 1106 | BuildPropertyCatalog(pcsNew.get()); |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1112 |
nothing calls this directly
no test coverage detected