MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getUniqueEntryLists

Method getUniqueEntryLists

Engine/source/console/consoleInternal.cpp:1072–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070}
1071
1072void Namespace::getUniqueEntryLists(Namespace *other, VectorPtr<Entry *> *outThisList, VectorPtr<Entry *> *outOtherList)
1073{
1074 // All namespace entries in the common ACR should be
1075 // ignored when checking for duplicate entry names.
1076 static VectorPtr<Namespace::Entry *> commonEntries;
1077 commonEntries.clear();
1078
1079 AbstractClassRep *commonACR = mClassRep->getCommonParent(other->mClassRep);
1080 commonACR->getNameSpace()->getEntryList(&commonEntries);
1081
1082 // Make life easier
1083 VectorPtr<Namespace::Entry *> &thisEntries = *outThisList;
1084 VectorPtr<Namespace::Entry *> &compEntries = *outOtherList;
1085
1086 // Clear, just in case they aren't
1087 thisEntries.clear();
1088 compEntries.clear();
1089
1090 getEntryList(&thisEntries);
1091 other->getEntryList(&compEntries);
1092
1093 // Run through all of the entries in the common ACR, and remove them from
1094 // the other two entry lists
1095 for (NamespaceEntryListIterator itr = commonEntries.begin(); itr != commonEntries.end(); itr++)
1096 {
1097 // Check this entry list
1098 for (NamespaceEntryListIterator thisItr = thisEntries.begin(); thisItr != thisEntries.end(); thisItr++)
1099 {
1100 if (*thisItr == *itr)
1101 {
1102 thisEntries.erase(thisItr);
1103 break;
1104 }
1105 }
1106
1107 // Same check for component entry list
1108 for (NamespaceEntryListIterator compItr = compEntries.begin(); compItr != compEntries.end(); compItr++)
1109 {
1110 if (*compItr == *itr)
1111 {
1112 compEntries.erase(compItr);
1113 break;
1114 }
1115 }
1116 }
1117}
1118
1119void Namespace::init()
1120{

Callers

nothing calls this directly

Calls 7

getCommonParentMethod · 0.80
getEntryListMethod · 0.80
getNameSpaceMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected