25 #ifndef INCLUDED_BeaconIdTypes_h_GUID_8C85DE41_5CAC_4DA2_6C2A_962680202E1B 26 #define INCLUDED_BeaconIdTypes_h_GUID_8C85DE41_5CAC_4DA2_6C2A_962680202E1B 33 #include <boost/assert.hpp> 42 struct ZeroBasedBeaconIdTag;
44 struct OneBasedBeaconIdTag;
55 namespace typesafeid_traits {
62 template <>
struct WrappedType<vbtracker::detail::OneBasedBeaconIdTag> {
83 }
else if (
id.value() < 0) {
103 }
else if (
id.value() < 0) {
119 return (!
id.empty() &&
id.value() >= 0);
123 return (!
id.empty() &&
id.value() > 0);
130 "an identified beacon to be " 131 "used as an index!");
133 throw std::logic_error(
"A beacon id must correspond to an " 134 "identified beacon to be used as an index!");
146 #endif // INCLUDED_BeaconIdTypes_h_GUID_8C85DE41_5CAC_4DA2_6C2A_962680202E1B ZeroBasedBeaconId makeZeroBased(OneBasedBeaconId id)
Overloaded conversion function to turn any beacon ID into zero-based, respecting the convention that ...
Definition: BeaconIdTypes.h:99
Definition: RunLoopManager.h:42
std::size_t asIndex(ZeroBasedBeaconId id)
Turn a (valid non-sentinel, i.e.
Definition: BeaconIdTypes.h:128
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Definition: newuoa.h:1888
OneBasedBeaconId makeOneBased(ZeroBasedBeaconId id)
Overloaded conversion function to turn any beacon ID into one-based, respecting the convention that n...
Definition: BeaconIdTypes.h:79
bool beaconIdentified(ZeroBasedBeaconId id)
Does the given beacon ID indicate that it's identified?
Definition: BeaconIdTypes.h:118
Explicitly specialize for your tag type if you want a different underlying type.
Definition: TypeSafeId.h:49
int UnderlyingBeaconIdType
All beacon IDs, whether 0 or 1 based, are ints on the inside.
Definition: BeaconIdTypes.h:49