Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
dynamic-graph
Commits
ea4d8395
Commit
ea4d8395
authored
6 years ago
by
Olivier Stasse
Browse files
Options
Downloads
Patches
Plain Diff
Remove contiffstream class
parent
9434feda
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/dynamic-graph/contiifstream.h
+0
-70
0 additions, 70 deletions
include/dynamic-graph/contiifstream.h
include/dynamic-graph/fwd.hh
+3
-14
3 additions, 14 deletions
include/dynamic-graph/fwd.hh
src/debug/contiifstream.cpp
+0
-83
0 additions, 83 deletions
src/debug/contiifstream.cpp
with
3 additions
and
167 deletions
include/dynamic-graph/contiifstream.h
deleted
100644 → 0
+
0
−
70
View file @
9434feda
// -*- mode: c++ -*-
// Copyright 2010, François Bleibel, Thomas Moulard, Olivier Stasse,
// JRL, CNRS/AIST.
//
// This file is part of dynamic-graph.
// dynamic-graph is free software: you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// dynamic-graph is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
#ifndef DYNAMIC_GRAPH_CONTIIFSTREAM_H
# define DYNAMIC_GRAPH_CONTIIFSTREAM_H
# include <fstream>
# include <list>
# include <sstream>
# ifndef WIN32
# include <unistd.h>
# include <pthread.h>
# endif //! WIN32
# include <dynamic-graph/fwd.hh>
# include <dynamic-graph/interpreter.h>
# include <dynamic-graph/config-contiifstream.hh>
namespace
dynamicgraph
{
/// \ingroup debug
///
/// \brief TODO
///
class
DG_CONTIIFSTREAM_DLLAPI
Contiifstream
{
public:
explicit
Contiifstream
(
const
std
::
string
&
n
=
""
);
~
Contiifstream
();
inline
void
open
(
const
std
::
string
&
n
)
{
filename
=
n
;
cursor
=
0
;
}
bool
loop
();
inline
bool
ready
()
{
return
0
<
reader
.
size
();
}
std
::
string
next
();
protected
:
std
::
string
filename
;
std
::
streamoff
cursor
;
static
const
unsigned
int
BUFFER_SIZE
=
256
;
char
buffer
[
BUFFER_SIZE
];
std
::
list
<
std
::
string
>
reader
;
bool
first
;
};
}
// end of namespace dynamicgraph.
#endif //! DYNAMIC_GRAPH_CONTIIFSTREAM_H
This diff is collapsed.
Click to expand it.
include/dynamic-graph/fwd.hh
+
3
−
14
View file @
ea4d8395
// Copyright 2010, Thomas Moulard, JRL, CNRS/AIST
// Copyright 2010-2019, CNRS, JRL, AIST, LAAS
// Thomas Moulard, Olivier Stasse
//
// This file is part of dynamic-graph.
// dynamic-graph is free software: you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// dynamic-graph is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Lesser Public License for more details. You should have
// received a copy of the GNU Lesser General Public License along with
// dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
// See License
#ifndef DYNAMIC_GRAPH_FWD_HH
# define DYNAMIC_GRAPH_FWD_HH
namespace
dynamicgraph
{
class
Contiifstream
;
class
DebugTrace
;
class
PluginRefMap
;
...
...
This diff is collapsed.
Click to expand it.
src/debug/contiifstream.cpp
deleted
100644 → 0
+
0
−
83
View file @
9434feda
// Copyright 2010, François Bleibel, Thomas Moulard, Olivier Stasse,
// JRL, CNRS/AIST.
//
// This file is part of dynamic-graph.
// dynamic-graph is free software:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
<dynamic-graph/contiifstream.h>
#include
<dynamic-graph/debug.h>
namespace
dynamicgraph
{
Contiifstream
::
Contiifstream
(
const
std
::
string
&
n
)
:
filename
(
n
),
cursor
(
0
),
first
(
true
)
{}
Contiifstream
::~
Contiifstream
()
{
dgDEBUGINOUT
(
5
);
}
bool
Contiifstream
::
loop
()
{
dgDEBUGIN
(
25
);
bool
res
=
false
;
std
::
fstream
file
(
filename
.
c_str
());
file
.
seekg
(
cursor
);
file
.
sync
();
while
(
1
)
{
file
.
get
(
buffer
,
BUFFER_SIZE
);
if
(
file
.
gcount
())
{
res
=
true
;
std
::
string
line
(
buffer
);
if
(
!
first
)
reader
.
push_back
(
line
);
cursor
=
file
.
tellg
();
++
cursor
;
file
.
get
(
*
buffer
);
// get the last char ( = '\n')
dgDEBUG
(
15
)
<<
"line: "
<<
line
<<
std
::
endl
;
}
else
break
;
}
first
=
false
;
dgDEBUGOUT
(
25
);
return
res
;
}
std
::
string
Contiifstream
::
next
()
{
std
::
string
res
=
*
reader
.
begin
();
reader
.
pop_front
();
return
res
;
}
}
// end of namespace dynamicgraph.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment