You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
#include "Place.h"
|
|
|
|
#include "storm/exceptions/IllegalArgumentValueException.h"
|
|
#include "storm/utility/macros.h"
|
|
|
|
namespace storm {
|
|
namespace gspn {
|
|
Place::Place(uint64_t id) : id(id) {
|
|
|
|
}
|
|
|
|
void Place::setName(std::string const& name) {
|
|
this->name = name;
|
|
}
|
|
|
|
std::string Place::getName() const {
|
|
return this->name;
|
|
}
|
|
|
|
uint64_t Place::getID() const {
|
|
return this->id;
|
|
}
|
|
|
|
void Place::setNumberOfInitialTokens(uint64_t tokens) {
|
|
this->numberOfInitialTokens = tokens;
|
|
}
|
|
|
|
uint64_t Place::getNumberOfInitialTokens() const {
|
|
return this->numberOfInitialTokens;
|
|
}
|
|
|
|
void Place::setCapacity(boost::optional<uint64_t> const& cap) {
|
|
this->capacity = cap;
|
|
}
|
|
|
|
uint64_t Place::getCapacity() const {
|
|
assert(hasRestrictedCapacity());
|
|
return capacity.get();
|
|
}
|
|
|
|
bool Place::hasRestrictedCapacity() const {
|
|
return capacity != boost::none;
|
|
}
|
|
}
|
|
}
|