1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

lib/vlnv: add != operator and minor cleanup

This commit is contained in:
Daniel Krebs 2018-02-13 17:42:01 +01:00 committed by Steffen Vogel
parent 817d206243
commit 3a8e332b42
2 changed files with 17 additions and 12 deletions

View file

@ -34,10 +34,8 @@
namespace villas {
namespace fpga {
class Vlnv {
public:
static constexpr char delimiter = ':';
Vlnv() :
@ -52,20 +50,15 @@ public:
{ return Vlnv(); }
std::string
toString() const
{
std::stringstream stream;
std::string string;
stream << *this;
stream >> string;
return string;
}
toString() const;
bool
operator==(const Vlnv& other) const;
bool
operator!=(const Vlnv& other) const
{ return !(*this == other); }
friend std::ostream&
operator<< (std::ostream& stream, const Vlnv& vlnv)
{

View file

@ -66,5 +66,17 @@ Vlnv::parseFromString(std::string vlnv)
if(version == "*") version = "";
}
std::string
Vlnv::toString() const
{
std::stringstream stream;
std::string string;
stream << *this;
stream >> string;
return string;
}
} // namespace fpga
} // namespace villas