Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Place.cpp
Go to the documentation of this file.
1#include "Place.h"
2
5
6namespace storm {
7namespace gspn {
8Place::Place(uint64_t id) : id(id) {}
9
10void Place::setName(std::string const& name) {
11 this->name = name;
12}
13
14std::string Place::getName() const {
15 return this->name;
16}
17
18uint64_t Place::getID() const {
19 return this->id;
20}
21
22void Place::setNumberOfInitialTokens(uint64_t tokens) {
23 this->numberOfInitialTokens = tokens;
24}
25
27 return this->numberOfInitialTokens;
28}
29
30void Place::setCapacity(boost::optional<uint64_t> const& cap) {
31 this->capacity = cap;
32}
33
34uint64_t Place::getCapacity() const {
35 assert(hasRestrictedCapacity());
36 return capacity.get();
37}
38
40 return capacity != boost::none;
41}
42} // namespace gspn
43} // namespace storm
uint64_t getCapacity() const
Returns the capacity of tokens of this place.
Definition Place.cpp:34
void setName(std::string const &name)
Sets the name of this place.
Definition Place.cpp:10
Place(uint64_t id)
Definition Place.cpp:8
void setCapacity(boost::optional< uint64_t > const &capacity)
Sets the capacity of tokens of this place.
Definition Place.cpp:30
bool hasRestrictedCapacity() const
Definition Place.cpp:39
uint64_t getID() const
Returns the id of this place.
Definition Place.cpp:18
std::string getName() const
Returns the name of this place.
Definition Place.cpp:14
uint64_t getNumberOfInitialTokens() const
Returns the number of initial tokens of this place.
Definition Place.cpp:26
void setNumberOfInitialTokens(uint64_t tokens)
Sets the number of initial tokens of this place.
Definition Place.cpp:22
LabParser.cpp.
Definition cli.cpp:18