aboutsummaryrefslogtreecommitdiff
path: root/paludis/output_manager_factory.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-12 12:57:51 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-12 12:57:51 +0000
commitd7e855600a8cf683ce9dfa9ff934270bb558c5db (patch)
treecd040b1ce91f14644cff38c5dd0109cb430635a2 /paludis/output_manager_factory.hh
parent9ed5246bdfa77faa81539a34f42823036e891b87 (diff)
downloadpaludis-d7e855600a8cf683ce9dfa9ff934270bb558c5db.tar.gz
paludis-d7e855600a8cf683ce9dfa9ff934270bb558c5db.tar.xz
Add file output manager
Diffstat (limited to 'paludis/output_manager_factory.hh')
-rw-r--r--paludis/output_manager_factory.hh14
1 files changed, 12 insertions, 2 deletions
diff --git a/paludis/output_manager_factory.hh b/paludis/output_manager_factory.hh
index ca8e045fc..eb653d786 100644
--- a/paludis/output_manager_factory.hh
+++ b/paludis/output_manager_factory.hh
@@ -44,12 +44,16 @@ namespace paludis
public:
typedef std::tr1::function<std::string (const std::string &)> KeyFunction;
+
typedef std::tr1::function<const std::tr1::shared_ptr<OutputManager> (
const std::string &)> CreateChildFunction;
+ typedef std::tr1::function<std::string (const std::string &)> ReplaceVarsFunc;
+
typedef std::tr1::function<const std::tr1::shared_ptr<OutputManager>(
const KeyFunction &,
- const CreateChildFunction &
+ const CreateChildFunction &,
+ const ReplaceVarsFunc &
)> CreateFunction;
/**
@@ -63,10 +67,16 @@ namespace paludis
* \param create_child_function is used by, for example,
* TeeOutputManager to create child streams. Given a single string,
* this function returns the appropriate child.
+ *
+ * \param replace_vars_func should replace '%{vars}' with their
+ * expanded forms. Variables include 'name', 'action' etc. This is
+ * used by, for example, FileOutputManager to allow the user to
+ * specify the output file names.
*/
const std::tr1::shared_ptr<OutputManager> create(
const KeyFunction & key_function,
- const CreateChildFunction & create_child_function
+ const CreateChildFunction & create_child_function,
+ const ReplaceVarsFunc & replace_vars_func
) const PALUDIS_ATTRIBUTE((warn_unused_result));
/**