90 inline const std::string&
data()
const;
109 barcodeType_(barcodeType),
113 ocean_assert(!
data_.empty());
117 barcodeType_(barcodeType),
118 data_(std::move(data))
121 ocean_assert(!
data_.empty());
153 ocean_assert(
false &&
"Never be here!");
154 return "Unknown barcode type";
Definition of a barcode.
Definition: Barcode.h:52
BarcodeType barcodeType_
The type of this barcode.
Definition: Barcode.h:102
const std::string & data() const
Returns the payload of this barcode.
Definition: Barcode.h:134
bool isValid() const
Returns whether this is a valid barcode instance.
Definition: Barcode.h:124
BarcodeType barcodeType() const
Returns the type of this barcode.
Definition: Barcode.h:129
static std::string translateBarcodeType(const BarcodeType barcodeType)
Translates a barcode type into a human-readable string.
Definition: Barcode.h:139
Barcode()=default
Creates an invalid barcode instance.
std::string data_
The payload of barcode.
Definition: Barcode.h:105
BarcodeType
Definition of barcode types.
Definition: Barcode.h:35
@ UPC_A
A barcode of type UPC-A.
@ EAN_13
A barcode of type EAN-13.
@ INVALID
An invalid barcode type.
std::unordered_set< BarcodeType > BarcodeTypeSet
Definition of a set of barcode types.
Definition: Barcode.h:45
std::vector< Barcode > Barcodes
Definition of a vector of barcodes.
Definition: Barcode.h:25
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15