@@ -274,20 +274,19 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement
274274 */
275275 virtual OFCondition verify (const OFBool autocorrect = OFFalse);
276276
277- /* * check if this element contains non-ASCII characters. Please note that this check
278- * is pretty simple and only works for single-byte character sets that do include
279- * the 7-bit ASCII codes, e.g. for the ISO 8859 family. In other words: All character
280- * codes below 128 are considered to be ASCII codes and all others are considered to
281- * be non-ASCII.
277+ /* * check if this element contains non-ASCII characters.
278+ * This works by checking for any byte values above 127, which works for any
279+ * single-byte code and for single-value multi-byte codes, and for ESC characters,
280+ * which will mean that a code extension is used.
282281 * @param checkAllStrings if true, also check elements with string values not affected
283282 * by SpecificCharacterSet (0008,0005). By default, only check PN, LO, LT, SH, ST,
284- * UC and UT, i.e. none of the derived VR classes .
283+ * UC and UT.
285284 * @return true if element contains non-ASCII characters, false otherwise
286285 */
287286 virtual OFBool containsExtendedCharacters (const OFBool checkAllStrings = OFFalse);
288287
289288 /* * check if this element is affected by SpecificCharacterSet
290- * @return always returns false since none of the derived VR classes is affected by
289+ * @return returns false, overwritten by derived VR classes that are affected by
291290 * the SpecificCharacterSet (0008,0005) element
292291 */
293292 virtual OFBool isAffectedBySpecificCharacterSet () const ;
@@ -379,6 +378,21 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement
379378 */
380379 virtual OFCondition makeMachineByteString (const Uint32 length = 0 );
381380
381+ /* * check if the VR supports more than one value.
382+ * @return OFTrue
383+ */
384+ virtual OFBool supportsMultiValue () const { return OFTrue; }
385+
386+ /* * find the start index of the next component.
387+ * @param str pointer to the string value to be searched
388+ * @param len the length of @a str
389+ * @param charSet the value of Specific Character Set; not used
390+ * @return a pointer to the next component, or NULL if none exists.
391+ * @note The pointer will point after the last character, if the component
392+ * is the last component and is empty (e.g., @a ends with a backslash).
393+ */
394+ virtual const char * findNextComponentPosition (const char *str, Uint32 len, const OFString& charSet) const ;
395+
382396 /* * convert currently stored string value to DICOM representation.
383397 * It removes trailing spaces apart from a possibly required single padding
384398 * character (in case of odd string length).
@@ -421,10 +435,9 @@ class DCMTK_DCMDATA_EXPORT DcmByteString: public DcmElement
421435 /* --- static helper functions --- */
422436
423437 /* * check if a given character string contains non-ASCII characters.
424- * Please note that this check is pretty simple and only works for single-byte character
425- * sets that do include the 7-bit ASCII codes, e.g. for the ISO 8859 family. In other
426- * words: All character codes below 128 are considered to be ASCII codes and all others
427- * are considered to be non-ASCII.
438+ * This works by checking for any byte values above 127, which works for any
439+ * single-byte code and for single-value multi-byte codes, and for ESC characters,
440+ * which will mean that a code extension is used.
428441 * @param stringVal character string to be checked
429442 * @param stringLen length of the string (number of characters without the trailing
430443 * NULL byte)
0 commit comments