1
0
Fork 0

simplified some ostream kirmes

This commit is contained in:
jsteemann 2017-03-06 14:44:56 +01:00
parent bbda879dee
commit bbda3fa9f5
4 changed files with 11 additions and 40 deletions

View File

@ -210,19 +210,6 @@ bool arangodb::basics::TRI_AttributeNamesHaveExpansion(
/// @brief append the attribute name to an output stream
////////////////////////////////////////////////////////////////////////////////
std::ostream& operator<<(std::ostream& stream,
arangodb::basics::AttributeName const* name) {
stream << name->name;
if (name->shouldExpand) {
stream << "[*]";
}
return stream;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief append the attribute name to an output stream
////////////////////////////////////////////////////////////////////////////////
std::ostream& operator<<(std::ostream& stream,
arangodb::basics::AttributeName const& name) {
stream << name.name;
@ -236,23 +223,6 @@ std::ostream& operator<<(std::ostream& stream,
/// @brief append the attribute names to an output stream
////////////////////////////////////////////////////////////////////////////////
std::ostream& operator<<(
std::ostream& stream,
std::vector<arangodb::basics::AttributeName> const* attributes) {
size_t const n = attributes->size();
for (size_t i = 0; i < n; ++i) {
if (i > 0) {
stream << ".";
}
stream << attributes[i];
}
return stream;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief append the attribute names to an output stream
////////////////////////////////////////////////////////////////////////////////
std::ostream& operator<<(
std::ostream& stream,
std::vector<arangodb::basics::AttributeName> const& attributes) {

View File

@ -129,10 +129,7 @@ bool TRI_AttributeNamesHaveExpansion(std::vector<AttributeName> const& input);
}
}
std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const*);
std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const&);
std::ostream& operator<<(std::ostream&,
std::vector<arangodb::basics::AttributeName> const*);
std::ostream& operator<<(std::ostream&,
std::vector<arangodb::basics::AttributeName> const&);

View File

@ -114,6 +114,16 @@ void TRI_ShutdownDebugging();
void TRI_FlushDebugging();
void TRI_FlushDebugging(char const* file, int line, char const* message);
////////////////////////////////////////////////////////////////////////////////
/// @brief dump pair contents to an ostream
////////////////////////////////////////////////////////////////////////////////
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& stream, std::pair<T1, T2> const& obj) {
stream << '(' << obj.first << ", " << obj.second << ')';
return stream;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief dump vector contents to an ostream
////////////////////////////////////////////////////////////////////////////////
@ -209,7 +219,7 @@ std::ostream& operator<<(std::ostream& stream,
}
////////////////////////////////////////////////////////////////////////////////
/// @brief dump unordered_map contents to an ostream
/// @brief dump map contents to an ostream
////////////////////////////////////////////////////////////////////////////////
template <typename K, typename V>

View File

@ -82,12 +82,6 @@ class LoggerStream {
return *this;
}
template <typename T1, typename T2>
LoggerStream& operator<<(std::pair<T1, T2> const& obj) {
_out << '(' << obj.first << ", " << obj.second << ')';
return *this;
}
private:
std::stringstream _out;
size_t _topicId;