[Lemon-commits] [lemon_svn] deba: r1750 - in hugo/trunk/src/lemon: . bits
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:47:20 CET 2006
Author: deba
Date: Wed Apr 6 19:19:54 2005
New Revision: 1750
Modified:
hugo/trunk/src/lemon/bits/alteration_notifier.h
hugo/trunk/src/lemon/graph_reader.h
hugo/trunk/src/lemon/graph_writer.h
Log:
Removing sticky using namespace std.
Making up the using of namespaces.
Modified: hugo/trunk/src/lemon/bits/alteration_notifier.h
==============================================================================
--- hugo/trunk/src/lemon/bits/alteration_notifier.h (original)
+++ hugo/trunk/src/lemon/bits/alteration_notifier.h Wed Apr 6 19:19:54 2005
@@ -24,8 +24,6 @@
///\file
///\brief Observer registry for graph alteration observers.
-using namespace std;
-
namespace lemon {
/// \addtogroup graphmaps
Modified: hugo/trunk/src/lemon/graph_reader.h
==============================================================================
--- hugo/trunk/src/lemon/graph_reader.h (original)
+++ hugo/trunk/src/lemon/graph_reader.h Wed Apr 6 19:19:54 2005
@@ -82,7 +82,7 @@
void read(std::istream& is, std::string& value) {
char c;
value.clear();
- is >> ws;
+ is >> std::ws;
if (!is.get(c) || c != '\"')
throw DataFormatError("Quoted string format error");
while (is.get(c) && c != '\"') {
@@ -357,7 +357,7 @@
template <typename Item> class InverterBase;
std::string readNodeSet(int& line_num,
- auto_ptr<InverterBase<Node> > & nodeInverter) {
+ std::auto_ptr<InverterBase<Node> >& nodeInverter) {
std::vector<ReaderBase<Node>* > index;
{
std::string line = readNotEmptyLine(is, line_num);
@@ -379,7 +379,8 @@
throw DataFormatError("Cannot find node id map");
}
- nodeInverter = auto_ptr<InverterBase<Node> >(index[0]->getInverter());
+ nodeInverter =
+ std::auto_ptr<InverterBase<Node> >(index[0]->getInverter());
std::string line;
while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
Node node = graph.addNode();
@@ -393,8 +394,8 @@
}
std::string readEdgeSet(int& line_num,
- auto_ptr<InverterBase<Edge> > & edgeInverter,
- auto_ptr<InverterBase<Node> > & nodeInverter) {
+ std::auto_ptr<InverterBase<Edge> >& edgeInverter,
+ std::auto_ptr<InverterBase<Node> >& nodeInverter) {
std::vector<ReaderBase<Edge>*> index;
{
std::string line = readNotEmptyLine(is, line_num);
@@ -416,7 +417,8 @@
throw DataFormatError("Cannot find edge id map");
}
- edgeInverter = auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
+ edgeInverter =
+ std::auto_ptr<InverterBase<Edge> >(index[0]->getInverter());
std::string line;
while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
std::istringstream ls(line);
@@ -432,7 +434,7 @@
}
std::string readNodes(int& line_num,
- auto_ptr<InverterBase<Node> >& nodeInverter) {
+ std::auto_ptr<InverterBase<Node> >& nodeInverter) {
std::string line;
while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
std::istringstream ls(line);
@@ -447,7 +449,7 @@
}
std::string readEdges(int& line_num,
- auto_ptr<InverterBase<Edge> >& edgeInverter) {
+ std::auto_ptr<InverterBase<Edge> >& edgeInverter) {
std::string line;
while (line = readNotEmptyLine(is, line_num), line[0] != '@') {
std::istringstream ls(line);
@@ -465,7 +467,7 @@
std::string line;
while (++line_num, getline(is, line)) {
int vi = line.find_first_not_of(" \t");
- if (vi != (int)string::npos && line[vi] != '#') {
+ if (vi != (int)std::string::npos && line[vi] != '#') {
return line.substr(vi);
}
}
@@ -507,7 +509,7 @@
map.set(item, value);
typename Inverse::iterator it = inverse.find(value);
if (it == inverse.end()) {
- inverse.insert(make_pair(value, item));
+ inverse.insert(std::make_pair(value, item));
} else {
throw DataFormatError("Multiple ID occurence");
}
@@ -545,7 +547,7 @@
reader.read(is, value);
typename Inverse::iterator it = inverse.find(value);
if (it == inverse.end()) {
- inverse.insert(make_pair(value, item));
+ inverse.insert(std::make_pair(value, item));
} else {
throw DataFormatError("Multiple ID occurence error");
}
Modified: hugo/trunk/src/lemon/graph_writer.h
==============================================================================
--- hugo/trunk/src/lemon/graph_writer.h (original)
+++ hugo/trunk/src/lemon/graph_writer.h Wed Apr 6 19:19:54 2005
@@ -82,7 +82,7 @@
void write(std::ostream& os, const std::string& value) {
os << "\"";
if (escaped) {
- ostringstream ls;
+ std::ostringstream ls;
for (int i = 0; i < (int)value.size(); ++i) {
writeEscape(ls, value[i]);
}
@@ -132,7 +132,7 @@
return;
default:
if (c < 0x20) {
- os << '\\' << oct << (int)c;
+ os << '\\' << std::oct << (int)c;
} else {
os << c;
}
More information about the Lemon-commits
mailing list