diff options
Diffstat (limited to 'ZAPD/ZVector.cpp')
| -rw-r--r-- | ZAPD/ZVector.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ZAPD/ZVector.cpp b/ZAPD/ZVector.cpp index c7a6c52..e9eba2f 100644 --- a/ZAPD/ZVector.cpp +++ b/ZAPD/ZVector.cpp @@ -42,7 +42,9 @@ void ZVector::ParseRawData() int currentRawDataIndex = this->rawDataIndex; scalars.clear(); - for (int i = 0; i < this->dimensions; i++) { + + for (int i = 0; i < this->dimensions; i++) + { ZScalar* scalar = new ZScalar(this->scalarType); scalar->rawDataIndex = currentRawDataIndex; scalar->rawData = this->rawData; @@ -64,6 +66,11 @@ int ZVector::GetRawDataSize() return size; } +bool ZVector::DoesSupportArray() +{ + return true; +} + std::string ZVector::GetSourceTypeName() { if (dimensions == 3 && scalarType == ZSCALAR_F32) @@ -94,7 +101,7 @@ std::string ZVector::GetSourceValue() std::vector<std::string> strings = std::vector<std::string>(); for (int i = 0; i < this->scalars.size(); i++) strings.push_back(scalars[i]->GetSourceValue()); - return StringHelper::Implode(strings, ", "); + return "{ " + StringHelper::Implode(strings, ", ") + " }"; } std::string ZVector::GetSourceOutputCode(const std::string& prefix) |
