Files
2014-06-30 13:58:10 +02:00

48 lines
899 B
C++

/*
* File: PeerIDSet.h
* Author: jgaebler
*
* Created on January 30, 2014, 4:26 PM
*/
#pragma once
#ifndef PEERIDSET_H
#define PEERIDSET_H
#include "common/Defines.h"
#include "common/container/Set.h"
#include <serializable.h>
namespace ubeeme {
namespace moversight {
/**
* @brief Provides a set of peer IDs
* @class PeerIDSet
* @author Jan G&auml;bler
* @ingroup Moversight
*/
class PeerIDSet : public Set<PeerID>, public Serializable {
void set(Archive &archive) {
if (archive.isReading()) {
std::vector<PeerID> v;
archive(v);
add(v);
} else {
std::vector<PeerID> v = toVector();
archive(v);
}
}
};
}
}
#endif /* PEERIDSET_H */