@@ -20,7 +20,7 @@ std::string DMXValue::IDToString(ID id) {
2020 break ;
2121 case ID::ELEMENT:
2222 return " element" ;
23- case ID::INT :
23+ case ID::INT32 :
2424 return " int" ;
2525 case ID::FLOAT:
2626 return " float" ;
@@ -47,7 +47,7 @@ std::string DMXValue::IDToString(ID id) {
4747 case ID::MATRIX_4X4:
4848 return " matrix" ;
4949 case ID::ARRAY_ELEMENT:
50- case ID::ARRAY_INT :
50+ case ID::ARRAY_INT32 :
5151 case ID::ARRAY_FLOAT:
5252 case ID::ARRAY_BOOL:
5353 case ID::ARRAY_STRING:
@@ -81,14 +81,14 @@ void DMXAttribute::setKey(std::string key_) {
8181 this ->key = std::move (key_);
8282}
8383
84- bool DMXAttribute::isArray () const {
85- return static_cast <DMXValue::ID>(this ->value .index ()) >= DMXValue::ID::ARRAY_START;
86- }
87-
8884DMXValue::ID DMXAttribute::getValueType () const {
8985 return static_cast <DMXValue::ID>(this ->value .index ());
9086}
9187
88+ bool DMXAttribute::isValueArray () const {
89+ return this ->getValueType () >= DMXValue::ID::ARRAY_START;
90+ }
91+
9292const DMXValue::Generic& DMXAttribute::getValue () const {
9393 return this ->value ;
9494}
@@ -105,7 +105,7 @@ std::string DMXAttribute::getValueString() const {
105105 }
106106 return ' #' + std::to_string (index);
107107 }
108- case INT :
108+ case INT32 :
109109 return std::to_string (this ->getValue <int32_t >());
110110 case FLOAT:
111111 return std::to_string (this ->getValue <float >());
@@ -179,7 +179,7 @@ std::string DMXAttribute::getValueString() const {
179179 }
180180 return out + ' ]' ;
181181 }
182- case ARRAY_INT : {
182+ case ARRAY_INT32 : {
183183 const auto ints = this ->getValue <std::vector<int32_t >>();
184184 std::string out = " [" ;
185185 for (int i = 0 ; i < ints.size (); i++) {
@@ -645,7 +645,7 @@ DMX::DMX(std::span<const std::byte> dmxData) {
645645 }
646646 return value;
647647 }
648- case INT :
648+ case INT32 :
649649 return stream.read <int32_t >();
650650 case FLOAT:
651651 return stream.read <float >();
@@ -698,7 +698,7 @@ DMX::DMX(std::span<const std::byte> dmxData) {
698698 }
699699 case ARRAY_ELEMENT:
700700 return readArrayValue.operator ()<DMXValue::Element>(type);
701- case ARRAY_INT :
701+ case ARRAY_INT32 :
702702 return readArrayValue.operator ()<int32_t >(type);
703703 case ARRAY_FLOAT:
704704 return readArrayValue.operator ()<float >(type);
0 commit comments