Commits

shuerhaaken committed 12ca91f

add documentation

Comments (0)

Files changed (1)

libtaginfo/inforef.cc

 
 // InfoRef
 
+/*!
+ * Create a InfoRef object from a media file.
+ *
+ * This will internally create a Info object and takes care of its deletion
+ * \param filename is the path to a media file.
+ *
+ * This is a recommended wrapper for RAII creation.  If you want to use a pointer to InfoRef,
+ * then you can also avoid it and use Info directly.
+ */
 InfoRef::InfoRef(const String &filename) {
     i = NULL;
     i = Info::create(filename);
 }
 
+/*!
+ * Create a InfoRef object from a media file.
+ *
+ * This will internally create a Info object and takes care of its deletion
+ * \param filename is the path to a media file.
+ * \param type MediaFileType of the media file.
+ *
+ * This is a recommended wrapper for RAII creation.  If you want to use a pointer to InfoRef,
+ * then you can also avoid it and use Info directly.
+ */
 InfoRef::InfoRef(const String &filename, MediaFileType type) {
     i = NULL;
     i = Info::create_with_file_type(filename, type);
 }
 
+/*!
+ * Create a InfoRef object from a media file.
+ *
+ * This will internally create a Info object and takes care of its deletion
+ * \param filename is the path to a media file.
+ * \param mime Mime type of the media file.
+ *
+ * This is a recommended wrapper for RAII creation.  If you want to use a pointer to InfoRef,
+ * then you can also avoid it and use Info directly.
+ */
 InfoRef::InfoRef(const String &filename, const String &mime) {
     i = NULL;
     i = Info::create_from_mime(filename, mime);
 }
 
+
+/*!
+ * Check wether the info object pointers could be created internally
+ */
 bool InfoRef::is_null() const {
     return i == NULL;
 }
 
+/*!
+ * This function forwards the load call to the internal Info object
+ * \return True on success
+ */
 bool InfoRef::load() const {
     if(!i)
         return false;
     return i->load();
 }
 
+/*!
+ * This function forwards the save call to the internal Info object
+ * \return True on success
+ */
 bool InfoRef::save() {
     if(!i)
         return false;
     return i->save();
 }
 
+/*!
+ * Get the Info object for actual tag access
+ * \return Pointer to Info
+ */
 TagInfo::Info * InfoRef::info() const {
     return i;
 }
 
+/*!
+ * Destructor for InfoRef
+ */
 InfoRef::~InfoRef() {
     delete i;
 }