+ // Force Loading some more elements if user asked to.
+
+ gdcm::DocEntry *d;
+ for (ListElements::iterator it = UserForceLoadList.begin();
+ it != UserForceLoadList.end();
+ ++it)
+ {
+ gdcmWarningMacro( "Force Load " << std::hex
+ << (*it).Group << "|" <<(*it).Elem );
+
+ d = GetDocEntry( (*it).Group, (*it).Elem);
+
+ if ( d == NULL)
+ {
+ gdcmWarningMacro( "You asked toForce Load " << std::hex
+ << (*it).Group <<"|"<< (*it).Elem
+ << " that doesn't exist" );
+ continue;
+ }
+
+ if ( dynamic_cast<ValEntry *>(d) )
+ {
+ LoadDocEntry(d, true);
+ continue;
+ }
+
+ BinEntry *b = dynamic_cast<BinEntry *>(d);
+ if ( b )
+ {
+ LoadEntryBinArea(b);
+ b->SetValue(GDCM_BINLOADED);
+ continue;
+ }
+
+ if ( dynamic_cast<SeqEntry *>(d) )
+ {
+ gdcmWarningMacro( "You cannot 'ForceLoad' a SeqEntry :" << std::hex
+ << (*it).Group <<"|"<< (*it).Elem );
+ continue;
+ }
+ }
+