X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent_factory.cc;h=789496d08e043c7d911ce2991eff4f689b3e4e68;hb=8102046b2f29e0c7b234c29bf204b056cb30e64f;hp=092efd7903d7dba9219c483c57a03307d6733945;hpb=b666a794a130386bc01ede2143ef40bd6973eb32;p=dcpomatic.git diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index 092efd790..789496d08 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,10 @@ */ +/** @file src/lib/content_factory.cc + * @brief Methods to create content objects. + */ + #include #include "ffmpeg_content.h" #include "image_content.h" @@ -28,6 +32,13 @@ using std::string; using std::list; using boost::shared_ptr; +/** Create a Content object from an XML node. + * @param film Film that the content will be in. + * @param node XML description. + * @param version XML state version. + * @param notes A list to which is added descriptions of any non-critial warnings / messages. + * @return Content object, or 0 if no content was recognised in the XML. + */ shared_ptr content_factory (shared_ptr film, cxml::NodePtr node, int version, list& notes) { @@ -48,6 +59,11 @@ content_factory (shared_ptr film, cxml::NodePtr node, int version, l return content; } +/** Create a Content object from a file, depending on its extension. + * @param film Film that the content will be in. + * @param path File's path. + * @return Content object. + */ shared_ptr content_factory (shared_ptr film, boost::filesystem::path path) {