Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CoMISo
Base
Commits
fd46e861
Commit
fd46e861
authored
Dec 18, 2015
by
Max Lyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DebFileOut files
parent
90733ffb
Pipeline
#495
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
Debug/DebFileOut.cc
Debug/DebFileOut.cc
+37
-0
Debug/DebFileOut.hh
Debug/DebFileOut.hh
+32
-0
No files found.
Debug/DebFileOut.cc
0 → 100644
View file @
fd46e861
#include "DebFileOut.hh"
#include <string>
#include <sstream>
#include <iomanip>
namespace
Debug
{
std
::
string
make_filename
(
const
char
*
_prfx
,
const
char
*
_flnm
,
const
char
*
_ext
,
const
char
*
_sfx
)
{
static
int
cnt
=
0
;
const
char
SEP
=
'_'
;
std
::
stringstream
sstr_flnm
;
sstr_flnm
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
4
)
<<
cnt
++
;
sstr_flnm
<<
SEP
<<
_prfx
<<
SEP
<<
_flnm
;
if
(
_sfx
!=
nullptr
)
sstr_flnm
<<
SEP
<<
_sfx
;
sstr_flnm
<<
'.'
<<
_ext
;
return
sstr_flnm
.
str
();
}
std
::
string
set_filename_extension
(
const
char
*
_flnm
,
const
char
*
_ext
)
{
std
::
string
flnm
(
_flnm
);
const
size_t
dot_pos
=
flnm
.
find_last_of
(
'.'
);
if
(
dot_pos
!=
std
::
string
::
npos
)
flnm
.
replace
(
flnm
.
begin
()
+
dot_pos
+
1
,
flnm
.
end
(),
_ext
);
else
flnm
+=
std
::
string
(
"."
)
+
_ext
;
return
flnm
;
}
}
// Debug
Debug/DebFileOut.hh
0 → 100644
View file @
fd46e861
// (C) Copyright 2014 by Autodesk, Inc.
//
// The information contained herein is confidential, proprietary
// to Autodesk, Inc., and considered a trade secret as defined
// in section 499C of the penal code of the State of California.
// Use of this information by anyone other than authorized
// employees of Autodesk, Inc. is granted only under a written
// non-disclosure agreement, expressly prescribing the scope
// and manner of such use.
#ifndef BASE_DEBFILEOUT_HH_INCLUDED
#define BASE_DEBFILEOUT_HH_INCLUDED
#ifdef DEB_ON
#include <string>
namespace
Debug
{
//! Make a file name composing the input arguments:
// prefix_filname_[suffix_]#count#.ext
// count is a number that increase any time the function is called,
// it is expressed with 4 decimal digits filled with zeros.
std
::
string
make_filename
(
const
char
*
_prfx
,
const
char
*
_flnm
,
const
char
*
_ext
,
const
char
*
_sfx
=
nullptr
);
std
::
string
set_filename_extension
(
const
char
*
_flnm
,
const
char
*
_ext
);
}
// Debug
#endif // DEB_ON
#endif // BASE_DEBFILEOUT_HH_INCLUDED
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment