|
TuringSim
C++ framework to simulate abstract computing models
|
10 template<
typename UID>
17 static_assert(std::is_default_constructible_v<UID>);
49 uid = std::move(other.uid);
69 template<
typename Tag,
typename UID>
76 static_assert(std::is_default_constructible_v<UID>);
111 tag = std::move(other.tag);
112 uid = std::move(other.uid);
121 return std::make_pair(tag, uid++);
134 template<
typename Tag,
typename UID>
141 static_assert(std::is_default_constructible_v<UID>);
UidDispenser & operator=(const UidDispenser &other)
Copy a dispenser.
UIDType operator()()
Generate a new identifier.
UidDispenser(const UidDispenser &other)
Copy a dispenser.
UidDispenser & operator=(const UidDispenser &other)
Copy a dispenser.
Return a new UID dispenser at each invocation.
UidDispenser(const Tag &tag)
Make a new dispenser given a tag.
std::pair< Tag, UID > UIDType
Type of dispensed identifiers.
The namespace for basic function, not specific to TuringSim.
UidDispenser< UIDType > operator()()
Generate the next uid dispenser.
UidDispenser(const UidDispenser &other)
Copy a dispenser.
UidDispenser(UidDispenser &&other)
Move a dispenser.
UidDispenser & operator=(UidDispenser &&other)
Move a dispenser.
UID operator()()
Generate a new identifier.
UidDispenser(UidDispenser &&other)
Move a dispenser.
std::pair< Tag, UID > UIDType
Type of dispensed identifiers by dispensed dispensers.
A dispenser of unique identifier.
UID UIDType
Type of dispensed identifiers.
UidDispenser()
Make a new dispenser.
UidDispenser & operator=(UidDispenser &&other)
Move a dispenser.