diff options
| author | Stefan Boberg <[email protected]> | 2021-08-20 11:14:10 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-08-20 11:14:10 +0200 |
| commit | 0bf5380d2ce123585d29c1ad624b7eee2f8eca56 (patch) | |
| tree | d4ec94793adc269d0acd165c5a2d522b9a4efb5b /zencore/include | |
| parent | Updated ObjectId comment (diff) | |
| download | zen-0bf5380d2ce123585d29c1ad624b7eee2f8eca56.tar.xz zen-0bf5380d2ce123585d29c1ad624b7eee2f8eca56.zip | |
Renamed CompactBinaryAttachment to ObjectAttachment to mimic UE (see CL16510518)
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/compactbinary.h | 14 | ||||
| -rw-r--r-- | zencore/include/zencore/compactbinarybuilder.h | 6 | ||||
| -rw-r--r-- | zencore/include/zencore/compactbinaryvalidation.h | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/zencore/include/zencore/compactbinary.h b/zencore/include/zencore/compactbinary.h index 1d5c154bb..2a4d250cb 100644 --- a/zencore/include/zencore/compactbinary.h +++ b/zencore/include/zencore/compactbinary.h @@ -184,11 +184,11 @@ enum class CbFieldType : uint8_t BoolTrue = 0x0d, /** - * CompactBinaryAttachment is a reference to a compact binary attachment stored externally. + * ObjectAttachment is a reference to a compact binary attachment stored externally. * * Payload is a 160-bit hash digest of the referenced compact binary data. */ - CompactBinaryAttachment = 0x0e, + ObjectAttachment = 0x0e, /** * BinaryAttachment is a reference to a binary attachment stored externally. * @@ -297,9 +297,9 @@ public: static constexpr inline bool IsFloat(CbFieldType Type) { return (Type & FloatMask) == FloatBase; } static constexpr inline bool IsBool(CbFieldType Type) { return (Type & BoolMask) == BoolBase; } - static constexpr inline bool IsCompactBinaryAttachment(CbFieldType Type) + static constexpr inline bool IsObjectAttachment(CbFieldType Type) { - return GetType(Type) == CbFieldType::CompactBinaryAttachment; + return GetType(Type) == CbFieldType::ObjectAttachment; } static constexpr inline bool IsBinaryAttachment(CbFieldType Type) { return GetType(Type) == CbFieldType::BinaryAttachment; } static constexpr inline bool IsAttachment(CbFieldType Type) { return (Type & AttachmentMask) == AttachmentBase; } @@ -310,7 +310,7 @@ public: { case CbFieldType::Hash: case CbFieldType::BinaryAttachment: - case CbFieldType::CompactBinaryAttachment: + case CbFieldType::ObjectAttachment: return true; default: return false; @@ -431,7 +431,7 @@ public: ZENCORE_API bool AsBool(bool bDefault = false); /** Access the field as a hash referencing a compact binary attachment. Returns the provided default on error. */ - ZENCORE_API IoHash AsCompactBinaryAttachment(const IoHash& Default = IoHash()); + ZENCORE_API IoHash AsObjectAttachment(const IoHash& Default = IoHash()); /** Access the field as a hash referencing a binary attachment. Returns the provided default on error. */ ZENCORE_API IoHash AsBinaryAttachment(const IoHash& Default = IoHash()); /** Access the field as a hash referencing an attachment. Returns the provided default on error. */ @@ -483,7 +483,7 @@ public: constexpr inline bool IsFloat() const { return CbFieldTypeOps::IsFloat(Type); } constexpr inline bool IsBool() const { return CbFieldTypeOps::IsBool(Type); } - constexpr inline bool IsCompactBinaryAttachment() const { return CbFieldTypeOps::IsCompactBinaryAttachment(Type); } + constexpr inline bool IsObjectAttachment() const { return CbFieldTypeOps::IsObjectAttachment(Type); } constexpr inline bool IsBinaryAttachment() const { return CbFieldTypeOps::IsBinaryAttachment(Type); } constexpr inline bool IsAttachment() const { return CbFieldTypeOps::IsAttachment(Type); } diff --git a/zencore/include/zencore/compactbinarybuilder.h b/zencore/include/zencore/compactbinarybuilder.h index 83d4309f7..f2bf773bf 100644 --- a/zencore/include/zencore/compactbinarybuilder.h +++ b/zencore/include/zencore/compactbinarybuilder.h @@ -279,12 +279,12 @@ public: ZENCORE_API void AddBool(bool bValue); /** Write a field referencing a compact binary attachment by its hash. */ - inline void AddCompactBinaryAttachment(std::string_view Name, const IoHash& Value) + inline void AddObjectAttachment(std::string_view Name, const IoHash& Value) { SetName(Name); - AddCompactBinaryAttachment(Value); + AddObjectAttachment(Value); } - ZENCORE_API void AddCompactBinaryAttachment(const IoHash& Value); + ZENCORE_API void AddObjectAttachment(const IoHash& Value); /** Write a field referencing a binary attachment by its hash. */ inline void AddBinaryAttachment(std::string_view Name, const IoHash& Value) diff --git a/zencore/include/zencore/compactbinaryvalidation.h b/zencore/include/zencore/compactbinaryvalidation.h index 3a3f432be..656eb3d96 100644 --- a/zencore/include/zencore/compactbinaryvalidation.h +++ b/zencore/include/zencore/compactbinaryvalidation.h @@ -169,7 +169,7 @@ ZENCORE_API CbValidateError ValidateCompactBinaryRange(MemoryView View, CbValida * @param Mode A combination of the flags for the types of validation to perform. * @return None on success, otherwise the flags for the types of errors that were detected. */ -ZENCORE_API CbValidateError ValidateCompactBinaryAttachment(MemoryView View, CbValidateMode Mode); +ZENCORE_API CbValidateError ValidateObjectAttachment(MemoryView View, CbValidateMode Mode); /** * Validate the compact binary package pointed to by the view as specified by the mode flags. |