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:
parent
817d206243
commit
3a8e332b42
2 changed files with 17 additions and 12 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue