29 #include <boost/function.hpp>
30 #include <boost/bind.hpp>
32 #include <vlpi/appearance.h>
38 template <
typename _StateType>
58 const _StateType& originalState)>&
function)
65 typename std::map<makVrv::DtUniqueID, _StateType>::iterator iter;
66 iter =
myMap.find(
id);
68 if (iter !=
myMap.end())
77 const _StateType& state = (
const _StateType&)incoming;
84 const _StateType& state = (
const _StateType&)incoming;
86 typename DtIsModifiedCallList::iterator iter =
88 typename std::map<makVrv::DtUniqueID, _StateType>::const_iterator
89 cacheIter =
myMap.find(
id);
93 if ((*iter)(state, cacheIter->second))
105 std::map<makVrv::DtUniqueID, _StateType>
myMap;
107 typedef std::vector<boost::function<
bool (
const _StateType& newState,
155 DtAppearance app1(DtEntityType(newState.
myEntityType.c_str()));
159 DtAppearance app2(DtEntityType(state.
myEntityType.c_str()));
163 bool dest1 = (app1.damageState() == DtDamageDestroyed);
164 bool dest2 = (app2.damageState() == DtDamageDestroyed);
166 return (dest1 != dest2);
183 return (newState != cached);
200 return (newState != cached);
241 bool dest1 = (newState.
myAppearance == DtDamageDestroyed);
244 return (dest1 != dest2);
252 DtGlobalObjectDesignator id;
256 if (numberOfAggs != curAggLimit)
261 for (i = 0; i < numberOfAggs; i++)
277 DtGlobalObjectDesignator id;
281 if (numberOfAggs != curAggLimit)
286 for (i = 0; i < numberOfAggs; i++)