Commit 71ecc2f7 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

mln/debug/filename.hh: Allow to force the file id.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4232 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent c5ec8192
2009-07-01 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
* mln/debug/filename.hh: Allow to force the file id.
2009-07-01 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
 
* mln/transform/hough.hh: Improve.
......@@ -69,8 +69,9 @@ namespace mln
} // end of namespace scribo::make::internal
inline
std::string
filename(const std::string& filename, int postfix_id = -1)
filename(const std::string& filename, int id = -1)
{
static int file_id = 1;
......@@ -79,17 +80,20 @@ namespace mln
if (! internal::filename_prefix.empty())
os << internal::filename_prefix << "_";
if (file_id < 10)
os << "0";
if (file_id < 100)
os << "0";
if (id >= 0)
{
if (file_id < 10)
os << "0";
if (file_id < 100)
os << "0";
os << file_id++
<< "_"
<< filename;
os << file_id++;
}
else
os << "_" << id;
if (postfix_id >= 0)
os << "_" << postfix_id;
os << "_"
<< filename;
return os.str();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment