00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __GNUG__
00024 # pragma implementation "ApplyVisitor.h"
00025 #endif
00026
00027 #include "StrMod/ApplyVisitor.h"
00028 #include "StrMod/StrSubChunk.h"
00029 #include "StrMod/StrChunkPtr.h"
00030
00031 namespace strmod {
00032 namespace strmod {
00033
00034 const STR_ClassIdent ApplyVisitor_Base::identifier(51UL);
00035
00036 ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &chunk)
00037 : UseTrackingVisitor(true), chunk_(chunk), extent_used_(false)
00038 {
00039 }
00040
00041 ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &chunk,
00042 LinearExtent &extent)
00043 : UseTrackingVisitor(true), chunk_(chunk),
00044 extent_used_(true), extent_(extent)
00045 {
00046 }
00047
00048 void ApplyVisitor_Base::apply()
00049 {
00050 if (extent_used_)
00051 {
00052 StrSubChunk mychunk(chunk_, extent_);
00053 mychunk.AddReference();
00054 startVisit(&mychunk);
00055 }
00056 else
00057 {
00058 startVisit(chunk_);
00059 }
00060 }
00061
00062 };
00063 };