return d->fieldListMap.isEmpty();
}
+FieldListMap RIFF::Info::Tag::fieldListMap() const
+{
+ return d->fieldListMap;
+}
+
String RIFF::Info::Tag::fieldText(const ByteVector &id) const
{
if(d->fieldListMap.contains(id))
virtual bool isEmpty() const;
+ /*!
+ * Returns a copy of the internal fields of the tag. The returned map directly
+ * reflects the contents of the "INFO" chunk.
+ *
+ * \note Modifying this map does not affect the tag's internal data.
+ * Use setFieldText() and removeField() instead.
+ *
+ * \see setFieldText()
+ * \see removeField()
+ */
+ FieldListMap fieldListMap() const;
+
/*
* Gets the value of the field with the ID \a id.
*/
-#include <cppunit/extensions/HelperMacros.h>
#include <string>
#include <stdio.h>
#include <infotag.h>
-#include <tpropertymap.h>
-#include <tdebug.h>
+#include <cppunit/extensions/HelperMacros.h>
#include "utils.h"
using namespace std;
CPPUNIT_ASSERT_EQUAL(String(""), tag.title());
tag.setTitle("Test title 1");
+ tag.setFieldText("TEST", "Dummy Text");
+
CPPUNIT_ASSERT_EQUAL(String("Test title 1"), tag.title());
+
+ RIFF::Info::FieldListMap map = tag.fieldListMap();
+ CPPUNIT_ASSERT_EQUAL(String("Test title 1"), map["INAM"]);
+ CPPUNIT_ASSERT_EQUAL(String("Dummy Text"), map["TEST"]);
}
void testNumericFields()