MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / DumpStringMap

Function DumpStringMap

xmpsdk/src/XMPMeta.cpp:157–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155// -------------
156
157static XMP_Status
158DumpStringMap ( const XMP_StringMap & map, XMP_StringPtr label, XMP_TextOutputProc outProc, void * refCon )
159{
160 XMP_Status status;
161 XMP_cStringMapPos currPos;
162 XMP_cStringMapPos endPos = map.end();
163
164 size_t maxLen = 0;
165 for ( currPos = map.begin(); currPos != endPos; ++currPos ) {
166 size_t currLen = currPos->first.size();
167 if ( currLen > maxLen ) maxLen = currLen;
168 }
169
170 OutProcNewline();
171 OutProcLiteral ( label );
172 OutProcNewline();
173
174 for ( currPos = map.begin(); currPos != endPos; ++currPos ) {
175 OutProcNChars ( " ", 2 );
176 DumpClearString ( currPos->first, outProc, refCon );
177 OutProcPadding ( maxLen - currPos->first.size() );
178 OutProcNChars ( " => ", 4 );
179 DumpClearString ( currPos->second, outProc, refCon );
180 OutProcNewline();
181 }
182
183EXIT:
184 return status;
185
186} // DumpStringMap
187
188
189// -------------------------------------------------------------------------------------------------

Callers 1

DumpNamespacesMethod · 0.85

Calls 4

DumpClearStringFunction · 0.85
endMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected