All Frameworks Class Hierarchy This Framework Indexes
| outcome api_distribute_state_to_streams( | DELTA_STATE* | pState, |
| StreamFinder* | pStreamFinder, | |
| logical | clearDelta, | |
| logical | hideStates) |
class StreamFinderPM : public StreamFinder {
// A StreamFinder for the PM_HUSK.
// Implements a nested approach to
// distribution in which bulletins go to
// the most specific stream available.
// Part streams are more specific than
// the default stream. Body streams are more
// specific than part streams.
public:
virtual HISTORY_STREAM* findStream( ENTITY* );
};
HISTORY_STREAM *
StreamFinderPM::findStream(
ENTITY* pEntity
)
{
HISTORY_STREAM* pStream = NULL;
// Look for a ATTRIB_HISTORY. If found add
// the entity and associated geometry to
// the stream map.
pStream = findStreamFromAttribute(pEntity);
if( !pStream ) {
// Still no stream?.
// Look for a stream on the part
// the entity is in.
PART* part = get_part(pEntity);
if(part) {
pStream = part->history_stream();
}
}
if( pStream ) {
addToStreamMap(pEntity, pStream);
}
return pStream;
}
The clearDelta argument tells how to handle BULLETIN objects for which
a target stream could not be found. If TRUE they are deleted along
with the input DELTA_STATE. If FALSE, they are left in the input
state.
Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.