12 #include "ExchangeWrapper.h"
19 A3DAsmProductOccurrence * a3dPocc)
23 template <
typename Function>
27 ForPart(rootPocc.data,
function);
30 template <
typename Function>
31 void ForEachChildProductOccurence(
34 ForEachChildProductOccurrence(rootPocc.data,
function);
38 template <
typename Function>
40 A3DAsmProductOccurrenceData
const & data,
44 function(data.m_pPart);
45 else if (!ForPrototypePart(data.m_pPrototype,
function))
47 if (data.m_uiPOccurrencesSize == 0 && data.m_pExternalData)
50 ForPart(external.data,
function);
55 template <
typename Function>
56 bool ForPrototypePart(
57 A3DAsmProductOccurrence * a3dPrototype,
64 if (prototype->m_pPart)
66 function(prototype->m_pPart);
70 return ForPrototypePart(prototype->m_pPrototype,
function);
73 template <
typename Function>
74 void ForEachChildProductOccurrence(
75 A3DAsmProductOccurrenceData
const & data,
78 bool foundChildren = ForEachChildOrPrototypeChildProductOccurrence(data,
function);
80 A3DAsmProductOccurrence * a3dExternal = data.m_pExternalData;
84 function(a3dExternal);
88 ForEachChildProductOccurrence(external.data,
function);
93 template <
typename Function>
94 bool ForEachChildOrPrototypeChildProductOccurrence(
95 A3DAsmProductOccurrenceData
const & data,
98 bool foundChildren =
false;
99 if (data.m_uiPOccurrencesSize > 0)
101 for (A3DUns32 i = 0; i < data.m_uiPOccurrencesSize; ++i)
102 function(data.m_ppPOccurrences[i]);
104 foundChildren =
true;
106 else if (data.m_pPrototype)
109 foundChildren = ForEachChildOrPrototypeChildProductOccurrence(prototype.data,
function);
112 return foundChildren;
Definition: ProductOccurrenceWalker.h:15
Definition: ExchangeWrapper.h:560